aws-sdk-s3 1.0.0.rc2 → 1.0.0.rc3
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 +4 -4
- data/lib/aws-sdk-s3.rb +1 -1
- data/lib/aws-sdk-s3/bucket.rb +540 -542
- data/lib/aws-sdk-s3/bucket_acl.rb +144 -146
- data/lib/aws-sdk-s3/bucket_cors.rb +122 -124
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +140 -142
- data/lib/aws-sdk-s3/bucket_logging.rb +119 -121
- data/lib/aws-sdk-s3/bucket_notification.rb +162 -164
- data/lib/aws-sdk-s3/bucket_policy.rb +114 -116
- data/lib/aws-sdk-s3/bucket_request_payment.rb +105 -107
- data/lib/aws-sdk-s3/bucket_tagging.rb +119 -121
- data/lib/aws-sdk-s3/bucket_versioning.rb +162 -164
- data/lib/aws-sdk-s3/bucket_website.rb +150 -152
- data/lib/aws-sdk-s3/client.rb +4380 -3611
- data/lib/aws-sdk-s3/client_api.rb +2343 -2345
- data/lib/aws-sdk-s3/customizations/object.rb +3 -2
- data/lib/aws-sdk-s3/errors.rb +4 -13
- data/lib/aws-sdk-s3/multipart_upload.rb +240 -242
- data/lib/aws-sdk-s3/multipart_upload_part.rb +273 -275
- data/lib/aws-sdk-s3/object.rb +879 -881
- data/lib/aws-sdk-s3/object_acl.rb +186 -188
- data/lib/aws-sdk-s3/object_summary.rb +751 -753
- data/lib/aws-sdk-s3/object_version.rb +356 -358
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +1 -1
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +1 -1
- data/lib/aws-sdk-s3/presigner.rb +6 -2
- data/lib/aws-sdk-s3/resource.rb +79 -78
- data/lib/aws-sdk-s3/types.rb +7678 -6939
- data/lib/aws-sdk-s3/waiters.rb +150 -151
- metadata +4 -4
| @@ -1,168 +1,166 @@ | |
| 1 1 | 
             
            # WARNING ABOUT GENERATED CODE
         | 
| 2 2 | 
             
            #
         | 
| 3 | 
            -
            # This file is generated. See the contributing for  | 
| 3 | 
            +
            # This file is generated. See the contributing guide for more information:
         | 
| 4 4 | 
             
            # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
         | 
| 5 5 | 
             
            #
         | 
| 6 6 | 
             
            # WARNING ABOUT GENERATED CODE
         | 
| 7 7 |  | 
| 8 | 
            -
            module Aws
         | 
| 9 | 
            -
               | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
                   | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
                  end
         | 
| 8 | 
            +
            module Aws::S3
         | 
| 9 | 
            +
              class BucketAcl
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                extend Aws::Deprecations
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                # @overload def initialize(bucket_name, options = {})
         | 
| 14 | 
            +
                #   @param [String] bucket_name
         | 
| 15 | 
            +
                #   @option options [Client] :client
         | 
| 16 | 
            +
                # @overload def initialize(options = {})
         | 
| 17 | 
            +
                #   @option options [required, String] :bucket_name
         | 
| 18 | 
            +
                #   @option options [Client] :client
         | 
| 19 | 
            +
                def initialize(*args)
         | 
| 20 | 
            +
                  options = Hash === args.last ? args.pop.dup : {}
         | 
| 21 | 
            +
                  @bucket_name = extract_bucket_name(args, options)
         | 
| 22 | 
            +
                  @data = options.delete(:data)
         | 
| 23 | 
            +
                  @client = options.delete(:client) || Client.new(options)
         | 
| 24 | 
            +
                end
         | 
| 26 25 |  | 
| 27 | 
            -
             | 
| 26 | 
            +
                # @!group Read-Only Attributes
         | 
| 28 27 |  | 
| 29 | 
            -
             | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 32 | 
            -
             | 
| 28 | 
            +
                # @return [String]
         | 
| 29 | 
            +
                def bucket_name
         | 
| 30 | 
            +
                  @bucket_name
         | 
| 31 | 
            +
                end
         | 
