aws-sdk-cloudfront 1.49.0 → 1.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb9cded9f42f68997f6b38f9e810b59c65601f6d27e38c56ead1be6072a10f78
4
- data.tar.gz: 8b080052c3ec7d886984ea1293c8d0f871ce4cebf94a053b5814a3a22700e7b2
3
+ metadata.gz: 76607d001ffe3e0ed4bf56d136eab80d280a1a8d725e00b9c62aa21c5488dddc
4
+ data.tar.gz: 3de1f4a5a5ca89a9936d816b931efb2a082af52837f38744537fd99b2b319646
5
5
  SHA512:
6
- metadata.gz: 60f4eeeb1ebb296c0837e3658bfb54ee5b685864dfec53aeb358963fabf180a5c649d886c8446c27cd819b94aa85b54ce20da59c0f547c308e3db16f21645139
7
- data.tar.gz: 074de588010dc52e04bfdb158d9177a7379032761deca5e5665aa690e53a0e18190fe91520cfc888f63ede7fe08cee95fe7a9fd4ca4b8ee28a40987d8ce7a437
6
+ metadata.gz: e83a3098be881698fb6f1e6b37824b3e6fe1d5edb6d9a6d4303763cee2781c55002a593ccd910ebd00d67cde9cc1e9d7f81afeba88c5f10ba005f846a1f988de
7
+ data.tar.gz: 015142a7e605465f96350eb50c62552cb3c06cb35092db4f9545d17124247527074635f088a2123e2860e99d6ba3a3892e0c4d6ee5edd67efa7d517c24afdb9f
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.50.0 (2021-04-30)
5
+ ------------------
6
+
7
+ * Feature - CloudFront now supports CloudFront Functions, a native feature of CloudFront that enables you to write lightweight functions in JavaScript for high-scale, latency-sensitive CDN customizations.
8
+
4
9
  1.49.0 (2021-03-10)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.49.0
1
+ 1.50.0
@@ -49,6 +49,6 @@ require_relative 'aws-sdk-cloudfront/customizations'
49
49
  # @!group service
50
50
  module Aws::CloudFront
51
51
 
52
- GEM_VERSION = '1.49.0'
52
+ GEM_VERSION = '1.50.0'
53
53
 
54
54
  end
@@ -616,6 +616,15 @@ module Aws::CloudFront
616
616
  # },
617
617
  # ],
618
618
  # },
619
+ # function_associations: {
620
+ # quantity: 1, # required
621
+ # items: [
622
+ # {
623
+ # function_arn: "FunctionARN", # required
624
+ # event_type: "viewer-request", # required, accepts viewer-request, viewer-response, origin-request, origin-response
625
+ # },
626
+ # ],
627
+ # },
619
628
  # field_level_encryption_id: "string",
620
629
  # realtime_log_config_arn: "string",
621
630
  # cache_policy_id: "string",
@@ -679,6 +688,15 @@ module Aws::CloudFront
679
688
  # },
680
689
  # ],
681
690
  # },
691
+ # function_associations: {
692
+ # quantity: 1, # required
693
+ # items: [
694
+ # {
695
+ # function_arn: "FunctionARN", # required
696
+ # event_type: "viewer-request", # required, accepts viewer-request, viewer-response, origin-request, origin-response
697
+ # },
698
+ # ],
699
+ # },
682
700
  # field_level_encryption_id: "string",
683
701
  # realtime_log_config_arn: "string",
684
702
  # cache_policy_id: "string",
@@ -830,6 +848,10 @@ module Aws::CloudFront
830
848
  # resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].lambda_function_arn #=> String
831
849
  # resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
832
850
  # resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].include_body #=> Boolean
851
+ # resp.distribution.distribution_config.default_cache_behavior.function_associations.quantity #=> Integer
852
+ # resp.distribution.distribution_config.default_cache_behavior.function_associations.items #=> Array
853
+ # resp.distribution.distribution_config.default_cache_behavior.function_associations.items[0].function_arn #=> String
854
+ # resp.distribution.distribution_config.default_cache_behavior.function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
833
855
  # resp.distribution.distribution_config.default_cache_behavior.field_level_encryption_id #=> String
834
856
  # resp.distribution.distribution_config.default_cache_behavior.realtime_log_config_arn #=> String
835
857
  # resp.distribution.distribution_config.default_cache_behavior.cache_policy_id #=> String
@@ -874,6 +896,10 @@ module Aws::CloudFront
874
896
  # resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].lambda_function_arn #=> String
875
897
  # resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
876
898
  # resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].include_body #=> Boolean
899
+ # resp.distribution.distribution_config.cache_behaviors.items[0].function_associations.quantity #=> Integer
900
+ # resp.distribution.distribution_config.cache_behaviors.items[0].function_associations.items #=> Array
901
+ # resp.distribution.distribution_config.cache_behaviors.items[0].function_associations.items[0].function_arn #=> String
902
+ # resp.distribution.distribution_config.cache_behaviors.items[0].function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
877
903
  # resp.distribution.distribution_config.cache_behaviors.items[0].field_level_encryption_id #=> String
878
904
  # resp.distribution.distribution_config.cache_behaviors.items[0].realtime_log_config_arn #=> String
879
905
  # resp.distribution.distribution_config.cache_behaviors.items[0].cache_policy_id #=> String
@@ -1050,6 +1076,15 @@ module Aws::CloudFront
1050
1076
  # },
1051
1077
  # ],
1052
1078
  # },
1079
+ # function_associations: {
1080
+ # quantity: 1, # required
1081
+ # items: [
1082
+ # {
1083
+ # function_arn: "FunctionARN", # required
1084
+ # event_type: "viewer-request", # required, accepts viewer-request, viewer-response, origin-request, origin-response
1085
+ # },
1086
+ # ],
1087
+ # },
1053
1088
  # field_level_encryption_id: "string",
