Skip to content

activate_type async

activate_type(
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    type: Optional[ThirdPartyType] = None,
    public_type_arn: Optional[ThirdPartyTypeArn] = None,
    publisher_id: Optional[PublisherId] = None,
    type_name: Optional[TypeName] = None,
    type_name_alias: Optional[TypeName] = None,
    auto_update: Optional[AutoUpdate] = None,
    logging_config: Optional[LoggingConfig] = None,
    execution_role_arn: Optional[RoleARN2] = None,
    version_bump: Optional[VersionBump] = None,
    major_version: Optional[MajorVersion] = None,
) -> ActivateTypeOutput

Activates a public third-party extension, such as a resource or module, to make it available for use in stack templates in your current account and Region. It can also create CloudFormation Hooks, which allow you to evaluate resource configurations before CloudFormation provisions them. Hooks integrate with both CloudFormation and Cloud Control API operations.

After you activate an extension, you can use SetTypeConfiguration to set specific properties for the extension.

To see which extensions have been activated, use ListTypes. To see configuration details for an extension, use DescribeType.

For more information, see Activate a third-party public extension in your account in the CloudFormation User Guide. For information about creating Hooks, see the CloudFormation Hooks User Guide.

Parameters:

  • type (Optional[ThirdPartyType], default: None ) –

    The extension type.

    Conditional: You must specify PublicTypeArn, or TypeName, Type, and PublisherId.

  • public_type_arn (Optional[ThirdPartyTypeArn], default: None ) –

    The Amazon Resource Name (ARN) of the public extension.

    Conditional: You must specify PublicTypeArn, or TypeName, Type, and PublisherId.

  • publisher_id (Optional[PublisherId], default: None ) –

    The ID of the extension publisher.

    Conditional: You must specify PublicTypeArn, or TypeName, Type, and PublisherId.

  • type_name (Optional[TypeName], default: None ) –

    The name of the extension.

    Conditional: You must specify PublicTypeArn, or TypeName, Type, and PublisherId.

  • type_name_alias (Optional[TypeName], default: None ) –

    An alias to assign to the public extension in this account and Region. If you specify an alias for the extension, CloudFormation treats the alias as the extension type name within this account and Region. You must use the alias to refer to the extension in your templates, API calls, and CloudFormation console.

    An extension alias must be unique within a given account and Region. You can activate the same public resource multiple times in the same account and Region, using different type name aliases.

  • auto_update (Optional[AutoUpdate], default: None ) –

    Whether to automatically update the extension in this account and Region when a new minor version is published by the extension publisher. Major versions released by the publisher must be manually updated.

    The default is true.

  • logging_config (Optional[LoggingConfig], default: None ) –

    Contains logging configuration information for an extension.

  • execution_role_arn (Optional[RoleARN2], default: None ) –

    The name of the IAM execution role to use to activate the extension.

  • version_bump (Optional[VersionBump], default: None ) –

    Manually updates a previously-activated type to a new major or minor version, if available. You can also use this parameter to update the value of AutoUpdate.

    • MAJOR: CloudFormation updates the extension to the newest major version, if one is available.

    • MINOR: CloudFormation updates the extension to the newest minor version, if one is available.

  • major_version (Optional[MajorVersion], default: None ) –

    The major version of this extension you want to activate, if multiple major versions are available. The default is the latest major version. CloudFormation uses the latest available minor version of the major version selected.

    You can specify MajorVersion or VersionBump, but not both.

Raises:

Source code in docs_src/capo_cloudformation/_services/async_cloud_formation.py
async def activate_type(
    self,
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    type: Optional[
        "capo_cloudformation.types.third_party_type.ThirdPartyType"
    ] = None,
    public_type_arn: Optional[
        "capo_cloudformation.types.third_party_type_arn.ThirdPartyTypeArn"
    ] = None,
    publisher_id: Optional[
        "capo_cloudformation.types.publisher_id.PublisherId"
    ] = None,
    type_name: Optional["capo_cloudformation.types.type_name.TypeName"] = None,
    type_name_alias: Optional[
        "capo_cloudformation.types.type_name.TypeName"
    ] = None,
    auto_update: Optional[
        "capo_cloudformation.types.auto_update.AutoUpdate"
    ] = None,
    logging_config: Optional[
        "capo_cloudformation.types.logging_config.LoggingConfig"
    ] = None,
    execution_role_arn: Optional[
        "capo_cloudformation.types.role_arn2.RoleARN2"
    ] = None,
    version_bump: Optional[
        "capo_cloudformation.types.version_bump.VersionBump"
    ] = None,
    major_version: Optional[
        "capo_cloudformation.types.major_version.MajorVersion"
    ] = None,
) -> "capo_cloudformation.types.activate_type_output.ActivateTypeOutput":
    """<p>Activates a public third-party extension, such as a resource or module, to make it available for use in stack templates in your current account and Region. It can also create CloudFormation Hooks, which allow you to evaluate resource configurations before CloudFormation provisions them. Hooks integrate with both CloudFormation and Cloud Control API operations.</p> <p>After you activate an extension, you can use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_SetTypeConfiguration.html">SetTypeConfiguration</a> to set specific properties for the extension.</p> <p>To see which extensions have been activated, use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ListTypes.html">ListTypes</a>. To see configuration details for an extension, use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DescribeType.html">DescribeType</a>.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public-activate-extension.html">Activate a third-party public extension in your account</a> in the <i>CloudFormation User Guide</i>. For information about creating 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: <p>The extension type.</p> <p>Conditional: You must specify <code>PublicTypeArn</code>, or <code>TypeName</code>, <code>Type</code>, and <code>PublisherId</code>.</p>
        public_type_arn: <p>The Amazon Resource Name (ARN) of the public extension.</p> <p>Conditional: You must specify <code>PublicTypeArn</code>, or <code>TypeName</code>, <code>Type</code>, and <code>PublisherId</code>.</p>
        publisher_id: <p>The ID of the extension publisher.</p> <p>Conditional: You must specify <code>PublicTypeArn</code>, or <code>TypeName</code>, <code>Type</code>, and <code>PublisherId</code>.</p>
        type_name: <p>The name of the extension.</p> <p>Conditional: You must specify <code>PublicTypeArn</code>, or <code>TypeName</code>, <code>Type</code>, and <code>PublisherId</code>.</p>
        type_name_alias: <p>An alias to assign to the public extension in this account and Region. If you specify an alias for the extension, CloudFormation treats the alias as the extension type name within this account and Region. You must use the alias to refer to the extension in your templates, API calls, and CloudFormation console.</p> <p>An extension alias must be unique within a given account and Region. You can activate the same public resource multiple times in the same account and Region, using different type name aliases.</p>
        auto_update: <p>Whether to automatically update the extension in this account and Region when a new <i>minor</i> version is published by the extension publisher. Major versions released by the publisher must be manually updated.</p> <p>The default is <code>true</code>.</p>
        logging_config: <p>Contains logging configuration information for an extension.</p>
        execution_role_arn: <p>The name of the IAM execution role to use to activate the extension.</p>
        version_bump: <p>Manually updates a previously-activated type to a new major or minor version, if available. You can also use this parameter to update the value of <code>AutoUpdate</code>.</p> <ul> <li> <p> <code>MAJOR</code>: CloudFormation updates the extension to the newest major version, if one is available.</p> </li> <li> <p> <code>MINOR</code>: CloudFormation updates the extension to the newest minor version, if one is available.</p> </li> </ul>
        major_version: <p>The major version of this extension you want to activate, if multiple major versions are available. The default is the latest major version. CloudFormation uses the latest available <i>minor</i> version of the major version selected.</p> <p>You can specify <code>MajorVersion</code> or <code>VersionBump</code>, but not both.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudformation.types.activate_type_input.ActivateTypeInput]",
    ) -> AsyncOperationResponse[
        "capo_cloudformation.types.activate_type_output.ActivateTypeOutput"
    ]:
        import capo_cloudformation._operations.cloud_formation.activate_type

        (
            output,
            http_response,
        ) = await capo_cloudformation._operations.cloud_formation.activate_type.async_activate_type(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ActivateType")
    )
    input_: capo_cloudformation.types.activate_type_input.ActivateTypeInput = {}
    if type is not None:
        input_["type"] = type
    if public_type_arn is not None:
        input_["public_type_arn"] = public_type_arn
    if publisher_id is not None:
        input_["publisher_id"] = publisher_id
    if type_name is not None:
        input_["type_name"] = type_name
    if type_name_alias is not None:
        input_["type_name_alias"] = type_name_alias
    if auto_update is not None:
        input_["auto_update"] = auto_update
    if logging_config is not None:
        input_["logging_config"] = logging_config
    if execution_role_arn is not None:
        input_["execution_role_arn"] = execution_role_arn
    if version_bump is not None:
        input_["version_bump"] = version_bump
    if major_version is not None:
        input_["major_version"] = major_version

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output