| 33 32 |  | 
| 34 | 
            -
             | 
| 35 | 
            -
             | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 33 | 
            +
                # @return [Types::Owner]
         | 
| 34 | 
            +
                def owner
         | 
| 35 | 
            +
                  data.owner
         | 
| 36 | 
            +
                end
         | 
| 38 37 |  | 
| 39 | 
            -
             | 
| 40 | 
            -
             | 
| 41 | 
            -
             | 
| 42 | 
            -
             | 
| 43 | 
            -
             | 
| 38 | 
            +
                # A list of grants.
         | 
| 39 | 
            +
                # @return [Array<Types::Grant>]
         | 
| 40 | 
            +
                def grants
         | 
| 41 | 
            +
                  data.grants
         | 
| 42 | 
            +
                end
         | 
| 44 43 |  | 
| 45 | 
            -
             | 
| 44 | 
            +
                # @!endgroup
         | 
| 46 45 |  | 
| 47 | 
            -
             | 
| 48 | 
            -
             | 
| 49 | 
            -
             | 
| 50 | 
            -
             | 
| 46 | 
            +
                # @return [Client]
         | 
| 47 | 
            +
                def client
         | 
| 48 | 
            +
                  @client
         | 
| 49 | 
            +
                end
         | 
| 51 50 |  | 
| 52 | 
            -
             | 
| 53 | 
            -
             | 
| 54 | 
            -
             | 
| 55 | 
            -
             | 
| 56 | 
            -
             | 
| 57 | 
            -
             | 
| 58 | 
            -
             | 
| 59 | 
            -
             | 
| 60 | 
            -
             | 
| 61 | 
            -
             | 
| 62 | 
            -
             | 
| 63 | 
            -
             | 
| 64 | 
            -
             | 
| 65 | 
            -
             | 
| 66 | 
            -
             | 
| 67 | 
            -
             | 
| 68 | 
            -
             | 
| 69 | 
            -
             | 
| 70 | 
            -
             | 
| 71 | 
            -
             | 
| 51 | 
            +
                # Loads, or reloads {#data} for the current {BucketAcl}.
         | 
| 52 | 
            +
                # Returns `self` making it possible to chain methods.
         | 
| 53 | 
            +
                #
         | 
| 54 | 
            +
                #     bucket_acl.reload.data
         | 
| 55 | 
            +
                #
         | 
| 56 | 
            +
                # @return [self]
         | 
| 57 | 
            +
                def load
         | 
| 58 | 
            +
                  resp = @client.get_bucket_acl(bucket: @bucket_name)
         | 
| 59 | 
            +
                  @data = resp.data
         | 
| 60 | 
            +
                  self
         | 
| 61 | 
            +
                end
         | 
| 62 | 
            +
                alias :reload :load
         | 
| 63 | 
            +
             | 
| 64 | 
            +
                # @return [Types::GetBucketAclOutput]
         | 
| 65 | 
            +
                #   Returns the data for this {BucketAcl}. Calls
         | 
| 66 | 
            +
                #   {Client#get_bucket_acl} if {#data_loaded?} is `false`.
         | 
| 67 | 
            +
                def data
         | 
| 68 | 
            +
                  load unless @data
         | 
| 69 | 
            +
                  @data
         | 
| 70 | 
            +
                end
         | 
| 72 71 |  | 
| 73 | 
            -
             | 
| 74 | 
            -
             | 
| 75 | 
            -
             | 
| 76 | 
            -
             | 
| 77 | 
            -
             | 
| 78 | 
            -
             | 
| 72 | 
            +
                # @return [Boolean]
         | 
| 73 | 
            +
                #   Returns `true` if this resource is loaded.  Accessing attributes or
         | 
| 74 | 
            +
                #   {#data} on an unloaded resource will trigger a call to {#load}.
         | 
| 75 | 
            +
                def data_loaded?
         | 
| 76 | 
            +
                  !!@data
         | 
| 77 | 
            +
                end
         | 
| 79 78 |  | 
| 80 | 
            -
             | 
| 81 | 
            -
             | 
| 82 | 
            -
             | 
| 83 | 
            -
             | 
| 84 | 
            -
             | 
| 85 | 
            -
             | 
| 86 | 
            -
             | 
| 87 | 
            -
             | 
| 88 | 
            -
             | 
| 89 | 
            -
             | 
| 90 | 
            -
             | 
| 91 | 
            -
             | 
| 92 | 
            -
             | 
| 93 | 
            -
             | 
| 94 | 
            -
             | 
| 95 | 
            -
             | 
| 96 | 
            -
             | 
| 97 | 
            -
             | 
| 98 | 
            -
             | 
| 99 | 
            -
             | 
| 100 | 
            -
             | 
| 101 | 
            -
             | 
| 102 | 
            -
             | 
| 103 | 
            -
             | 
| 104 | 
            -
             | 
| 105 | 
            -
             | 
| 106 | 
            -
             | 
| 107 | 
            -
             | 
| 108 | 
            -
             | 
| 109 | 
            -
             | 
| 110 | 
            -
             | 
| 111 | 
            -
             | 
| 112 | 
            -
             | 
| 113 | 
            -
             | 
| 114 | 
            -
             | 
| 115 | 
            -
             | 
| 116 | 
            -
             | 
| 117 | 
            -
             | 
| 118 | 
            -
             | 
| 119 | 
            -
             | 
| 120 | 
            -
             | 
| 121 | 
            -
             | 
| 122 | 
            -
             | 
| 123 | 
            -
             | 
| 124 | 
            -
             | 
| 125 | 
            -
             | 
| 126 | 
            -
             | 
| 127 | 
            -
             | 
| 128 | 
            -
             | 
| 129 | 
            -
             | 
| 130 | 
            -
             | 
| 131 | 
            -
             | 
| 132 | 
            -
             | 
| 133 | 
            -
             | 
| 79 | 
            +
                # @!group Actions
         | 
| 80 | 
            +
             | 
| 81 | 
            +
                # @example Request syntax with placeholder values
         | 
| 82 | 
            +
                #
         | 
| 83 | 
            +
                #   bucket_acl.put({
         | 
| 84 | 
            +
                #     acl: "private", # accepts private, public-read, public-read-write, authenticated-read
         | 
| 85 | 
            +
                #     access_control_policy: {
         | 
| 86 | 
            +
                #       grants: [
         | 
| 87 | 
            +
                #         {
         | 
| 88 | 
            +
                #           grantee: {
         | 
| 89 | 
            +
                #             display_name: "DisplayName",
         | 
| 90 | 
            +
                #             email_address: "EmailAddress",
         | 
| 91 | 
            +
                #             id: "ID",
         | 
| 92 | 
            +
                #             type: "CanonicalUser", # required, accepts CanonicalUser, AmazonCustomerByEmail, Group
         | 
| 93 | 
            +
                #             uri: "URI",
         | 
| 94 | 
            +
                #           },
         | 
| 95 | 
            +
                #           permission: "FULL_CONTROL", # accepts FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP
         | 
| 96 | 
            +
                #         },
         | 
| 97 | 
            +
                #       ],
         | 
| 98 | 
            +
                #       owner: {
         | 
| 99 | 
            +
                #         display_name: "DisplayName",
         | 
| 100 | 
            +
                #         id: "ID",
         | 
| 101 | 
            +
                #       },
         | 
| 102 | 
            +
                #     },
         | 
| 103 | 
            +
                #     content_md5: "ContentMD5",
         | 
| 104 | 
            +
                #     grant_full_control: "GrantFullControl",
         | 
| 105 | 
            +
                #     grant_read: "GrantRead",
         | 
| 106 | 
            +
                #     grant_read_acp: "GrantReadACP",
         | 
| 107 | 
            +
                #     grant_write: "GrantWrite",
         | 
| 108 | 
            +
                #     grant_write_acp: "GrantWriteACP",
         | 
| 109 | 
            +
                #   })
         | 
| 110 | 
            +
                # @param [Hash] options ({})
         | 
| 111 | 
            +
                # @option options [String] :acl
         | 
| 112 | 
            +
                #   The canned ACL to apply to the bucket.
         | 
| 113 | 
            +
                # @option options [Types::AccessControlPolicy] :access_control_policy
         | 
| 114 | 
            +
                # @option options [String] :content_md5
         | 
