AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
CreateBucketRequest.h
1
6#pragma once
7#include <aws/s3/S3_EXPORTS.h>
8#include <aws/s3/S3Request.h>
9#include <aws/s3/model/BucketCannedACL.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/s3/model/CreateBucketConfiguration.h>
12#include <aws/s3/model/ObjectOwnership.h>
13#include <aws/core/utils/memory/stl/AWSMap.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Http
19{
20 class URI;
21} //namespace Http
22namespace S3
23{
24namespace Model
25{
26
30 {
31 public:
32 AWS_S3_API CreateBucketRequest();
33
34 // Service request name is the Operation name which will send this request out,
35 // each operation should has unique request name, so that we can get operation's name from this request.
36 // Note: this is not true for response, multiple operations may have the same response name,
37 // so we can not get operation's name from response.
38 inline virtual const char* GetServiceRequestName() const override { return "CreateBucket"; }
39
40 AWS_S3_API Aws::String SerializePayload() const override;
41
42 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
43
45
46 AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override;
50 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
51
53
57 inline const BucketCannedACL& GetACL() const{ return m_aCL; }
58 inline bool ACLHasBeenSet() const { return m_aCLHasBeenSet; }
59 inline void SetACL(const BucketCannedACL& value) { m_aCLHasBeenSet = true; m_aCL = value; }
60 inline void SetACL(BucketCannedACL&& value) { m_aCLHasBeenSet = true; m_aCL = std::move(value); }
61 inline CreateBucketRequest& WithACL(const BucketCannedACL& value) { SetACL(value); return *this;}
62 inline CreateBucketRequest& WithACL(BucketCannedACL&& value) { SetACL(std::move(value)); return *this;}
64
66
82 inline const Aws::String& GetBucket() const{ return m_bucket; }
83 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
84 inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
85 inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
86 inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
87 inline CreateBucketRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
88 inline CreateBucketRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
89 inline CreateBucketRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
91
93
96 inline const CreateBucketConfiguration& GetCreateBucketConfiguration() const{ return m_createBucketConfiguration; }
97 inline bool CreateBucketConfigurationHasBeenSet() const { return m_createBucketConfigurationHasBeenSet; }
98 inline void SetCreateBucketConfiguration(const CreateBucketConfiguration& value) { m_createBucketConfigurationHasBeenSet = true; m_createBucketConfiguration = value; }
99 inline void SetCreateBucketConfiguration(CreateBucketConfiguration&& value) { m_createBucketConfigurationHasBeenSet = true; m_createBucketConfiguration = std::move(value); }
103
105
110 inline const Aws::String& GetGrantFullControl() const{ return m_grantFullControl; }
111 inline bool GrantFullControlHasBeenSet() const { return m_grantFullControlHasBeenSet; }
112 inline void SetGrantFullControl(const Aws::String& value) { m_grantFullControlHasBeenSet = true; m_grantFullControl = value; }
113 inline void SetGrantFullControl(Aws::String&& value) { m_grantFullControlHasBeenSet = true; m_grantFullControl = std::move(value); }
114 inline void SetGrantFullControl(const char* value) { m_grantFullControlHasBeenSet = true; m_grantFullControl.assign(value); }
115 inline CreateBucketRequest& WithGrantFullControl(const Aws::String& value) { SetGrantFullControl(value); return *this;}
116 inline CreateBucketRequest& WithGrantFullControl(Aws::String&& value) { SetGrantFullControl(std::move(value)); return *this;}
117 inline CreateBucketRequest& WithGrantFullControl(const char* value) { SetGrantFullControl(value); return *this;}
119
121
125 inline const Aws::String& GetGrantRead() const{ return m_grantRead; }
126 inline bool GrantReadHasBeenSet() const { return m_grantReadHasBeenSet; }
127 inline void SetGrantRead(const Aws::String& value) { m_grantReadHasBeenSet = true; m_grantRead = value; }
128 inline void SetGrantRead(Aws::String&& value) { m_grantReadHasBeenSet = true; m_grantRead = std::move(value); }
129 inline void SetGrantRead(const char* value) { m_grantReadHasBeenSet = true; m_grantRead.assign(value); }
130 inline CreateBucketRequest& WithGrantRead(const Aws::String& value) { SetGrantRead(value); return *this;}
131 inline CreateBucketRequest& WithGrantRead(Aws::String&& value) { SetGrantRead(std::move(value)); return *this;}
132 inline CreateBucketRequest& WithGrantRead(const char* value) { SetGrantRead(value); return *this;}
134
136
140 inline const Aws::String& GetGrantReadACP() const{ return m_grantReadACP; }
141 inline bool GrantReadACPHasBeenSet() const { return m_grantReadACPHasBeenSet; }
142 inline void SetGrantReadACP(const Aws::String& value) { m_grantReadACPHasBeenSet = true; m_grantReadACP = value; }
143 inline void SetGrantReadACP(Aws::String&& value) { m_grantReadACPHasBeenSet = true; m_grantReadACP = std::move(value); }
144 inline void SetGrantReadACP(const char* value) { m_grantReadACPHasBeenSet = true; m_grantReadACP.assign(value); }
145 inline CreateBucketRequest& WithGrantReadACP(const Aws::String& value) { SetGrantReadACP(value); return *this;}
146 inline CreateBucketRequest& WithGrantReadACP(Aws::String&& value) { SetGrantReadACP(std::move(value)); return *this;}
147 inline CreateBucketRequest& WithGrantReadACP(const char* value) { SetGrantReadACP(value); return *this;}
149
151
157 inline const Aws::String& GetGrantWrite() const{ return m_grantWrite; }
158 inline bool GrantWriteHasBeenSet() const { return m_grantWriteHasBeenSet; }
159 inline void SetGrantWrite(const Aws::String& value) { m_grantWriteHasBeenSet = true; m_grantWrite = value; }
160 inline void SetGrantWrite(Aws::String&& value) { m_grantWriteHasBeenSet = true; m_grantWrite = std::move(value); }
161 inline void SetGrantWrite(const char* value) { m_grantWriteHasBeenSet = true; m_grantWrite.assign(value); }
162 inline CreateBucketRequest& WithGrantWrite(const Aws::String& value) { SetGrantWrite(value); return *this;}
163 inline CreateBucketRequest& WithGrantWrite(Aws::String&& value) { SetGrantWrite(std::move(value)); return *this;}
164 inline CreateBucketRequest& WithGrantWrite(const char* value) { SetGrantWrite(value); return *this;}
166
168
172 inline const Aws::String& GetGrantWriteACP() const{ return m_grantWriteACP; }
173 inline bool GrantWriteACPHasBeenSet() const { return m_grantWriteACPHasBeenSet; }
174 inline void SetGrantWriteACP(const Aws::String& value) { m_grantWriteACPHasBeenSet = true; m_grantWriteACP = value; }
175 inline void SetGrantWriteACP(Aws::String&& value) { m_grantWriteACPHasBeenSet = true; m_grantWriteACP = std::move(value); }
176 inline void SetGrantWriteACP(const char* value) { m_grantWriteACPHasBeenSet = true; m_grantWriteACP.assign(value); }
177 inline CreateBucketRequest& WithGrantWriteACP(const Aws::String& value) { SetGrantWriteACP(value); return *this;}
178 inline CreateBucketRequest& WithGrantWriteACP(Aws::String&& value) { SetGrantWriteACP(std::move(value)); return *this;}
179 inline CreateBucketRequest& WithGrantWriteACP(const char* value) { SetGrantWriteACP(value); return *this;}
181
183
188 inline bool GetObjectLockEnabledForBucket() const{ return m_objectLockEnabledForBucket; }
189 inline bool ObjectLockEnabledForBucketHasBeenSet() const { return m_objectLockEnabledForBucketHasBeenSet; }
190 inline void SetObjectLockEnabledForBucket(bool value) { m_objectLockEnabledForBucketHasBeenSet = true; m_objectLockEnabledForBucket = value; }
193
195
196 inline const ObjectOwnership& GetObjectOwnership() const{ return m_objectOwnership; }
197 inline bool ObjectOwnershipHasBeenSet() const { return m_objectOwnershipHasBeenSet; }
198 inline void SetObjectOwnership(const ObjectOwnership& value) { m_objectOwnershipHasBeenSet = true; m_objectOwnership = value; }
199 inline void SetObjectOwnership(ObjectOwnership&& value) { m_objectOwnershipHasBeenSet = true; m_objectOwnership = std::move(value); }
200 inline CreateBucketRequest& WithObjectOwnership(const ObjectOwnership& value) { SetObjectOwnership(value); return *this;}
201 inline CreateBucketRequest& WithObjectOwnership(ObjectOwnership&& value) { SetObjectOwnership(std::move(value)); return *this;}
203
205
206 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; }
207 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
208 inline void SetCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; }
209 inline void SetCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); }
212 inline CreateBucketRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
213 inline CreateBucketRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
214 inline CreateBucketRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
215 inline CreateBucketRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; }
216 inline CreateBucketRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
217 inline CreateBucketRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
218 inline CreateBucketRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
220 private:
221
222 BucketCannedACL m_aCL;
223 bool m_aCLHasBeenSet = false;
224
225 Aws::String m_bucket;
226 bool m_bucketHasBeenSet = false;
227
228 CreateBucketConfiguration m_createBucketConfiguration;
229 bool m_createBucketConfigurationHasBeenSet = false;
230
231 Aws::String m_grantFullControl;
232 bool m_grantFullControlHasBeenSet = false;
233
234 Aws::String m_grantRead;
235 bool m_grantReadHasBeenSet = false;
236
237 Aws::String m_grantReadACP;
238 bool m_grantReadACPHasBeenSet = false;
239
240 Aws::String m_grantWrite;
241 bool m_grantWriteHasBeenSet = false;
242
243 Aws::String m_grantWriteACP;
244 bool m_grantWriteACPHasBeenSet = false;
245
246 bool m_objectLockEnabledForBucket;
247 bool m_objectLockEnabledForBucketHasBeenSet = false;
248
249 ObjectOwnership m_objectOwnership;
250 bool m_objectOwnershipHasBeenSet = false;
251
252 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
253 bool m_customizedAccessLogTagHasBeenSet = false;
254 };
255
256} // namespace Model
257} // namespace S3
258} // namespace Aws
void SetGrantFullControl(const char *value)
void SetACL(const BucketCannedACL &value)
const BucketCannedACL & GetACL() const
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
CreateBucketRequest & WithGrantWrite(Aws::String &&value)
CreateBucketRequest & WithGrantReadACP(const char *value)
void SetACL(BucketCannedACL &&value)
void SetCreateBucketConfiguration(CreateBucketConfiguration &&value)
void SetCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
CreateBucketRequest & WithObjectOwnership(const ObjectOwnership &value)
const Aws::String & GetBucket() const
void SetCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)
CreateBucketRequest & WithACL(BucketCannedACL &&value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
void SetCreateBucketConfiguration(const CreateBucketConfiguration &value)
void SetGrantWriteACP(Aws::String &&value)
CreateBucketRequest & WithGrantReadACP(const Aws::String &value)
CreateBucketRequest & WithGrantWriteACP(const Aws::String &value)
CreateBucketRequest & AddCustomizedAccessLogTag(const char *key, Aws::String &&value)
CreateBucketRequest & WithCreateBucketConfiguration(CreateBucketConfiguration &&value)
CreateBucketRequest & AddCustomizedAccessLogTag(Aws::String &&key, Aws::String &&value)
CreateBucketRequest & WithCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
void SetGrantReadACP(const Aws::String &value)
const Aws::String & GetGrantFullControl() const
const ObjectOwnership & GetObjectOwnership() const
CreateBucketRequest & AddCustomizedAccessLogTag(Aws::String &&key, const Aws::String &value)
AWS_S3_API Aws::String SerializePayload() const override
const Aws::String & GetGrantReadACP() const
void SetGrantRead(const Aws::String &value)
CreateBucketRequest & WithGrantFullControl(Aws::String &&value)
CreateBucketRequest & AddCustomizedAccessLogTag(const Aws::String &key, const Aws::String &value)
CreateBucketRequest & WithGrantRead(const Aws::String &value)
void SetGrantFullControl(const Aws::String &value)
const Aws::String & GetGrantRead() const
virtual const char * GetServiceRequestName() const override
void SetObjectOwnership(ObjectOwnership &&value)
void SetGrantWriteACP(const Aws::String &value)
CreateBucketRequest & WithObjectLockEnabledForBucket(bool value)
CreateBucketRequest & WithBucket(Aws::String &&value)
void SetGrantFullControl(Aws::String &&value)
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
void SetGrantReadACP(Aws::String &&value)
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateBucketRequest & WithGrantReadACP(Aws::String &&value)
CreateBucketRequest & WithACL(const BucketCannedACL &value)
CreateBucketRequest & WithGrantWriteACP(Aws::String &&value)
void SetGrantWrite(const Aws::String &value)
CreateBucketRequest & AddCustomizedAccessLogTag(const Aws::String &key, Aws::String &&value)
void SetObjectOwnership(const ObjectOwnership &value)
CreateBucketRequest & WithGrantWrite(const Aws::String &value)
CreateBucketRequest & WithGrantWriteACP(const char *value)
CreateBucketRequest & WithBucket(const Aws::String &value)
const Aws::String & GetGrantWrite() const
CreateBucketRequest & AddCustomizedAccessLogTag(const char *key, const char *value)
void SetGrantWrite(Aws::String &&value)
CreateBucketRequest & WithBucket(const char *value)
const CreateBucketConfiguration & GetCreateBucketConfiguration() const
CreateBucketRequest & WithObjectOwnership(ObjectOwnership &&value)
CreateBucketRequest & WithGrantRead(Aws::String &&value)
const Aws::String & GetGrantWriteACP() const
CreateBucketRequest & WithCreateBucketConfiguration(const CreateBucketConfiguration &value)
CreateBucketRequest & WithGrantFullControl(const char *value)
CreateBucketRequest & WithGrantWrite(const char *value)
CreateBucketRequest & WithGrantFullControl(const Aws::String &value)
CreateBucketRequest & WithCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)
CreateBucketRequest & AddCustomizedAccessLogTag(Aws::String &&key, const char *value)
void SetBucket(const Aws::String &value)
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
CreateBucketRequest & WithGrantRead(const char *value)
Aws::Endpoint::EndpointParameters EndpointParameters
Definition S3Request.h:22
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_iostream< char, std::char_traits< char > > IOStream
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String