1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 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 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RegisterTypeInput {
/// <p>The kind of extension.</p>
pub r#type: ::std::option::Option<crate::types::RegistryType>,
/// <p>The name of the extension being registered.</p>
/// <p>We suggest that extension names adhere to the following patterns:</p>
/// <ul>
/// <li>
/// <p>For resource types, <i>company_or_organization</i>::<i>service</i>::<i>type</i>.</p></li>
/// <li>
/// <p>For modules, <i>company_or_organization</i>::<i>service</i>::<i>type</i>::MODULE.</p></li>
/// <li>
/// <p>For hooks, <i>MyCompany</i>::<i>Testing</i>::<i>MyTestHook</i>.</p></li>
/// </ul><note>
/// <p>The following organization namespaces are reserved and can't be used in your extension names:</p>
/// <ul>
/// <li>
/// <p><code>Alexa</code></p></li>
/// <li>
/// <p><code>AMZN</code></p></li>
/// <li>
/// <p><code>Amazon</code></p></li>
/// <li>
/// <p><code>AWS</code></p></li>
/// <li>
/// <p><code>Custom</code></p></li>
/// <li>
/// <p><code>Dev</code></p></li>
/// </ul>
/// </note>
pub type_name: ::std::option::Option<::std::string::String>,
/// <p>A URL to the S3 bucket containing the extension project package that contains the necessary files for the extension you want to register.</p>
/// <p>For information about generating a schema handler package for the extension you want to register, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-cli-submit.html">submit</a> in the <i>CloudFormation CLI User Guide</i>.</p><note>
/// <p>The user registering the extension must be able to access the package in the S3 bucket. That's, the user needs to have <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> permissions for the schema handler package. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html">Actions, Resources, and Condition Keys for Amazon S3</a> in the <i>Identity and Access Management User Guide</i>.</p>
/// </note>
pub schema_handler_package: ::std::option::Option<::std::string::String>,
/// <p>Specifies logging configuration information for an extension.</p>
pub logging_config: ::std::option::Option<crate::types::LoggingConfig>,
/// <p>The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the extension.</p>
/// <p>For CloudFormation to assume the specified execution role, the role must contain a trust relationship with the CloudFormation service principal (<code>resources.cloudformation.amazonaws.com</code>). For more information about adding trust relationships, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-managingrole-editing-console.html#roles-managingrole_edit-trust-policy">Modifying a role trust policy</a> in the <i>Identity and Access Management User Guide</i>.</p>
/// <p>If your extension calls Amazon Web Services APIs in any of its handlers, you must create an <i> <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html">IAM execution role</a> </i> that includes the necessary permissions to call those Amazon Web Services APIs, and provision that execution role in your account. When CloudFormation needs to invoke the resource type handler, CloudFormation assumes this execution role to create a temporary session token, which it then passes to the resource type handler, thereby supplying your resource type with the appropriate credentials.</p>
pub execution_role_arn: ::std::option::Option<::std::string::String>,
/// <p>A unique identifier that acts as an idempotency key for this registration request. Specifying a client request token prevents CloudFormation from generating more than one version of an extension from the same registration request, even if the request is submitted multiple times.</p>
pub client_request_token: ::std::option::Option<::std::string::String>,
}
impl RegisterTypeInput {
/// <p>The kind of extension.</p>
pub fn r#type(&self) -> ::std::option::Option<&crate::types::RegistryType> {
self.r#type.as_ref()
}
/// <p>The name of the extension being registered.</p>
/// <p>We suggest that extension names adhere to the following patterns:</p>
/// <ul>
/// <li>
/// <p>For resource types, <i>company_or_organization</i>::<i>service</i>::<i>type</i>.</p></li>
/// <li>
/// <p>For modules, <i>company_or_organization</i>::<i>service</i>::<i>type</i>::MODULE.</p></li>
/// <li>
/// <p>For hooks, <i>MyCompany</i>::<i>Testing</i>::<i>MyTestHook</i>.</p></li>
/// </ul><note>
/// <p>The following organization namespaces are reserved and can't be used in your extension names:</p>
/// <ul>
/// <li>
/// <p><code>Alexa</code></p></li>
/// <li>
/// <p><code>AMZN</code></p></li>
/// <li>
/// <p><code>Amazon</code></p></li>
/// <li>
/// <p><code>AWS</code></p></li>
/// <li>
/// <p><code>Custom</code></p></li>
/// <li>
/// <p><code>Dev</code></p></li>
/// </ul>
/// </note>
pub fn type_name(&self) -> ::std::option::Option<&str> {
self.type_name.as_deref()
}
/// <p>A URL to the S3 bucket containing the extension project package that contains the necessary files for the extension you want to register.</p>
/// <p>For information about generating a schema handler package for the extension you want to register, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-cli-submit.html">submit</a> in the <i>CloudFormation CLI User Guide</i>.</p><note>
/// <p>The user registering the extension must be able to access the package in the S3 bucket. That's, the user needs to have <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> permissions for the schema handler package. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html">Actions, Resources, and Condition Keys for Amazon S3</a> in the <i>Identity and Access Management User Guide</i>.</p>
/// </note>
pub fn schema_handler_package(&self) -> ::std::option::Option<&str> {
self.schema_handler_package.as_deref()
}
/// <p>Specifies logging configuration information for an extension.</p>
pub fn logging_config(&self) -> ::std::option::Option<&crate::types::LoggingConfig> {
self.logging_config.as_ref()
}
/// <p>The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the extension.</p>
/// <p>For CloudFormation to assume the specified execution role, the role must contain a trust relationship with the CloudFormation service principal (<code>resources.cloudformation.amazonaws.com</code>). For more information about adding trust relationships, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-managingrole-editing-console.html#roles-managingrole_edit-trust-policy">Modifying a role trust policy</a> in the <i>Identity and Access Management User Guide</i>.</p>
/// <p>If your extension calls Amazon Web Services APIs in any of its handlers, you must create an <i> <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html">IAM execution role</a> </i> that includes the necessary permissions to call those Amazon Web Services APIs, and provision that execution role in your account. When CloudFormation needs to invoke the resource type handler, CloudFormation assumes this execution role to create a temporary session token, which it then passes to the resource type handler, thereby supplying your resource type with the appropriate credentials.</p>
pub fn execution_role_arn(&self) -> ::std::option::Option<&str> {
self.execution_role_arn.as_deref()
}
/// <p>A unique identifier that acts as an idempotency key for this registration request. Specifying a client request token prevents CloudFormation from generating more than one version of an extension from the same registration request, even if the request is submitted multiple times.</p>
pub fn client_request_token(&self) -> ::std::option::Option<&str> {
self.client_request_token.as_deref()
}
}
impl RegisterTypeInput {
/// Creates a new builder-style object to manufacture [`RegisterTypeInput`](crate::operation::register_type::RegisterTypeInput).
pub fn builder() -> crate::operation::register_type::builders::RegisterTypeInputBuilder {
crate::operation::register_type::builders::RegisterTypeInputBuilder::default()
}
}
/// A builder for [`RegisterTypeInput`](crate::operation::register_type::RegisterTypeInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct RegisterTypeInputBuilder {
pub(crate) r#type: ::std::option::Option<crate::types::RegistryType>,
pub(crate) type_name: ::std::option::Option<::std::string::String>,
pub(crate) schema_handler_package: ::std::option::Option<::std::string::String>,
pub(crate) logging_config: ::std::option::Option<crate::types::LoggingConfig>,
pub(crate) execution_role_arn: ::std::option::Option<::std::string::String>,
pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
}
impl RegisterTypeInputBuilder {
/// <p>The kind of extension.</p>
pub fn r#type(mut self, input: crate::types::RegistryType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// <p>The kind of extension.</p>
pub fn set_type(mut self, input: ::std::option::Option<crate::types::RegistryType>) -> Self {
self.r#type = input;
self
}
/// <p>The kind of extension.</p>
pub fn get_type(&self) -> &::std::option::Option<crate::types::RegistryType> {
&self.r#type
}
/// <p>The name of the extension being registered.</p>
/// <p>We suggest that extension names adhere to the following patterns:</p>
/// <ul>
/// <li>
/// <p>For resource types, <i>company_or_organization</i>::<i>service</i>::<i>type</i>.</p></li>
/// <li>
/// <p>For modules, <i>company_or_organization</i>::<i>service</i>::<i>type</i>::MODULE.</p></li>
/// <li>
/// <p>For hooks, <i>MyCompany</i>::<i>Testing</i>::<i>MyTestHook</i>.</p></li>
/// </ul><note>
/// <p>The following organization namespaces are reserved and can't be used in your extension names:</p>
/// <ul>
/// <li>
/// <p><code>Alexa</code></p></li>
/// <li>
/// <p><code>AMZN</code></p></li>
/// <li>
/// <p><code>Amazon</code></p></li>
/// <li>
/// <p><code>AWS</code></p></li>
/// <li>
/// <p><code>Custom</code></p></li>
/// <li>
/// <p><code>Dev</code></p></li>
/// </ul>
/// </note>
/// This field is required.
pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.type_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the extension being registered.</p>
/// <p>We suggest that extension names adhere to the following patterns:</p>
/// <ul>
/// <li>
/// <p>For resource types, <i>company_or_organization</i>::<i>service</i>::<i>type</i>.</p></li>
/// <li>
/// <p>For modules, <i>company_or_organization</i>::<i>service</i>::<i>type</i>::MODULE.</p></li>
/// <li>
/// <p>For hooks, <i>MyCompany</i>::<i>Testing</i>::<i>MyTestHook</i>.</p></li>
/// </ul><note>
/// <p>The following organization namespaces are reserved and can't be used in your extension names:</p>
/// <ul>
/// <li>
/// <p><code>Alexa</code></p></li>
/// <li>
/// <p><code>AMZN</code></p></li>
/// <li>
/// <p><code>Amazon</code></p></li>
/// <li>
/// <p><code>AWS</code></p></li>
/// <li>
/// <p><code>Custom</code></p></li>
/// <li>
/// <p><code>Dev</code></p></li>
/// </ul>
/// </note>
pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.type_name = input;
self
}
/// <p>The name of the extension being registered.</p>
/// <p>We suggest that extension names adhere to the following patterns:</p>
/// <ul>
/// <li>
/// <p>For resource types, <i>company_or_organization</i>::<i>service</i>::<i>type</i>.</p></li>
/// <li>
/// <p>For modules, <i>company_or_organization</i>::<i>service</i>::<i>type</i>::MODULE.</p></li>
/// <li>
/// <p>For hooks, <i>MyCompany</i>::<i>Testing</i>::<i>MyTestHook</i>.</p></li>
/// </ul><note>
/// <p>The following organization namespaces are reserved and can't be used in your extension names:</p>
/// <ul>
/// <li>
/// <p><code>Alexa</code></p></li>
/// <li>
/// <p><code>AMZN</code></p></li>
/// <li>
/// <p><code>Amazon</code></p></li>
/// <li>
/// <p><code>AWS</code></p></li>
/// <li>
/// <p><code>Custom</code></p></li>
/// <li>
/// <p><code>Dev</code></p></li>
/// </ul>
/// </note>
pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
&self.type_name
}
/// <p>A URL to the S3 bucket containing the extension project package that contains the necessary files for the extension you want to register.</p>
/// <p>For information about generating a schema handler package for the extension you want to register, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-cli-submit.html">submit</a> in the <i>CloudFormation CLI User Guide</i>.</p><note>
/// <p>The user registering the extension must be able to access the package in the S3 bucket. That's, the user needs to have <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> permissions for the schema handler package. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html">Actions, Resources, and Condition Keys for Amazon S3</a> in the <i>Identity and Access Management User Guide</i>.</p>
/// </note>
/// This field is required.
pub fn schema_handler_package(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.schema_handler_package = ::std::option::Option::Some(input.into());
self
}
/// <p>A URL to the S3 bucket containing the extension project package that contains the necessary files for the extension you want to register.</p>
/// <p>For information about generating a schema handler package for the extension you want to register, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-cli-submit.html">submit</a> in the <i>CloudFormation CLI User Guide</i>.</p><note>
/// <p>The user registering the extension must be able to access the package in the S3 bucket. That's, the user needs to have <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> permissions for the schema handler package. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html">Actions, Resources, and Condition Keys for Amazon S3</a> in the <i>Identity and Access Management User Guide</i>.</p>
/// </note>
pub fn set_schema_handler_package(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.schema_handler_package = input;
self
}
/// <p>A URL to the S3 bucket containing the extension project package that contains the necessary files for the extension you want to register.</p>
/// <p>For information about generating a schema handler package for the extension you want to register, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-cli-submit.html">submit</a> in the <i>CloudFormation CLI User Guide</i>.</p><note>
/// <p>The user registering the extension must be able to access the package in the S3 bucket. That's, the user needs to have <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> permissions for the schema handler package. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html">Actions, Resources, and Condition Keys for Amazon S3</a> in the <i>Identity and Access Management User Guide</i>.</p>
/// </note>
pub fn get_schema_handler_package(&self) -> &::std::option::Option<::std::string::String> {
&self.schema_handler_package
}
/// <p>Specifies logging configuration information for an extension.</p>
pub fn logging_config(mut self, input: crate::types::LoggingConfig) -> Self {
self.logging_config = ::std::option::Option::Some(input);
self
}
/// <p>Specifies logging configuration information for an extension.</p>
pub fn set_logging_config(mut self, input: ::std::option::Option<crate::types::LoggingConfig>) -> Self {
self.logging_config = input;
self
}
/// <p>Specifies logging configuration information for an extension.</p>
pub fn get_logging_config(&self) -> &::std::option::Option<crate::types::LoggingConfig> {
&self.logging_config
}
/// <p>The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the extension.</p>
/// <p>For CloudFormation to assume the specified execution role, the role must contain a trust relationship with the CloudFormation service principal (<code>resources.cloudformation.amazonaws.com</code>). For more information about adding trust relationships, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-managingrole-editing-console.html#roles-managingrole_edit-trust-policy">Modifying a role trust policy</a> in the <i>Identity and Access Management User Guide</i>.</p>
/// <p>If your extension calls Amazon Web Services APIs in any of its handlers, you must create an <i> <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html">IAM execution role</a> </i> that includes the necessary permissions to call those Amazon Web Services APIs, and provision that execution role in your account. When CloudFormation needs to invoke the resource type handler, CloudFormation assumes this execution role to create a temporary session token, which it then passes to the resource type handler, thereby supplying your resource type with the appropriate credentials.</p>
pub fn execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.execution_role_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the extension.</p>
/// <p>For CloudFormation to assume the specified execution role, the role must contain a trust relationship with the CloudFormation service principal (<code>resources.cloudformation.amazonaws.com</code>). For more information about adding trust relationships, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-managingrole-editing-console.html#roles-managingrole_edit-trust-policy">Modifying a role trust policy</a> in the <i>Identity and Access Management User Guide</i>.</p>
/// <p>If your extension calls Amazon Web Services APIs in any of its handlers, you must create an <i> <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html">IAM execution role</a> </i> that includes the necessary permissions to call those Amazon Web Services APIs, and provision that execution role in your account. When CloudFormation needs to invoke the resource type handler, CloudFormation assumes this execution role to create a temporary session token, which it then passes to the resource type handler, thereby supplying your resource type with the appropriate credentials.</p>
pub fn set_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.execution_role_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the extension.</p>
/// <p>For CloudFormation to assume the specified execution role, the role must contain a trust relationship with the CloudFormation service principal (<code>resources.cloudformation.amazonaws.com</code>). For more information about adding trust relationships, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-managingrole-editing-console.html#roles-managingrole_edit-trust-policy">Modifying a role trust policy</a> in the <i>Identity and Access Management User Guide</i>.</p>
/// <p>If your extension calls Amazon Web Services APIs in any of its handlers, you must create an <i> <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html">IAM execution role</a> </i> that includes the necessary permissions to call those Amazon Web Services APIs, and provision that execution role in your account. When CloudFormation needs to invoke the resource type handler, CloudFormation assumes this execution role to create a temporary session token, which it then passes to the resource type handler, thereby supplying your resource type with the appropriate credentials.</p>
pub fn get_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.execution_role_arn
}
/// <p>A unique identifier that acts as an idempotency key for this registration request. Specifying a client request token prevents CloudFormation from generating more than one version of an extension from the same registration request, even if the request is submitted multiple times.</p>
pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_request_token = ::std::option::Option::Some(input.into());
self
}
/// <p>A unique identifier that acts as an idempotency key for this registration request. Specifying a client request token prevents CloudFormation from generating more than one version of an extension from the same registration request, even if the request is submitted multiple times.</p>
pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_request_token = input;
self
}
/// <p>A unique identifier that acts as an idempotency key for this registration request. Specifying a client request token prevents CloudFormation from generating more than one version of an extension from the same registration request, even if the request is submitted multiple times.</p>
pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_request_token
}
/// Consumes the builder and constructs a [`RegisterTypeInput`](crate::operation::register_type::RegisterTypeInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::register_type::RegisterTypeInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::register_type::RegisterTypeInput {
r#type: self.r#type,
type_name: self.type_name,
schema_handler_package: self.schema_handler_package,
logging_config: self.logging_config,
execution_role_arn: self.execution_role_arn,
client_request_token: self.client_request_token,
})
}
}