| 115 | 
            +
                # @option options [String] :grant_full_control
         | 
| 116 | 
            +
                #   Allows grantee the read, write, read ACP, and write ACP permissions on
         | 
| 117 | 
            +
                #   the bucket.
         | 
| 118 | 
            +
                # @option options [String] :grant_read
         | 
| 119 | 
            +
                #   Allows grantee to list the objects in the bucket.
         | 
| 120 | 
            +
                # @option options [String] :grant_read_acp
         | 
| 121 | 
            +
                #   Allows grantee to read the bucket ACL.
         | 
| 122 | 
            +
                # @option options [String] :grant_write
         | 
| 123 | 
            +
                #   Allows grantee to create, overwrite, and delete any object in the
         | 
| 124 | 
            +
                #   bucket.
         | 
| 125 | 
            +
                # @option options [String] :grant_write_acp
         | 
| 126 | 
            +
                #   Allows grantee to write the ACL for the applicable bucket.
         | 
| 127 | 
            +
                # @return [EmptyStructure]
         | 
| 128 | 
            +
                def put(options = {})
         | 
| 129 | 
            +
                  options = options.merge(bucket: @bucket_name)
         | 
| 130 | 
            +
                  resp = @client.put_bucket_acl(options)
         | 
| 131 | 
            +
                  resp.data
         | 
| 132 | 
            +
                end
         | 
| 134 133 |  | 
| 135 | 
            -
             | 
| 134 | 
            +
                # @!group Associations
         | 
| 136 135 |  | 
| 137 | 
            -
             | 
| 138 | 
            -
             | 
| 139 | 
            -
             | 
| 140 | 
            -
             | 
| 141 | 
            -
             | 
| 142 | 
            -
             | 
| 143 | 
            -
             | 
| 136 | 
            +
                # @return [Bucket]
         | 
| 137 | 
            +
                def bucket
         | 
| 138 | 
            +
                  Bucket.new(
         | 
| 139 | 
            +
                    name: @bucket_name,
         | 
| 140 | 
            +
                    client: @client
         | 
| 141 | 
            +
                  )
         | 
| 142 | 
            +
                end
         | 
| 144 143 |  | 
| 145 | 
            -
             | 
| 146 | 
            -
             | 
| 147 | 
            -
             | 
| 148 | 
            -
             | 
| 149 | 
            -
             | 
| 150 | 
            -
             | 
| 151 | 
            -
             | 
| 152 | 
            -
             | 
| 153 | 
            -
             | 
| 154 | 
            -
             | 
| 155 | 
            -
             | 
| 156 | 
            -
             | 
| 157 | 
            -
             | 
| 158 | 
            -
             | 
| 159 | 
            -
             | 
| 160 | 
            -
             | 
| 161 | 
            -
             | 
| 162 | 
            -
                    end
         | 
| 144 | 
            +
                # @deprecated
         | 
| 145 | 
            +
                # @api private
         | 
| 146 | 
            +
                def identifiers
         | 
| 147 | 
            +
                  { bucket_name: @bucket_name }
         | 
| 148 | 
            +
                end
         | 
| 149 | 
            +
                deprecated(:identifiers)
         | 
| 150 | 
            +
             | 
| 151 | 
            +
                private
         | 
| 152 | 
            +
             | 
| 153 | 
            +
                def extract_bucket_name(args, options)
         | 
| 154 | 
            +
                  value = args[0] || options.delete(:bucket_name)
         | 
| 155 | 
            +
                  case value
         | 
| 156 | 
            +
                  when String then value
         | 
| 157 | 
            +
                  when nil then raise ArgumentError, "missing required option :bucket_name"
         | 
| 158 | 
            +
                  else
         | 
| 159 | 
            +
                    msg = "expected :bucket_name to be a String, got #{value.class}"
         | 
| 160 | 
            +
                    raise ArgumentError, msg
         | 
| 163 161 | 
             
                  end
         | 
| 164 | 
            -
             | 
| 165 | 
            -
                  class Collection < Aws::Resources::Collection; end
         | 
| 166 162 | 
             
                end
         | 
| 163 | 
            +
             | 
| 164 | 
            +
                class Collection < Aws::Resources::Collection; end
         | 