1054
1089
  # realtime_log_config_arn: "string",
1055
1090
  # cache_policy_id: "string",
@@ -1113,6 +1148,15 @@ module Aws::CloudFront
1113
1148
  # },
1114
1149
  # ],
1115
1150
  # },
1151
+ # function_associations: {
1152
+ # quantity: 1, # required
1153
+ # items: [
1154
+ # {
1155
+ # function_arn: "FunctionARN", # required
1156
+ # event_type: "viewer-request", # required, accepts viewer-request, viewer-response, origin-request, origin-response
1157
+ # },
1158
+ # ],
1159
+ # },
1116
1160
  # field_level_encryption_id: "string",
1117
1161
  # realtime_log_config_arn: "string",
1118
1162
  # cache_policy_id: "string",
@@ -1273,6 +1317,10 @@ module Aws::CloudFront
1273
1317
  # resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].lambda_function_arn #=> String
1274
1318
  # resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
1275
1319
  # resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].include_body #=> Boolean
1320
+ # resp.distribution.distribution_config.default_cache_behavior.function_associations.quantity #=> Integer
1321
+ # resp.distribution.distribution_config.default_cache_behavior.function_associations.items #=> Array
1322
+ # resp.distribution.distribution_config.default_cache_behavior.function_associations.items[0].function_arn #=> String
1323
+ # resp.distribution.distribution_config.default_cache_behavior.function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
1276
1324
  # resp.distribution.distribution_config.default_cache_behavior.field_level_encryption_id #=> String
1277
1325
  # resp.distribution.distribution_config.default_cache_behavior.realtime_log_config_arn #=> String
1278
1326
  # resp.distribution.distribution_config.default_cache_behavior.cache_policy_id #=> String
@@ -1317,6 +1365,10 @@ module Aws::CloudFront
1317
1365
  # resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].lambda_function_arn #=> String
1318
1366
  # resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
1319
1367
  # resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].include_body #=> Boolean
1368
+ # resp.distribution.distribution_config.cache_behaviors.items[0].function_associations.quantity #=> Integer
1369
+ # resp.distribution.distribution_config.cache_behaviors.items[0].function_associations.items #=> Array
1370
+ # resp.distribution.distribution_config.cache_behaviors.items[0].function_associations.items[0].function_arn #=> String
1371
+ # resp.distribution.distribution_config.cache_behaviors.items[0].function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
1320
1372
  # resp.distribution.distribution_config.cache_behaviors.items[0].field_level_encryption_id #=> String
1321
1373
  # resp.distribution.distribution_config.cache_behaviors.items[0].realtime_log_config_arn #=> String
1322
1374
  # resp.distribution.distribution_config.cache_behaviors.items[0].cache_policy_id #=> String
@@ -1511,6 +1563,76 @@ module Aws::CloudFront
1511
1563
  req.send_request(options)
1512
1564
  end
1513
1565
 
1566
+ # Creates a CloudFront function.
1567
+ #
1568
+ # To create a function, you provide the function code and some
1569
+ # configuration information about the function. The response contains an
1570
+ # Amazon Resource Name (ARN) that uniquely identifies the function.
1571
+ #
1572
+ # When you create a function, it’s in the `DEVELOPMENT` stage. In this
1573
+ # stage, you can test the function with `TestFunction`, and update it
1574
+ # with `UpdateFunction`.
1575
+ #
1576
+ # When you’re ready to use your function with a CloudFront distribution,
1577
+ # use `PublishFunction` to copy the function from the `DEVELOPMENT`
1578
+ # stage to `LIVE`. When it’s live, you can attach the function to a
1579
+ # distribution’s cache behavior, using the function’s ARN.
1580
+ #
1581
+ # @option params [required, String] :name
1582
+ # A name to identify the function.
1583
+ #
1584
+ # @option params [required, Types::FunctionConfig] :function_config
1585
+ # Configuration information about the function, including an optional
1586
+ # comment and the function’s runtime.
1587
+ #
1588
+ # @option params [required, String, StringIO, File] :function_code
1589
+ # The function code. For more information about writing a CloudFront
1590
+ # function, see [Writing function code for CloudFront Functions][1] in
1591
+ # the *Amazon CloudFront Developer Guide*.
1592
+ #
1593
+ #
1594
+ #
1595
+ # [1]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/writing-function-code.html
1596
+ #
1597
+ # @return [Types::CreateFunctionResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1598
+ #
1599
+ # * {Types::CreateFunctionResult#function_summary #function_summary} => Types::FunctionSummary
1600
+ # * {Types::CreateFunctionResult#location #location} => String
1601
+ # * {Types::CreateFunctionResult#etag #etag} => String
1602
+ #
1603
+ # @example Request syntax with placeholder values
1604
+ #
1605
+ # resp = client.create_function({
1606
+ # name: "FunctionName", # required
1607
+ # function_config: { # required
1608
+ # comment: "string", # required
1609
+ # runtime: "cloudfront-js-1.0", # required, accepts cloudfront-js-1.0
1610
+ # },
1611
+ # function_code: "data", # required
1612
+ # })
1613
+ #
1614
+ # @example Response structure
1615
+ #
1616
+ # resp.function_summary.name #=> String
1617
+ # resp.function_summary.status #=> String
1618
+ # resp.function_summary.function_config.comment #=> String
1619
+ # resp.function_summary.function_config.runtime #=> String, one of "cloudfront-js-1.0"
1620
+ # resp.function_summary.function_metadata.function_arn #=> String
1621
+ # resp.function_summary.function_metadata.stage #=> String, one of "DEVELOPMENT", "LIVE"
1622
+ # resp.function_summary.function_metadata.created_time #=> Time
1623
+ # resp.function_summary.function_metadata.last_modified_time #=> Time
1624
+ # resp.location #=> String
1625
+ # resp.etag #=> String
1626
+ #
1627
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateFunction2020_05_31 AWS API Documentation
1628
+ #
1629
+ # @overload create_function(params = {})
1630
+ # @param [Hash] params ({})
1631
+ def create_function(params = {}, options = {})
1632
+ req = build_request(:create_function, params)
1633
+ req.send_request(options)
1634
+ end
1635
+
1514
1636
  # Create a new invalidation.
