Deactivates a public third-party extension, such as a resource or module, or a CloudFormation Hook when you no longer use it.
Deactivating an extension deletes the configuration details that are associated with it. To temporarily disable a CloudFormation Hook instead, you can use SetTypeConfiguration.
Once deactivated, an extension can't be used in any CloudFormation operation. This includes stack update operations where the stack template includes the extension, even if no updates are being made to the extension. In addition, deactivated extensions aren't automatically updated if a new version of the extension is released.
To see which extensions are currently activated, use ListTypes.
Parameters:
-
type_name
(Optional[TypeName], default:
None
)
–
The type name of the extension in this account and Region. If you specified a type name alias when enabling the extension, use the type name alias.
Conditional: You must specify either Arn, or TypeName and Type.
-
type
(Optional[ThirdPartyType], default:
None
)
–
The extension type.
Conditional: You must specify either Arn, or TypeName and Type.
-
arn
(Optional[PrivateTypeArn], default:
None
)
–
The Amazon Resource Name (ARN) for the extension in this account and Region.
Conditional: You must specify either Arn, or TypeName and Type.
Raises:
Source code in docs_src/capo_cloudformation/_services/cloud_formation.py
| def deactivate_type(
self,
*,
config_overrides: Optional[CloudFormationClientConfig] = None,
type_name: Optional["capo_cloudformation.types.type_name.TypeName"] = None,
type: Optional[
"capo_cloudformation.types.third_party_type.ThirdPartyType"
] = None,
arn: Optional[
"capo_cloudformation.types.private_type_arn.PrivateTypeArn"
] = None,
) -> "capo_cloudformation.types.deactivate_type_output.DeactivateTypeOutput":
"""<p>Deactivates a public third-party extension, such as a resource or module, or a CloudFormation Hook when you no longer use it.</p> <p>Deactivating an extension deletes the configuration details that are associated with it. To temporarily disable a CloudFormation Hook instead, you can use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_SetTypeConfiguration.html">SetTypeConfiguration</a>.</p> <p>Once deactivated, an extension can't be used in any CloudFormation operation. This includes stack update operations where the stack template includes the extension, even if no updates are being made to the extension. In addition, deactivated extensions aren't automatically updated if a new version of the extension is released.</p> <p>To see which extensions are currently activated, use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ListTypes.html">ListTypes</a>.</p>
Args:
type_name: <p>The type name of the extension in this account and Region. If you specified a type name alias when enabling the extension, use the type name alias.</p> <p>Conditional: You must specify either <code>Arn</code>, or <code>TypeName</code> and <code>Type</code>.</p>
type: <p>The extension type.</p> <p>Conditional: You must specify either <code>Arn</code>, or <code>TypeName</code> and <code>Type</code>.</p>
arn: <p>The Amazon Resource Name (ARN) for the extension in this account and Region.</p> <p>Conditional: You must specify either <code>Arn</code>, or <code>TypeName</code> and <code>Type</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.deactivate_type_input.DeactivateTypeInput]",
) -> OperationResponse[
"capo_cloudformation.types.deactivate_type_output.DeactivateTypeOutput"
]:
import capo_cloudformation._operations.cloud_formation.deactivate_type
output, http_response = (
capo_cloudformation._operations.cloud_formation.deactivate_type.deactivate_type(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeactivateType")
)
input_: capo_cloudformation.types.deactivate_type_input.DeactivateTypeInput = {}
if type_name is not None:
input_["type_name"] = type_name
if type is not None:
input_["type"] = type
if arn is not None:
input_["arn"] = arn
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|