| 167 165 | 
             
              end
         | 
| 168 166 | 
             
            end
         | 
| @@ -1,146 +1,144 @@ | |
| 1 1 | 
             
            # WARNING ABOUT GENERATED CODE
         | 
| 2 2 | 
             
            #
         | 
| 3 | 
            -
            # This file is generated. See the contributing for  | 
| 3 | 
            +
            # This file is generated. See the contributing guide for more information:
         | 
| 4 4 | 
             
            # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
         | 
| 5 5 | 
             
            #
         | 
| 6 6 | 
             
            # WARNING ABOUT GENERATED CODE
         | 
| 7 7 |  | 
| 8 | 
            -
            module Aws
         | 
| 9 | 
            -
               | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
                   | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
                  end
         | 
| 8 | 
            +
            module Aws::S3
         | 
| 9 | 
            +
              class BucketCors
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                extend Aws::Deprecations
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                # @overload def initialize(bucket_name, options = {})
         | 
| 14 | 
            +
                #   @param [String] bucket_name
         | 
| 15 | 
            +
                #   @option options [Client] :client
         | 
| 16 | 
            +
                # @overload def initialize(options = {})
         | 
| 17 | 
            +
                #   @option options [required, String] :bucket_name
         | 
| 18 | 
            +
                #   @option options [Client] :client
         | 
| 19 | 
            +
                def initialize(*args)
         | 
| 20 | 
            +
                  options = Hash === args.last ? args.pop.dup : {}
         | 
| 21 | 
            +
                  @bucket_name = extract_bucket_name(args, options)
         | 
| 22 | 
            +
                  @data = options.delete(:data)
         | 
| 23 | 
            +
                  @client = options.delete(:client) || Client.new(options)
         | 
| 24 | 
            +
                end
         | 
| 26 25 |  | 
| 27 | 
            -
             | 
| 26 | 
            +
                # @!group Read-Only Attributes
         | 
| 28 27 |  | 
| 29 | 
            -
             | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 32 | 
            -
             | 
| 28 | 
            +
                # @return [String]
         | 
| 29 | 
            +
                def bucket_name
         | 
| 30 | 
            +
                  @bucket_name
         | 
| 31 | 
            +
                end
         | 
| 33 32 |  | 
| 34 | 
            -
             | 
| 35 | 
            -
             | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 33 | 
            +
                # @return [Array<Types::CORSRule>]
         | 
| 34 | 
            +
                def cors_rules
         | 
| 35 | 
            +
                  data.cors_rules
         | 
| 36 | 
            +
                end
         | 
| 38 37 |  | 
| 39 | 
            -
             | 
| 38 | 
            +
                # @!endgroup
         | 
| 40 39 |  | 
| 41 | 
            -
             | 
| 42 | 
            -
             | 
| 43 | 
            -
             | 
| 44 | 
            -
             | 
| 40 | 
            +
                # @return [Client]
         | 
| 41 | 
            +
                def client
         | 
| 42 | 
            +
                  @client
         | 
| 43 | 
            +
                end
         | 
| 45 44 |  | 
| 46 | 
            -
             | 
| 47 | 
            -
             | 
| 48 | 
            -
             | 
| 49 | 
            -
             | 
| 50 | 
            -
             | 
| 51 | 
            -
             | 
| 52 | 
            -
             | 
| 53 | 
            -
             | 
| 54 | 
            -
             | 
| 55 | 
            -
             | 
| 56 | 
            -
             | 
| 57 | 
            -
             | 
| 58 | 
            -
             | 
| 59 | 
            -
             | 
| 60 | 
            -
             | 
| 61 | 
            -
             | 
| 62 | 
            -
             | 
| 63 | 
            -
             | 
| 64 | 
            -
             | 
| 65 | 
            -
             | 
| 45 | 
            +
                # Loads, or reloads {#data} for the current {BucketCors}.
         | 
| 46 | 
            +
                # Returns `self` making it possible to chain methods.
         | 
| 47 | 
            +
                #
         | 
| 48 | 
            +
                #     bucket_cors.reload.data
         | 
| 49 | 
            +
                #
         | 
| 50 | 
            +
                # @return [self]
         | 
| 51 | 
            +
                def load
         | 
| 52 | 
            +
                  resp = @client.get_bucket_cors(bucket: @bucket_name)
         | 
| 53 | 
            +
                  @data = resp.data
         | 
| 54 | 
            +
                  self
         | 
| 55 | 
            +
                end
         | 
| 56 | 
            +
                alias :reload :load
         | 
| 57 | 
            +
             | 
| 58 | 
            +
                # @return [Types::GetBucketCorsOutput]
         | 
| 59 | 
            +
                #   Returns the data for this {BucketCors}. Calls
         | 
| 60 | 
            +
                #   {Client#get_bucket_cors} if {#data_loaded?} is `false`.
         | 
| 61 | 
            +
                def data
         | 
| 62 | 
            +
                  load unless @data
         | 
| 63 | 
            +
                  @data
         | 
| 64 | 
            +
                end
         | 
| 66 65 |  | 
| 67 | 
            -
             | 
| 68 | 
            -
             | 
| 69 | 
            -
             | 
| 70 | 
            -
             | 
| 71 | 
            -
             | 
| 72 | 
            -
             | 
| 66 | 
            +
                # @return [Boolean]
         | 
| 67 | 
            +
                #   Returns `true` if this resource is loaded.  Accessing attributes or
         | 
| 68 | 
            +
                #   {#data} on an unloaded resource will trigger a call to {#load}.
         | 
| 69 | 
            +
                def data_loaded?
         | 
| 70 | 
            +
                  !!@data
         | 
| 71 | 
            +
                end
         | 
| 73 72 |  | 
| 74 | 
            -
             | 
| 75 | 
            -
             | 
| 76 | 
            -
             | 
| 77 | 
            -
             | 
| 78 | 
            -
             | 
| 79 | 
            -
             | 
| 80 | 
            -
             | 
| 81 | 
            -
             | 
| 82 | 
            -
             | 
| 83 | 
            -
             | 
| 84 | 
            -
             | 
| 85 | 
            -
             | 
| 73 | 
            +
                # @!group Actions
         | 
| 74 | 
            +
             | 
| 75 | 
            +
                # @example Request syntax with placeholder values
         | 
| 76 | 
            +
                #
         | 
| 77 | 
            +
                #   bucket_cors.delete()
         | 
| 78 | 
            +
                # @param [Hash] options ({})
         | 
| 79 | 
            +
                # @return [EmptyStructure]
         | 
| 80 | 
            +
                def delete(options = {})
         | 
| 81 | 
            +
                  options = options.merge(bucket: @bucket_name)
         | 
| 82 | 
            +
                  resp = @client.delete_bucket_cors(options)
         | 
| 83 | 
            +
                  resp.data
         | 
| 84 | 
            +
                end
         | 
| 86 85 |  | 
| 87 | 
            -
             | 
| 88 | 
            -
             | 
| 89 | 
            -
             | 
| 90 | 
            -
             | 
| 91 | 
            -
             | 
| 92 | 
            -
             | 
| 93 | 
            -
             | 
| 94 | 
            -
             | 
| 95 | 
            -
             | 
| 96 | 
            -
             | 
| 97 | 
            -
             | 
| 98 | 
            -
             | 
| 99 | 
            -
             | 
| 100 | 
            -
             | 
| 101 | 
            -
             | 
| 102 | 
            -
             | 
| 103 | 
            -
             | 
| 104 | 
            -
             | 
| 105 | 
            -
             | 
| 106 | 
            -
             | 
| 107 | 
            -
             | 
| 108 | 
            -
             | 
| 109 | 
            -
             | 
| 110 | 
            -
             | 
| 111 | 
            -
             | 
| 86 | 
            +
                # @example Request syntax with placeholder values
         | 
| 87 | 
            +
                #
         | 
| 88 | 
            +
                #   bucket_cors.put({
         | 
| 89 | 
            +
                #     cors_configuration: { # required
         | 
| 90 | 
            +
                #       cors_rules: [ # required
         | 
| 91 | 
            +
                #         {
         | 
| 92 | 
            +
                #           allowed_headers: ["AllowedHeader"],
         | 