1515
1637
  #
1516
1638
  # @option params [required, String] :distribution_id
@@ -2218,6 +2340,41 @@ module Aws::CloudFront
2218
2340
  req.send_request(options)
2219
2341
  end
2220
2342
 
2343
+ # Deletes a CloudFront function.
2344
+ #
2345
+ # You cannot delete a function if it’s associated with a cache behavior.
2346
+ # First, update your distributions to remove the function association
2347
+ # from all cache behaviors, then delete the function.
2348
+ #
2349
+ # To delete a function, you must provide the function’s name and version
2350
+ # (`ETag` value). To get these values, you can use `ListFunctions` and
2351
+ # `DescribeFunction`.
2352
+ #
2353
+ # @option params [required, String] :name
2354
+ # The name of the function that you are deleting.
2355
+ #
2356
+ # @option params [required, String] :if_match
2357
+ # The current version (`ETag` value) of the function that you are
2358
+ # deleting, which you can get using `DescribeFunction`.
2359
+ #
2360
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2361
+ #
2362
+ # @example Request syntax with placeholder values
2363
+ #
2364
+ # resp = client.delete_function({
2365
+ # name: "string", # required
2366
+ # if_match: "string", # required
2367
+ # })
2368
+ #
2369
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteFunction2020_05_31 AWS API Documentation
2370
+ #
2371
+ # @overload delete_function(params = {})
2372
+ # @param [Hash] params ({})
2373
+ def delete_function(params = {}, options = {})
2374
+ req = build_request(:delete_function, params)
2375
+ req.send_request(options)
2376
+ end
2377
+
2221
2378
  # Deletes a key group.
2222
2379
  #
2223
2380
  # You cannot delete a key group that is referenced in a cache behavior.
@@ -2452,6 +2609,53 @@ module Aws::CloudFront
2452
2609
  req.send_request(options)
2453
2610
  end
2454
2611
 
2612
+ # Gets configuration information and metadata about a CloudFront
2613
+ # function, but not the function’s code. To get a function’s code, use
2614
+ # `GetFunction`.
2615
+ #
2616
+ # To get configuration information and metadata about a function, you
2617
+ # must provide the function’s name and stage. To get these values, you
2618
+ # can use `ListFunctions`.
2619
+ #
2620
+ # @option params [required, String] :name
2621
+ # The name of the function that you are getting information about.
2622
+ #
2623
+ # @option params [String] :stage
2624
+ # The function’s stage, either `DEVELOPMENT` or `LIVE`.
2625
+ #
2626
+ # @return [Types::DescribeFunctionResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2627
+ #
2628
+ # * {Types::DescribeFunctionResult#function_summary #function_summary} => Types::FunctionSummary
2629
+ # * {Types::DescribeFunctionResult#etag #etag} => String
2630
+ #
2631
+ # @example Request syntax with placeholder values
2632
+ #
2633
+ # resp = client.describe_function({
2634
+ # name: "string", # required
2635
+ # stage: "DEVELOPMENT", # accepts DEVELOPMENT, LIVE
2636
+ # })
2637
+ #
2638
+ # @example Response structure
2639
+ #
2640
+ # resp.function_summary.name #=> String
2641
+ # resp.function_summary.status #=> String
2642
+ # resp.function_summary.function_config.comment #=> String
2643
+ # resp.function_summary.function_config.runtime #=> String, one of "cloudfront-js-1.0"
2644
+ # resp.function_summary.function_metadata.function_arn #=> String
2645
+ # resp.function_summary.function_metadata.stage #=> String, one of "DEVELOPMENT", "LIVE"
2646
+ # resp.function_summary.function_metadata.created_time #=> Time
2647
+ # resp.function_summary.function_metadata.last_modified_time #=> Time
2648
+ # resp.etag #=> String
2649
+ #
2650
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DescribeFunction2020_05_31 AWS API Documentation
2651
+ #
2652
+ # @overload describe_function(params = {})
2653
+ # @param [Hash] params ({})
2654
+ def describe_function(params = {}, options = {})
2655
+ req = build_request(:describe_function, params)
2656
+ req.send_request(options)
2657
+ end
2658
+
2455
2659
  # Gets a cache policy, including the following metadata:
2456
2660
  #
2457
2661
  # * The policy’s identifier.
@@ -2737,6 +2941,10 @@ module Aws::CloudFront
2737
2941
  # resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].lambda_function_arn #=> String
2738
2942
  # resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
2739
2943
  # resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].include_body #=> Boolean
2944
+ # resp.distribution.distribution_config.default_cache_behavior.function_associations.quantity #=> Integer
2945
+ # resp.distribution.distribution_config.default_cache_behavior.function_associations.items #=> Array
2946
+ # resp.distribution.distribution_config.default_cache_behavior.function_associations.items[0].function_arn #=> String
2947
+ # resp.distribution.distribution_config.default_cache_behavior.function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
2740
2948
  # resp.distribution.distribution_config.default_cache_behavior.field_level_encryption_id #=> String
