Skip to content

deregister_type

deregister_type(
    *,
    config_overrides: Optional[CloudFormationClientConfig] = None,
    arn: Optional[PrivateTypeArn] = None,
    type: Optional[RegistryType] = None,
    type_name: Optional[TypeName] = None,
    version_id: Optional[TypeVersionId] = None,
) -> DeregisterTypeOutput

Marks an extension or extension version as DEPRECATED in the CloudFormation registry, removing it from active use. Deprecated extensions or extension versions cannot be used in CloudFormation operations.

To deregister an entire extension, you must individually deregister all active versions of that extension. If an extension has only a single active version, deregistering that version results in the extension itself being deregistered and marked as deprecated in the registry.

You can't deregister the default version of an extension if there are other active version of that extension. If you do deregister the default version of an extension, the extension type itself is deregistered as well and marked as deprecated.

To view the deprecation status of an extension or extension version, use DescribeType.

For more information, see Remove third-party private extensions from your account in the CloudFormation User Guide.

Parameters:

  • arn (Optional[PrivateTypeArn], default: None ) –

    The Amazon Resource Name (ARN) of the extension.

    Conditional: You must specify either TypeName and Type, or Arn.

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

    The kind of extension.

    Conditional: You must specify either TypeName and Type, or Arn.

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

    The name of the extension.

    Conditional: You must specify either TypeName and Type, or Arn.

  • version_id (Optional[TypeVersionId], default: None ) –

    The ID of a specific version of the extension. The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the extension version when it is registered.

Raises:

Source code in docs_src/capo_cloudformation/_services/cloud_formation.py
def deregister_type(
    self,
    *,
    config_overrides: Optional[CloudFormationClientConfig] = None,
    arn: Optional[
        "capo_cloudformation.types.private_type_arn.PrivateTypeArn"
    ] = None,
    type: Optional["capo_cloudformation.types.registry_type.RegistryType"] = None,
    type_name: Optional["capo_cloudformation.types.type_name.TypeName"] = None,
    version_id: Optional[
        "capo_cloudformation.types.type_version_id.TypeVersionId"
    ] = None,
) -> "capo_cloudformation.types.deregister_type_output.DeregisterTypeOutput":
    """<p>Marks an extension or extension version as <code>DEPRECATED</code> in the CloudFormation registry, removing it from active use. Deprecated extensions or extension versions cannot be used in CloudFormation operations.</p> <p>To deregister an entire extension, you must individually deregister all active versions of that extension. If an extension has only a single active version, deregistering that version results in the extension itself being deregistered and marked as deprecated in the registry.</p> <p>You can't deregister the default version of an extension if there are other active version of that extension. If you do deregister the default version of an extension, the extension type itself is deregistered as well and marked as deprecated.</p> <p>To view the deprecation status of an extension or extension version, 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-private-deregister-extension.html">Remove third-party private extensions from your account</a> in the <i>CloudFormation User Guide</i>.</p>

    Args:
        arn: <p>The Amazon Resource Name (ARN) of the extension.</p> <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
        type: <p>The kind of extension.</p> <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
        type_name: <p>The name of the extension.</p> <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
        version_id: <p>The ID of a specific version of the extension. The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the extension version when it is registered.</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.deregister_type_input.DeregisterTypeInput]",
    ) -> OperationResponse[
        "capo_cloudformation.types.deregister_type_output.DeregisterTypeOutput"
    ]:
        import capo_cloudformation._operations.cloud_formation.deregister_type

        output, http_response = (
            capo_cloudformation._operations.cloud_formation.deregister_type.deregister_type(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeregisterType")
    )
    input_: capo_cloudformation.types.deregister_type_input.DeregisterTypeInput = {}
    if arn is not None:
        input_["arn"] = arn
    if type is not None:
        input_["type"] = type
    if type_name is not None:
        input_["type_name"] = type_name
    if version_id is not None:
        input_["version_id"] = version_id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output