AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateResourceShareRequest.h
1
6#pragma once
7#include <aws/ram/RAM_EXPORTS.h>
8#include <aws/ram/RAMRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/ram/model/Tag.h>
12#include <utility>
13
14namespace Aws
15{
16namespace RAM
17{
18namespace Model
19{
20
24 {
25 public:
26 AWS_RAM_API CreateResourceShareRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "CreateResourceShare"; }
33
34 AWS_RAM_API Aws::String SerializePayload() const override;
35
36
38
41 inline const Aws::String& GetName() const { return m_name; }
42 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
43 template<typename NameT = Aws::String>
44 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
45 template<typename NameT = Aws::String>
46 CreateResourceShareRequest& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
48
50
54 inline const Aws::Vector<Aws::String>& GetResourceArns() const { return m_resourceArns; }
55 inline bool ResourceArnsHasBeenSet() const { return m_resourceArnsHasBeenSet; }
56 template<typename ResourceArnsT = Aws::Vector<Aws::String>>
57 void SetResourceArns(ResourceArnsT&& value) { m_resourceArnsHasBeenSet = true; m_resourceArns = std::forward<ResourceArnsT>(value); }
58 template<typename ResourceArnsT = Aws::Vector<Aws::String>>
59 CreateResourceShareRequest& WithResourceArns(ResourceArnsT&& value) { SetResourceArns(std::forward<ResourceArnsT>(value)); return *this;}
60 template<typename ResourceArnsT = Aws::String>
61 CreateResourceShareRequest& AddResourceArns(ResourceArnsT&& value) { m_resourceArnsHasBeenSet = true; m_resourceArns.emplace_back(std::forward<ResourceArnsT>(value)); return *this; }
63
65
84 inline const Aws::Vector<Aws::String>& GetPrincipals() const { return m_principals; }
85 inline bool PrincipalsHasBeenSet() const { return m_principalsHasBeenSet; }
86 template<typename PrincipalsT = Aws::Vector<Aws::String>>
87 void SetPrincipals(PrincipalsT&& value) { m_principalsHasBeenSet = true; m_principals = std::forward<PrincipalsT>(value); }
88 template<typename PrincipalsT = Aws::Vector<Aws::String>>
89 CreateResourceShareRequest& WithPrincipals(PrincipalsT&& value) { SetPrincipals(std::forward<PrincipalsT>(value)); return *this;}
90 template<typename PrincipalsT = Aws::String>
91 CreateResourceShareRequest& AddPrincipals(PrincipalsT&& value) { m_principalsHasBeenSet = true; m_principals.emplace_back(std::forward<PrincipalsT>(value)); return *this; }
93
95
99 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
100 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
101 template<typename TagsT = Aws::Vector<Tag>>
102 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
103 template<typename TagsT = Aws::Vector<Tag>>
104 CreateResourceShareRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
105 template<typename TagsT = Tag>
106 CreateResourceShareRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
108
110
118 inline bool GetAllowExternalPrincipals() const { return m_allowExternalPrincipals; }
119 inline bool AllowExternalPrincipalsHasBeenSet() const { return m_allowExternalPrincipalsHasBeenSet; }
120 inline void SetAllowExternalPrincipals(bool value) { m_allowExternalPrincipalsHasBeenSet = true; m_allowExternalPrincipals = value; }
123
125
137 inline const Aws::String& GetClientToken() const { return m_clientToken; }
138 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
139 template<typename ClientTokenT = Aws::String>
140 void SetClientToken(ClientTokenT&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::forward<ClientTokenT>(value); }
141 template<typename ClientTokenT = Aws::String>
142 CreateResourceShareRequest& WithClientToken(ClientTokenT&& value) { SetClientToken(std::forward<ClientTokenT>(value)); return *this;}
144
146
155 inline const Aws::Vector<Aws::String>& GetPermissionArns() const { return m_permissionArns; }
156 inline bool PermissionArnsHasBeenSet() const { return m_permissionArnsHasBeenSet; }
157 template<typename PermissionArnsT = Aws::Vector<Aws::String>>
158 void SetPermissionArns(PermissionArnsT&& value) { m_permissionArnsHasBeenSet = true; m_permissionArns = std::forward<PermissionArnsT>(value); }
159 template<typename PermissionArnsT = Aws::Vector<Aws::String>>
160 CreateResourceShareRequest& WithPermissionArns(PermissionArnsT&& value) { SetPermissionArns(std::forward<PermissionArnsT>(value)); return *this;}
161 template<typename PermissionArnsT = Aws::String>
162 CreateResourceShareRequest& AddPermissionArns(PermissionArnsT&& value) { m_permissionArnsHasBeenSet = true; m_permissionArns.emplace_back(std::forward<PermissionArnsT>(value)); return *this; }
164
166
170 inline const Aws::Vector<Aws::String>& GetSources() const { return m_sources; }
171 inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; }
172 template<typename SourcesT = Aws::Vector<Aws::String>>
173 void SetSources(SourcesT&& value) { m_sourcesHasBeenSet = true; m_sources = std::forward<SourcesT>(value); }
174 template<typename SourcesT = Aws::Vector<Aws::String>>
175 CreateResourceShareRequest& WithSources(SourcesT&& value) { SetSources(std::forward<SourcesT>(value)); return *this;}
176 template<typename SourcesT = Aws::String>
177 CreateResourceShareRequest& AddSources(SourcesT&& value) { m_sourcesHasBeenSet = true; m_sources.emplace_back(std::forward<SourcesT>(value)); return *this; }
179 private:
180
181 Aws::String m_name;
182 bool m_nameHasBeenSet = false;
183
184 Aws::Vector<Aws::String> m_resourceArns;
185 bool m_resourceArnsHasBeenSet = false;
186
187 Aws::Vector<Aws::String> m_principals;
188 bool m_principalsHasBeenSet = false;
189
190 Aws::Vector<Tag> m_tags;
191 bool m_tagsHasBeenSet = false;
192
193 bool m_allowExternalPrincipals{false};
194 bool m_allowExternalPrincipalsHasBeenSet = false;
195
196 Aws::String m_clientToken;
197 bool m_clientTokenHasBeenSet = false;
198
199 Aws::Vector<Aws::String> m_permissionArns;
200 bool m_permissionArnsHasBeenSet = false;
201
202 Aws::Vector<Aws::String> m_sources;
203 bool m_sourcesHasBeenSet = false;
204 };
205
206} // namespace Model
207} // namespace RAM
208} // namespace Aws
CreateResourceShareRequest & AddSources(SourcesT &&value)
CreateResourceShareRequest & AddResourceArns(ResourceArnsT &&value)
const Aws::Vector< Aws::String > & GetPermissionArns() const
AWS_RAM_API Aws::String SerializePayload() const override
CreateResourceShareRequest & WithAllowExternalPrincipals(bool value)
virtual const char * GetServiceRequestName() const override
CreateResourceShareRequest & WithPrincipals(PrincipalsT &&value)
CreateResourceShareRequest & AddPrincipals(PrincipalsT &&value)
const Aws::Vector< Aws::String > & GetSources() const
CreateResourceShareRequest & WithName(NameT &&value)
AWS_RAM_API CreateResourceShareRequest()=default
const Aws::Vector< Aws::String > & GetPrincipals() const
CreateResourceShareRequest & WithSources(SourcesT &&value)
CreateResourceShareRequest & AddPermissionArns(PermissionArnsT &&value)
CreateResourceShareRequest & WithPermissionArns(PermissionArnsT &&value)
CreateResourceShareRequest & AddTags(TagsT &&value)
const Aws::Vector< Aws::String > & GetResourceArns() const
CreateResourceShareRequest & WithTags(TagsT &&value)
CreateResourceShareRequest & WithClientToken(ClientTokenT &&value)
CreateResourceShareRequest & WithResourceArns(ResourceArnsT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector