Specifies the configuration data for a CloudFormation extension, such as a resource or Hook, in the given account and Region.
For more information, see Edit configuration data for extensions in your account in the CloudFormation User Guide.
To view the current configuration data for an extension, refer to the ConfigurationSchema element of DescribeType.
It's strongly recommended that you use dynamic references to restrict sensitive configuration definitions, such as third-party credentials. For more information, see Specify values stored in other services using dynamic references in the CloudFormation User Guide.
For more information about setting the configuration data for resource types, see Defining the account-level configuration of an extension in the CloudFormation Command Line Interface (CLI) User Guide. For more information about setting the configuration data for Hooks, see the CloudFormation Hooks User Guide.
Parameters:
-
type_arn
(Optional[TypeArn], default:
None
)
–
The Amazon Resource Name (ARN) for the extension in this account and Region.
For public extensions, this will be the ARN assigned when you call the ActivateType API operation in this account and Region. For private extensions, this will be the ARN assigned when you call the RegisterType API operation in this account and Region.
Do not include the extension versions suffix at the end of the ARN. You can set the configuration for an extension, but not for a specific extension version.
-
configuration
(Optional[TypeConfiguration], default:
None
)
–
The configuration data for the extension in this account and Region.
The configuration data must be formatted as JSON and validate against the extension's schema returned in the Schema response element of DescribeType.
-
configuration_alias
(Optional[TypeConfigurationAlias], default:
None
)
–
An alias by which to refer to this extension configuration data.
Conditional: Specifying a configuration alias is required when setting a configuration for a resource type extension.
-
type_name
(Optional[TypeName], default:
None
)
–
The name of the extension.
Conditional: You must specify ConfigurationArn, or Type and TypeName.
-
type
(Optional[ThirdPartyType], default:
None
)
–
The type of extension.
Conditional: You must specify ConfigurationArn, or Type and TypeName.
Raises:
Source code in docs_src/capo_cloudformation/_services/cloud_formation.py
| def set_type_configuration(
self,
*,
config_overrides: Optional[CloudFormationClientConfig] = None,
type_arn: Optional["capo_cloudformation.types.type_arn.TypeArn"] = None,
configuration: Optional[
"capo_cloudformation.types.type_configuration.TypeConfiguration"
] = None,
configuration_alias: Optional[
"capo_cloudformation.types.type_configuration_alias.TypeConfigurationAlias"
] = None,
type_name: Optional["capo_cloudformation.types.type_name.TypeName"] = None,
type: Optional[
"capo_cloudformation.types.third_party_type.ThirdPartyType"
] = None,
) -> "capo_cloudformation.types.set_type_configuration_output.SetTypeConfigurationOutput":
"""<p>Specifies the configuration data for a CloudFormation extension, such as a resource or Hook, in the given account and Region.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-set-configuration.html">Edit configuration data for extensions in your account</a> in the <i>CloudFormation User Guide</i>.</p> <p>To view the current configuration data for an extension, refer to the <code>ConfigurationSchema</code> element of <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DescribeType.html">DescribeType</a>.</p> <important> <p>It's strongly recommended that you use dynamic references to restrict sensitive configuration definitions, such as third-party credentials. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html">Specify values stored in other services using dynamic references</a> in the <i>CloudFormation User Guide</i>.</p> </important> <p>For more information about setting the configuration data for resource types, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-model.html#resource-type-howto-configuration">Defining the account-level configuration of an extension</a> in the <i>CloudFormation Command Line Interface (CLI) User Guide</i>. For more information about setting the configuration data for Hooks, see the <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/hooks-userguide/what-is-cloudformation-hooks.html">CloudFormation Hooks User Guide</a>.</p>
Args:
type_arn: <p>The Amazon Resource Name (ARN) for the extension in this account and Region.</p> <p>For public extensions, this will be the ARN assigned when you call the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ActivateType.html">ActivateType</a> API operation in this account and Region. For private extensions, this will be the ARN assigned when you call the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_RegisterType.html">RegisterType</a> API operation in this account and Region.</p> <p>Do not include the extension versions suffix at the end of the ARN. You can set the configuration for an extension, but not for a specific extension version.</p>
configuration: <p>The configuration data for the extension in this account and Region.</p> <p>The configuration data must be formatted as JSON and validate against the extension's schema returned in the <code>Schema</code> response element of <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DescribeType.html">DescribeType</a>.</p>
configuration_alias: <p>An alias by which to refer to this extension configuration data.</p> <p>Conditional: Specifying a configuration alias is required when setting a configuration for a resource type extension.</p>
type_name: <p>The name of the extension.</p> <p>Conditional: You must specify <code>ConfigurationArn</code>, or <code>Type</code> and <code>TypeName</code>.</p>
type: <p>The type of extension.</p> <p>Conditional: You must specify <code>ConfigurationArn</code>, or <code>Type</code> and <code>TypeName</code>.</p>
Raises:
capo_cloudformation.errors.cfn_registry_exception.CFNRegistryException: <p>An error occurred during a CloudFormation registry operation.</p>
capo_cloudformation.errors.type_not_found_exception.TypeNotFoundException: <p>The specified extension doesn't exist in the CloudFormation registry.</p>
capo_cloudformation.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cloudformation.types.set_type_configuration_input.SetTypeConfigurationInput]",
) -> OperationResponse[
"capo_cloudformation.types.set_type_configuration_output.SetTypeConfigurationOutput"
]:
import capo_cloudformation._operations.cloud_formation.set_type_configuration
output, http_response = (
capo_cloudformation._operations.cloud_formation.set_type_configuration.set_type_configuration(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("SetTypeConfiguration")
)
input_: capo_cloudformation.types.set_type_configuration_input.SetTypeConfigurationInput = {}
if type_arn is not None:
input_["type_arn"] = type_arn
if configuration is not None:
input_["configuration"] = configuration
if configuration_alias is not None:
input_["configuration_alias"] = configuration_alias
if type_name is not None:
input_["type_name"] = type_name
if type is not None:
input_["type"] = type
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|