| 93 | 
            +
                #           allowed_methods: ["AllowedMethod"], # required
         | 
| 94 | 
            +
                #           allowed_origins: ["AllowedOrigin"], # required
         | 
| 95 | 
            +
                #           expose_headers: ["ExposeHeader"],
         | 
| 96 | 
            +
                #           max_age_seconds: 1,
         | 
| 97 | 
            +
                #         },
         | 
| 98 | 
            +
                #       ],
         | 
| 99 | 
            +
                #     },
         | 
| 100 | 
            +
                #     content_md5: "ContentMD5",
         | 
| 101 | 
            +
                #   })
         | 
| 102 | 
            +
                # @param [Hash] options ({})
         | 
| 103 | 
            +
                # @option options [required, Types::CORSConfiguration] :cors_configuration
         | 
| 104 | 
            +
                # @option options [String] :content_md5
         | 
| 105 | 
            +
                # @return [EmptyStructure]
         | 
| 106 | 
            +
                def put(options = {})
         | 
| 107 | 
            +
                  options = options.merge(bucket: @bucket_name)
         | 
| 108 | 
            +
                  resp = @client.put_bucket_cors(options)
         | 
| 109 | 
            +
                  resp.data
         | 
| 110 | 
            +
                end
         | 
| 112 111 |  | 
| 113 | 
            -
             | 
| 112 | 
            +
                # @!group Associations
         | 
| 114 113 |  | 
| 115 | 
            -
             | 
| 116 | 
            -
             | 
| 117 | 
            -
             | 
| 118 | 
            -
             | 
| 119 | 
            -
             | 
| 120 | 
            -
             | 
| 121 | 
            -
             | 
| 114 | 
            +
                # @return [Bucket]
         | 
| 115 | 
            +
                def bucket
         | 
| 116 | 
            +
                  Bucket.new(
         | 
| 117 | 
            +
                    name: @bucket_name,
         | 
| 118 | 
            +
                    client: @client
         | 
| 119 | 
            +
                  )
         | 
| 120 | 
            +
                end
         | 
| 122 121 |  | 
| 123 | 
            -
             | 
| 124 | 
            -
             | 
| 125 | 
            -
             | 
| 126 | 
            -
             | 
| 127 | 
            -
             | 
| 128 | 
            -
             | 
| 129 | 
            -
             | 
| 130 | 
            -
             | 
| 131 | 
            -
             | 
| 132 | 
            -
             | 
| 133 | 
            -
             | 
| 134 | 
            -
             | 
| 135 | 
            -
             | 
| 136 | 
            -
             | 
| 137 | 
            -
             | 
| 138 | 
            -
             | 
| 139 | 
            -
             | 
| 140 | 
            -
                    end
         | 
| 122 | 
            +
                # @deprecated
         | 
| 123 | 
            +
                # @api private
         | 
| 124 | 
            +
                def identifiers
         | 
| 125 | 
            +
                  { bucket_name: @bucket_name }
         | 
| 126 | 
            +
                end
         | 
| 127 | 
            +
                deprecated(:identifiers)
         | 
| 128 | 
            +
             | 
| 129 | 
            +
                private
         | 
| 130 | 
            +
             | 
| 131 | 
            +
                def extract_bucket_name(args, options)
         | 
| 132 | 
            +
                  value = args[0] || options.delete(:bucket_name)
         | 
| 133 | 
            +
                  case value
         | 
| 134 | 
            +
                  when String then value
         | 
| 135 | 
            +
                  when nil then raise ArgumentError, "missing required option :bucket_name"
         | 
| 136 | 
            +
                  else
         | 
| 137 | 
            +
                    msg = "expected :bucket_name to be a String, got #{value.class}"
         | 
| 138 | 
            +
                    raise ArgumentError, msg
         | 
| 141 139 | 
             
                  end
         | 
| 142 | 
            -
             | 
| 143 | 
            -
                  class Collection < Aws::Resources::Collection; end
         | 
| 144 140 | 
             
                end
         | 
| 141 | 
            +
             | 
| 142 | 
            +
                class Collection < Aws::Resources::Collection; end
         | 
| 145 143 | 
             
              end
         | 
| 146 144 | 
             
            end
         |