2741
2949
  # resp.distribution.distribution_config.default_cache_behavior.realtime_log_config_arn #=> String
2742
2950
  # resp.distribution.distribution_config.default_cache_behavior.cache_policy_id #=> String
@@ -2781,6 +2989,10 @@ module Aws::CloudFront
2781
2989
  # resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].lambda_function_arn #=> String
2782
2990
  # resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
2783
2991
  # resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].include_body #=> Boolean
2992
+ # resp.distribution.distribution_config.cache_behaviors.items[0].function_associations.quantity #=> Integer
2993
+ # resp.distribution.distribution_config.cache_behaviors.items[0].function_associations.items #=> Array
2994
+ # resp.distribution.distribution_config.cache_behaviors.items[0].function_associations.items[0].function_arn #=> String
2995
+ # resp.distribution.distribution_config.cache_behaviors.items[0].function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
2784
2996
  # resp.distribution.distribution_config.cache_behaviors.items[0].field_level_encryption_id #=> String
2785
2997
  # resp.distribution.distribution_config.cache_behaviors.items[0].realtime_log_config_arn #=> String
2786
2998
  # resp.distribution.distribution_config.cache_behaviors.items[0].cache_policy_id #=> String
@@ -2923,6 +3135,10 @@ module Aws::CloudFront
2923
3135
  # resp.distribution_config.default_cache_behavior.lambda_function_associations.items[0].lambda_function_arn #=> String
2924
3136
  # resp.distribution_config.default_cache_behavior.lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
2925
3137
  # resp.distribution_config.default_cache_behavior.lambda_function_associations.items[0].include_body #=> Boolean
3138
+ # resp.distribution_config.default_cache_behavior.function_associations.quantity #=> Integer
3139
+ # resp.distribution_config.default_cache_behavior.function_associations.items #=> Array
3140
+ # resp.distribution_config.default_cache_behavior.function_associations.items[0].function_arn #=> String
3141
+ # resp.distribution_config.default_cache_behavior.function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
2926
3142
  # resp.distribution_config.default_cache_behavior.field_level_encryption_id #=> String
2927
3143
  # resp.distribution_config.default_cache_behavior.realtime_log_config_arn #=> String
2928
3144
  # resp.distribution_config.default_cache_behavior.cache_policy_id #=> String
@@ -2967,6 +3183,10 @@ module Aws::CloudFront
2967
3183
  # resp.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].lambda_function_arn #=> String
2968
3184
  # resp.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
2969
3185
  # resp.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].include_body #=> Boolean
3186
+ # resp.distribution_config.cache_behaviors.items[0].function_associations.quantity #=> Integer
3187
+ # resp.distribution_config.cache_behaviors.items[0].function_associations.items #=> Array
3188
+ # resp.distribution_config.cache_behaviors.items[0].function_associations.items[0].function_arn #=> String
3189
+ # resp.distribution_config.cache_behaviors.items[0].function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
2970
3190
  # resp.distribution_config.cache_behaviors.items[0].field_level_encryption_id #=> String
2971
3191
  # resp.distribution_config.cache_behaviors.items[0].realtime_log_config_arn #=> String
2972
3192
  # resp.distribution_config.cache_behaviors.items[0].cache_policy_id #=> String
@@ -3192,6 +3412,46 @@ module Aws::CloudFront
3192
3412
  req.send_request(options)
3193
3413
  end
3194
3414
 
3415
+ # Gets the code of a CloudFront function. To get configuration
3416
+ # information and metadata about a function, use `DescribeFunction`.
3417
+ #
3418
+ # To get a function’s code, you must provide the function’s name and
3419
+ # stage. To get these values, you can use `ListFunctions`.
3420
+ #
3421
+ # @option params [required, String] :name
3422
+ # The name of the function whose code you are getting.
3423
+ #
3424
+ # @option params [String] :stage
3425
+ # The function’s stage, either `DEVELOPMENT` or `LIVE`.
3426
+ #
3427
+ # @return [Types::GetFunctionResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3428
+ #
3429
+ # * {Types::GetFunctionResult#function_code #function_code} => String
3430
+ # * {Types::GetFunctionResult#etag #etag} => String
3431
+ # * {Types::GetFunctionResult#content_type #content_type} => String
3432
+ #
3433
+ # @example Request syntax with placeholder values
3434
+ #
3435
+ # resp = client.get_function({
3436
+ # name: "string", # required
3437
+ # stage: "DEVELOPMENT", # accepts DEVELOPMENT, LIVE
3438
+ # })
3439
+ #
3440
+ # @example Response structure
3441
+ #
3442
+ # resp.function_code #=> String
3443
+ # resp.etag #=> String
3444
+ # resp.content_type #=> String
3445
+ #
3446
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetFunction2020_05_31 AWS API Documentation
3447
+ #
3448
+ # @overload get_function(params = {})
3449
+ # @param [Hash] params ({})
3450
+ def get_function(params = {}, options = {})
3451
+ req = build_request(:get_function, params)
3452
+ req.send_request(options)
3453
+ end
3454
+
3195
3455
  # Get the information about an invalidation.
3196
3456
  #
3197
3457
  # @option params [required, String] :distribution_id
@@ -3913,6 +4173,10 @@ module Aws::CloudFront
3913
4173
  # resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.items[0].lambda_function_arn #=> String
3914
4174
  # resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
3915
4175
  # resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.items[0].include_body #=> Boolean
4176
+ # resp.distribution_list.items[0].default_cache_behavior.function_associations.quantity #=> Integer
4177
+ # resp.distribution_list.items[0].default_cache_behavior.function_associations.items #=> Array
4178
+ # resp.distribution_list.items[0].default_cache_behavior.function_associations.items[0].function_arn #=> String
4179
+ # resp.distribution_list.items[0].default_cache_behavior.function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
3916
4180
  # resp.distribution_list.items[0].default_cache_behavior.field_level_encryption_id #=> String
3917
4181
  # resp.distribution_list.items[0].default_cache_behavior.realtime_log_config_arn #=> String
3918
4182
  # resp.distribution_list.items[0].default_cache_behavior.cache_policy_id #=> String
@@ -3957,6 +4221,10 @@ module Aws::CloudFront
3957
4221
  # resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.items[0].lambda_function_arn #=> String
3958
4222
  # resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
3959
4223
  # resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.items[0].include_body #=> Boolean
4224
+ # resp.distribution_list.items[0].cache_behaviors.items[0].function_associations.quantity #=> Integer
4225
+ # resp.distribution_list.items[0].cache_behaviors.items[0].function_associations.items #=> Array
4226
+ # resp.distribution_list.items[0].cache_behaviors.items[0].function_associations.items[0].function_arn #=> String
4227
+ # resp.distribution_list.items[0].cache_behaviors.items[0].function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
3960
4228
  # resp.distribution_list.items[0].cache_behaviors.items[0].field_level_encryption_id #=> String
3961
4229
  # resp.distribution_list.items[0].cache_behaviors.items[0].realtime_log_config_arn #=> String
3962
4230
  # resp.distribution_list.items[0].cache_behaviors.items[0].cache_policy_id #=> String
@@ -4292,6 +4560,10 @@ module Aws::CloudFront
4292
4560
  # resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.items[0].lambda_function_arn #=> String
4293
4561
  # resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
4294
4562
  # resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.items[0].include_body #=> Boolean
4563
+ # resp.distribution_list.items[0].default_cache_behavior.function_associations.quantity #=> Integer
4564
+ # resp.distribution_list.items[0].default_cache_behavior.function_associations.items #=> Array
4565
+ # resp.distribution_list.items[0].default_cache_behavior.function_associations.items[0].function_arn #=> String
4566
+ # resp.distribution_list.items[0].default_cache_behavior.function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
4295
4567
  # resp.distribution_list.items[0].default_cache_behavior.field_level_encryption_id #=> String
4296
4568
  # resp.distribution_list.items[0].default_cache_behavior.realtime_log_config_arn #=> String
4297
4569
  # resp.distribution_list.items[0].default_cache_behavior.cache_policy_id #=> String
@@ -4336,6 +4608,10 @@ module Aws::CloudFront
4336
4608
  # resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.items[0].lambda_function_arn #=> String
4337
4609
  # resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
4338
4610
  # resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.items[0].include_body #=> Boolean
4611
+ # resp.distribution_list.items[0].cache_behaviors.items[0].function_associations.quantity #=> Integer
4612
+ # resp.distribution_list.items[0].cache_behaviors.items[0].function_associations.items #=> Array
4613
+ # resp.distribution_list.items[0].cache_behaviors.items[0].function_associations.items[0].function_arn #=> String
4614
+ # resp.distribution_list.items[0].cache_behaviors.items[0].function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
4339
4615
  # resp.distribution_list.items[0].cache_behaviors.items[0].field_level_encryption_id #=> String
4340
4616
  # resp.distribution_list.items[0].cache_behaviors.items[0].realtime_log_config_arn #=> String
4341
4617
  # resp.distribution_list.items[0].cache_behaviors.items[0].cache_policy_id #=> String
@@ -4492,6 +4768,10 @@ module Aws::CloudFront
4492
4768
  # resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.items[0].lambda_function_arn #=> String
4493
4769
  # resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
4494
4770
  # resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.items[0].include_body #=> Boolean
4771
+ # resp.distribution_list.items[0].default_cache_behavior.function_associations.quantity #=> Integer
4772
+ # resp.distribution_list.items[0].default_cache_behavior.function_associations.items #=> Array
4773
+ # resp.distribution_list.items[0].default_cache_behavior.function_associations.items[0].function_arn #=> String
4774
+ # resp.distribution_list.items[0].default_cache_behavior.function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
4495
4775
  # resp.distribution_list.items[0].default_cache_behavior.field_level_encryption_id #=> String
4496
4776
  # resp.distribution_list.items[0].default_cache_behavior.realtime_log_config_arn #=> String
4497
4777
  # resp.distribution_list.items[0].default_cache_behavior.cache_policy_id #=> String
@@ -4536,6 +4816,10 @@ module Aws::CloudFront
4536
4816
  # resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.items[0].lambda_function_arn #=> String
4537
4817
  # resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
4538
4818
  # resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.items[0].include_body #=> Boolean
4819
+ # resp.distribution_list.items[0].cache_behaviors.items[0].function_associations.quantity #=> Integer
4820
+ # resp.distribution_list.items[0].cache_behaviors.items[0].function_associations.items #=> Array
4821
+ # resp.distribution_list.items[0].cache_behaviors.items[0].function_associations.items[0].function_arn #=> String
4822
+ # resp.distribution_list.items[0].cache_behaviors.items[0].function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
4539
4823
  # resp.distribution_list.items[0].cache_behaviors.items[0].field_level_encryption_id #=> String
4540
4824
  # resp.distribution_list.items[0].cache_behaviors.items[0].realtime_log_config_arn #=> String
4541
4825
  # resp.distribution_list.items[0].cache_behaviors.items[0].cache_policy_id #=> String
@@ -4698,6 +4982,68 @@ module Aws::CloudFront
4698
4982
  req.send_request(options)
4699
4983
  end
4700
4984
 
4985
+ # Gets a list of all CloudFront functions in your AWS account.
4986
+ #
4987
+ # You can optionally apply a filter to return only the functions that
4988
+ # are in the specified stage, either `DEVELOPMENT` or `LIVE`.
4989
+ #
4990
+ # You can optionally specify the maximum number of items to receive in
4991
+ # the response. If the total number of items in the list exceeds the
4992
+ # maximum that you specify, or the default maximum, the response is
4993
+ # paginated. To get the next page of items, send a subsequent request
4994
+ # that specifies the `NextMarker` value from the current response as the
4995
+ # `Marker` value in the subsequent request.
4996
+ #
4997
+ # @option params [String] :marker
4998
+ # Use this field when paginating results to indicate where to begin in
4999
+ # your list of functions. The response includes functions in the list
5000
+ # that occur after the marker. To get the next page of the list, set
5001
+ # this field’s value to the value of `NextMarker` from the current
5002
+ # page’s response.
5003
+ #
5004
+ # @option params [Integer] :max_items
5005
+ # The maximum number of functions that you want in the response.
5006
+ #
5007
+ # @option params [String] :stage
5008
+ # An optional filter to return only the functions that are in the
5009
+ # specified stage, either `DEVELOPMENT` or `LIVE`.
5010
+ #
5011
+ # @return [Types::ListFunctionsResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
5012
+ #
5013
+ # * {Types::ListFunctionsResult#function_list #function_list} => Types::FunctionList
5014
+ #
5015
+ # @example Request syntax with placeholder values
5016
+ #
5017
+ # resp = client.list_functions({
5018
+ # marker: "string",
5019
+ # max_items: 1,
5020
+ # stage: "DEVELOPMENT", # accepts DEVELOPMENT, LIVE
5021
+ # })
5022
+ #
5023
+ # @example Response structure
5024
+ #
5025
+ # resp.function_list.next_marker #=> String
5026
+ # resp.function_list.max_items #=> Integer
5027
+ # resp.function_list.quantity #=> Integer
5028
+ # resp.function_list.items #=> Array
5029
+ # resp.function_list.items[0].name #=> String
5030
+ # resp.function_list.items[0].status #=> String
5031
+ # resp.function_list.items[0].function_config.comment #=> String
5032
+ # resp.function_list.items[0].function_config.runtime #=> String, one of "cloudfront-js-1.0"
5033
+ # resp.function_list.items[0].function_metadata.function_arn #=> String
5034
+ # resp.function_list.items[0].function_metadata.stage #=> String, one of "DEVELOPMENT", "LIVE"
5035
+ # resp.function_list.items[0].function_metadata.created_time #=> Time
5036
+ # resp.function_list.items[0].function_metadata.last_modified_time #=> Time
5037
+ #
5038
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListFunctions2020_05_31 AWS API Documentation
5039
+ #
5040
+ # @overload list_functions(params = {})
5041
+ # @param [Hash] params ({})
5042
+ def list_functions(params = {}, options = {})
5043
+ req = build_request(:list_functions, params)
5044
+ req.send_request(options)
5045
+ end
5046
+
4701
5047
  # Lists invalidation batches.
4702
5048
  #
4703
5049
  # @option params [required, String] :distribution_id
@@ -5070,6 +5416,57 @@ module Aws::CloudFront
5070
5416
  req.send_request(options)
5071
5417
  end
5072
5418
 
5419
+ # Publishes a CloudFront function by copying the function code from the
5420
+ # `DEVELOPMENT` stage to `LIVE`. This automatically updates all cache
5421
+ # behaviors that are using this function to use the newly published copy
5422
+ # in the `LIVE` stage.
5423
+ #
5424
+ # When a function is published to the `LIVE` stage, you can attach the
5425
+ # function to a distribution’s cache behavior, using the function’s
5426
+ # Amazon Resource Name (ARN).
5427
+ #
5428
+ # To publish a function, you must provide the function’s name and
5429
+ # version (`ETag` value). To get these values, you can use
5430
+ # `ListFunctions` and `DescribeFunction`.
5431
+ #
5432
+ # @option params [required, String] :name
5433
+ # The name of the function that you are publishing.
5434
+ #
5435
+ # @option params [required, String] :if_match
5436
+ # The current version (`ETag` value) of the function that you are
5437
+ # publishing, which you can get using `DescribeFunction`.
5438
+ #
5439
+ # @return [Types::PublishFunctionResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
5440
+ #
5441
+ # * {Types::PublishFunctionResult#function_summary #function_summary} => Types::FunctionSummary
5442
+ #
5443
+ # @example Request syntax with placeholder values
5444
+ #
5445
+ # resp = client.publish_function({
5446
+ # name: "string", # required
5447
+ # if_match: "string", # required
5448
+ # })
5449
+ #
5450
+ # @example Response structure
5451
+ #
5452
+ # resp.function_summary.name #=> String
5453
+ # resp.function_summary.status #=> String
5454
+ # resp.function_summary.function_config.comment #=> String
5455
+ # resp.function_summary.function_config.runtime #=> String, one of "cloudfront-js-1.0"
5456
+ # resp.function_summary.function_metadata.function_arn #=> String
5457
+ # resp.function_summary.function_metadata.stage #=> String, one of "DEVELOPMENT", "LIVE"
5458
+ # resp.function_summary.function_metadata.created_time #=> Time
5459
+ # resp.function_summary.function_metadata.last_modified_time #=> Time
5460
+ #
5461
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/PublishFunction2020_05_31 AWS API Documentation
5462
+ #
5463
+ # @overload publish_function(params = {})
5464
+ # @param [Hash] params ({})
5465
+ def publish_function(params = {}, options = {})
5466
+ req = build_request(:publish_function, params)
5467
+ req.send_request(options)
5468
+ end
5469
+
5073
5470
  # Add tags to a CloudFront resource.
5074
5471
  #
5075
5472
  # @option params [required, String] :resource
@@ -5103,6 +5500,83 @@ module Aws::CloudFront
5103
5500
  req.send_request(options)
5104
5501
  end
5105
5502
 
5503
+ # Tests a CloudFront function.
5504
+ #
5505
+ # To test a function, you provide an *event object* that represents an
5506
+ # HTTP request or response that your CloudFront distribution could
5507
+ # receive in production. CloudFront runs the function, passing it the
5508
+ # event object that you provided, and returns the function’s result (the
5509
+ # modified event object) in the response. The response also contains
5510
+ # function logs and error messages, if any exist. For more information
5511
+ # about testing functions, see [Testing functions][1] in the *Amazon
5512
+ # CloudFront Developer Guide*.
5513
+ #
5514
+ # To test a function, you provide the function’s name and version
5515
+ # (`ETag` value) along with the event object. To get the function’s name
5516
+ # and version, you can use `ListFunctions` and `DescribeFunction`.
5517
+ #
5518
+ #
5519
+ #
5520
+ # [1]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/managing-functions.html#test-function
5521
+ #
5522
+ # @option params [required, String] :name
5523
+ # The name of the function that you are testing.
5524
+ #
5525
+ # @option params [required, String] :if_match
5526
+ # The current version (`ETag` value) of the function that you are
5527
+ # testing, which you can get using `DescribeFunction`.
5528
+ #
5529
+ # @option params [String] :stage
5530
+ # The stage of the function that you are testing, either `DEVELOPMENT`
5531
+ # or `LIVE`.
5532
+ #
5533
+ # @option params [required, String, StringIO, File] :event_object
5534
+ # The event object to test the function with. For more information about
5535
+ # the structure of the event object, see [Testing functions][1] in the
5536
+ # *Amazon CloudFront Developer Guide*.
5537
+ #
5538
+ #
5539
+ #
5540
+ # [1]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/managing-functions.html#test-function
5541
+ #
5542
+ # @return [Types::TestFunctionResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
5543
+ #
5544
+ # * {Types::TestFunctionResult#test_result #test_result} => Types::TestResult
5545
+ #
5546
+ # @example Request syntax with placeholder values
5547
+ #
5548
+ # resp = client.test_function({
5549
+ # name: "string", # required
5550
+ # if_match: "string", # required
5551
+ # stage: "DEVELOPMENT", # accepts DEVELOPMENT, LIVE
5552
+ # event_object: "data", # required
5553
+ # })
5554
+ #
5555
+ # @example Response structure
5556
+ #
5557
+ # resp.test_result.function_summary.name #=> String
5558
+ # resp.test_result.function_summary.status #=> String
5559
+ # resp.test_result.function_summary.function_config.comment #=> String
5560
+ # resp.test_result.function_summary.function_config.runtime #=> String, one of "cloudfront-js-1.0"
5561
+ # resp.test_result.function_summary.function_metadata.function_arn #=> String
5562
+ # resp.test_result.function_summary.function_metadata.stage #=> String, one of "DEVELOPMENT", "LIVE"
5563
+ # resp.test_result.function_summary.function_metadata.created_time #=> Time
5564
+ # resp.test_result.function_summary.function_metadata.last_modified_time #=> Time
5565
+ # resp.test_result.compute_utilization #=> String
5566
+ # resp.test_result.function_execution_logs #=> Array
5567
+ # resp.test_result.function_execution_logs[0] #=> String
5568
+ # resp.test_result.function_error_message #=> String
5569
+ # resp.test_result.function_output #=> String
5570
+ #
5571
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/TestFunction2020_05_31 AWS API Documentation
5572
+ #
5573
+ # @overload test_function(params = {})
5574
+ # @param [Hash] params ({})
5575
+ def test_function(params = {}, options = {})
5576
+ req = build_request(:test_function, params)
5577
+ req.send_request(options)
5578
+ end
5579
+
5106
5580
  # Remove tags from a CloudFront resource.
5107
5581
  #
5108
5582
  # @option params [required, String] :resource
@@ -5479,6 +5953,15 @@ module Aws::CloudFront
5479
5953
  # },
5480
5954
  # ],
5481
5955
  # },
5956
+ # function_associations: {
5957
+ # quantity: 1, # required
5958
+ # items: [
5959
+ # {
5960
+ # function_arn: "FunctionARN", # required
5961
+ # event_type: "viewer-request", # required, accepts viewer-request, viewer-response, origin-request, origin-response
5962
+ # },
5963
+ # ],
5964
+ # },
5482
5965
  # field_level_encryption_id: "string",
5483
5966
  # realtime_log_config_arn: "string",
5484
5967
  # cache_policy_id: "string",
@@ -5542,6 +6025,15 @@ module Aws::CloudFront
5542
6025
  # },
5543
6026
  # ],
5544
6027
  # },
6028
+ # function_associations: {
6029
+ # quantity: 1, # required
6030
+ # items: [
6031
+ # {
6032
+ # function_arn: "FunctionARN", # required
6033
+ # event_type: "viewer-request", # required, accepts viewer-request, viewer-response, origin-request, origin-response
6034
+ # },
6035
+ # ],
6036
+ # },
5545
6037
  # field_level_encryption_id: "string",
5546
6038
  # realtime_log_config_arn: "string",
5547
6039
  # cache_policy_id: "string",
