| 1 | |||
| 2 | package Paws::S3::CreateBucket; | ||
| 3 | 2 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | has ACL => (is => 'ro', isa => 'Str', header_name => 'x-amz-acl', traits => ['ParamInHeader']); | |
| 5 | 2 | has Bucket => (is => 'ro', isa => 'Str', uri_name => 'Bucket', traits => ['ParamInURI'], required => 1); | |
| 6 | 2 | has ContentLength => (is => 'ro', isa => 'Int', header_name => 'Content-Length', traits => ['ParamInHeader']); | |
| 7 | 2 | has CreateBucketConfiguration => (is => 'ro', isa => 'Paws::S3::CreateBucketConfiguration', traits => ['ParamInBody']); | |
| 8 | 2 | has GrantFullControl => (is => 'ro', isa => 'Str', header_name => 'x-amz-grant-full-control', traits => ['ParamInHeader']); | |
| 9 | 2 | has GrantRead => (is => 'ro', isa => 'Str', header_name => 'x-amz-grant-read', traits => ['ParamInHeader']); | |
| 10 | 2 | has GrantReadACP => (is => 'ro', isa => 'Str', header_name => 'x-amz-grant-read-acp', traits => ['ParamInHeader']); | |
| 11 | 2 | has GrantWrite => (is => 'ro', isa => 'Str', header_name => 'x-amz-grant-write', traits => ['ParamInHeader']); | |
| 12 | 2 | has GrantWriteACP => (is => 'ro', isa => 'Str', header_name => 'x-amz-grant-write-acp', traits => ['ParamInHeader']); | |
| 13 | 2 | has ObjectLockEnabledForBucket => (is => 'ro', isa => 'Bool', header_name => 'x-amz-bucket-object-lock-enabled', traits => ['ParamInHeader']); | |
| 14 | |||
| 15 | |||
| 16 | 2 | ▶ | use MooseX::ClassAttribute; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | |||
| 18 | 2 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateBucket'); | |
| 19 | 2 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/{Bucket}'); | |
| 20 | 2 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'PUT'); | |
| 21 | 2 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::S3::CreateBucketOutput'); | |
| 22 | 2 | class_has _result_key => (isa => 'Str', is => 'ro'); | |
| 23 | |||
| 24 | |||
| 25 | 2 | 1; | |
| 26 | |||
| 27 | ### main pod documentation begin ### | ||
| 28 | |||
| 29 | =head1 NAME | ||
| 30 | |||
| 31 | Paws::S3::CreateBucket - Arguments for method CreateBucket on L<Paws::S3> | ||
| 32 | |||
| 33 | =head1 DESCRIPTION | ||
| 34 | |||
| 35 | This class represents the parameters used for calling the method CreateBucket on the | ||
| 36 | L<Amazon Simple Storage Service|Paws::S3> service. Use the attributes of this class | ||
| 37 | as arguments to method CreateBucket. | ||
| 38 | |||
| 39 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateBucket. | ||
| 40 | |||
| 41 | =head1 SYNOPSIS | ||
| 42 | |||
| 43 | my $s3 = Paws->service('S3'); | ||
| 44 | # To create a bucket in a specific region | ||
| 45 | # The following example creates a bucket. The request specifies an AWS region | ||
| 46 | # where to create the bucket. | ||
| 47 | my $CreateBucketOutput = $s3->CreateBucket( | ||
| 48 | 'Bucket' => 'examplebucket', | ||
| 49 | 'CreateBucketConfiguration' => { | ||
| 50 | 'LocationConstraint' => 'eu-west-1' | ||
| 51 | } | ||
| 52 | ); | ||
| 53 | |||
| 54 | # Results: | ||
| 55 | my $Location = $CreateBucketOutput->Location; | ||
| 56 | |||
| 57 | # Returns a L<Paws::S3::CreateBucketOutput> object. | ||
| 58 | # To create a bucket | ||
| 59 | # The following example creates a bucket. | ||
| 60 | my $CreateBucketOutput = $s3->CreateBucket( 'Bucket' => 'examplebucket' ); | ||
| 61 | |||
| 62 | # Results: | ||
| 63 | my $Location = $CreateBucketOutput->Location; | ||
| 64 | |||
| 65 | # Returns a L<Paws::S3::CreateBucketOutput> object. | ||
| 66 | |||
| 67 | Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. | ||
| 68 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/s3/CreateBucket> | ||
| 69 | |||
| 70 | =head1 ATTRIBUTES | ||
| 71 | |||
| 72 | |||
| 73 | =head2 ACL => Str | ||
| 74 | |||
| 75 | The canned ACL to apply to the bucket. | ||
| 76 | |||
| 77 | Valid values are: C<"private">, C<"public-read">, C<"public-read-write">, C<"authenticated-read"> | ||
| 78 | |||
| 79 | =head2 B<REQUIRED> Bucket => Str | ||
| 80 | |||
| 81 | The name of the bucket to create. | ||
| 82 | |||
| 83 | |||
| 84 | |||
| 85 | =head2 ContentLength => Int | ||
| 86 | |||
| 87 | Size of the body in bytes. | ||
| 88 | |||
| 89 | |||
| 90 | |||
| 91 | =head2 CreateBucketConfiguration => L<Paws::S3::CreateBucketConfiguration> | ||
| 92 | |||
| 93 | The configuration information for the bucket. | ||
| 94 | |||
| 95 | |||
| 96 | |||
| 97 | =head2 GrantFullControl => Str | ||
| 98 | |||
| 99 | Allows grantee the read, write, read ACP, and write ACP permissions on | ||
| 100 | the bucket. | ||
| 101 | |||
| 102 | |||
| 103 | |||
| 104 | =head2 GrantRead => Str | ||
| 105 | |||
| 106 | Allows grantee to list the objects in the bucket. | ||
| 107 | |||
| 108 | |||
| 109 | |||
| 110 | =head2 GrantReadACP => Str | ||
| 111 | |||
| 112 | Allows grantee to read the bucket ACL. | ||
| 113 | |||
| 114 | |||
| 115 | |||
| 116 | =head2 GrantWrite => Str | ||
| 117 | |||
| 118 | Allows grantee to create new objects in the bucket. | ||
| 119 | |||
| 120 | For the bucket and object owners of existing objects, also allows | ||
| 121 | deletions and overwrites of those objects. | ||
| 122 | |||
| 123 | |||
| 124 | |||
| 125 | =head2 GrantWriteACP => Str | ||
| 126 | |||
| 127 | Allows grantee to write the ACL for the applicable bucket. | ||
| 128 | |||
| 129 | |||
| 130 | |||
| 131 | =head2 ObjectLockEnabledForBucket => Bool | ||
| 132 | |||
| 133 | Specifies whether you want S3 Object Lock to be enabled for the new | ||
| 134 | bucket. | ||
| 135 | |||
| 136 | |||
| 137 | |||
| 138 | |||
| 139 | =head1 SEE ALSO | ||
| 140 | |||
| 141 | This class forms part of L<Paws>, documenting arguments for method CreateBucket in L<Paws::S3> | ||
| 142 | |||
| 143 | =head1 BUGS and CONTRIBUTIONS | ||
| 144 | |||
| 145 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 146 | |||
| 147 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 148 | |||
| 149 | =cut | ||
| 150 | |||