@@ -5695,6 +6187,10 @@ module Aws::CloudFront
5695
6187
  # resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].lambda_function_arn #=> String
5696
6188
  # resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
5697
6189
  # resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].include_body #=> Boolean
6190
+ # resp.distribution.distribution_config.default_cache_behavior.function_associations.quantity #=> Integer
6191
+ # resp.distribution.distribution_config.default_cache_behavior.function_associations.items #=> Array
6192
+ # resp.distribution.distribution_config.default_cache_behavior.function_associations.items[0].function_arn #=> String
6193
+ # resp.distribution.distribution_config.default_cache_behavior.function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
5698
6194
  # resp.distribution.distribution_config.default_cache_behavior.field_level_encryption_id #=> String
5699
6195
  # resp.distribution.distribution_config.default_cache_behavior.realtime_log_config_arn #=> String
5700
6196
  # resp.distribution.distribution_config.default_cache_behavior.cache_policy_id #=> String
@@ -5739,6 +6235,10 @@ module Aws::CloudFront
5739
6235
  # resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].lambda_function_arn #=> String
5740
6236
  # resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
5741
6237
  # resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].include_body #=> Boolean
6238
+ # resp.distribution.distribution_config.cache_behaviors.items[0].function_associations.quantity #=> Integer
6239
+ # resp.distribution.distribution_config.cache_behaviors.items[0].function_associations.items #=> Array
6240
+ # resp.distribution.distribution_config.cache_behaviors.items[0].function_associations.items[0].function_arn #=> String
6241
+ # resp.distribution.distribution_config.cache_behaviors.items[0].function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
5742
6242
  # resp.distribution.distribution_config.cache_behaviors.items[0].field_level_encryption_id #=> String
5743
6243
  # resp.distribution.distribution_config.cache_behaviors.items[0].realtime_log_config_arn #=> String
5744
6244
  # resp.distribution.distribution_config.cache_behaviors.items[0].cache_policy_id #=> String
@@ -5946,6 +6446,72 @@ module Aws::CloudFront
5946
6446
  req.send_request(options)
5947
6447
  end
5948
6448
 
6449
+ # Updates a CloudFront function.
6450
+ #
6451
+ # You can update a function’s code or the comment that describes the
6452
+ # function. You cannot update a function’s name.
6453
+ #
6454
+ # To update a function, you provide the function’s name and version
6455
+ # (`ETag` value) along with the updated function code. To get the name
6456
+ # and version, you can use `ListFunctions` and `DescribeFunction`.
6457
+ #
6458
+ # @option params [required, String] :name
6459
+ # The name of the function that you are updating.
6460
+ #
6461
+ # @option params [required, String] :if_match
6462
+ # The current version (`ETag` value) of the function that you are
6463
+ # updating, which you can get using `DescribeFunction`.
6464
+ #
6465
+ # @option params [required, Types::FunctionConfig] :function_config
6466
+ # Configuration information about the function.
6467
+ #
6468
+ # @option params [required, String, StringIO, File] :function_code
6469
+ # The function code. For more information about writing a CloudFront
6470
+ # function, see [Writing function code for CloudFront Functions][1] in
6471
+ # the *Amazon CloudFront Developer Guide*.
6472
+ #
6473
+ #
6474
+ #
6475
+ # [1]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/writing-function-code.html
6476
+ #
6477
+ # @return [Types::UpdateFunctionResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
6478
+ #
6479
+ # * {Types::UpdateFunctionResult#function_summary #function_summary} => Types::FunctionSummary
6480
+ # * {Types::UpdateFunctionResult#etag #etag} => String
6481
+ #
6482
+ # @example Request syntax with placeholder values
6483
+ #
6484
+ # resp = client.update_function({
6485
+ # name: "string", # required
6486
+ # if_match: "string", # required
6487
+ # function_config: { # required
6488
+ # comment: "string", # required
6489
+ # runtime: "cloudfront-js-1.0", # required, accepts cloudfront-js-1.0
6490
+ # },
6491
+ # function_code: "data", # required
6492
+ # })
6493
+ #
6494
+ # @example Response structure
6495
+ #
6496
+ # resp.function_summary.name #=> String
6497
+ # resp.function_summary.status #=> String
6498
+ # resp.function_summary.function_config.comment #=> String
6499
+ # resp.function_summary.function_config.runtime #=> String, one of "cloudfront-js-1.0"
6500
+ # resp.function_summary.function_metadata.function_arn #=> String
6501
+ # resp.function_summary.function_metadata.stage #=> String, one of "DEVELOPMENT", "LIVE"
6502
+ # resp.function_summary.function_metadata.created_time #=> Time
6503
+ # resp.function_summary.function_metadata.last_modified_time #=> Time
6504
+ # resp.etag #=> String
6505
+ #
6506
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateFunction2020_05_31 AWS API Documentation
6507
+ #
6508
+ # @overload update_function(params = {})
6509
+ # @param [Hash] params ({})
6510
+ def update_function(params = {}, options = {})
6511
+ req = build_request(:update_function, params)
6512
+ req.send_request(options)
6513
+ end
6514
+
5949
6515
  # Updates a key group.
5950
6516
  #
5951
6517
  # When you update a key group, all the fields are updated with the
@@ -6345,7 +6911,7 @@ module Aws::CloudFront
6345
6911
  params: params,
6346
6912
  config: config)
6347
6913
  context[:gem_name] = 'aws-sdk-cloudfront'
6348
- context[:gem_version] = '1.49.0'
6914
+ context[:gem_version] = '1.50.0'
6349
6915
  Seahorse::Client::Request.new(handlers, context)
6350
6916
  end
6351
6917