AWS CloudFormation

2022/02/09 - AWS CloudFormation - 1 new 15 updated api methods

Changes  This SDK release is for the feature launch of AWS CloudFormation Hooks.

DescribeChangeSetHooks (new) Link ¶

Returns hook-related information for the change set and a list of changes that CloudFormation makes when you run the change set.

See also: AWS API Documentation

Request Syntax

client.describe_change_set_hooks(
    ChangeSetName='string',
    StackName='string',
    NextToken='string',
    LogicalResourceId='string'
)
type ChangeSetName

string

param ChangeSetName

[REQUIRED]

The name or Amazon Resource Name (ARN) of the change set that you want to describe.

type StackName

string

param StackName

If you specified the name of a change set, specify the stack name or stack ID (ARN) of the change set you want to describe.

type NextToken

string

param NextToken

A string, provided by the DescribeChangeSetHooks response output, that identifies the next page of information that you want to retrieve.

type LogicalResourceId

string

param LogicalResourceId

If specified, lists only the hooks related to the specified LogicalResourceId .

rtype

dict

returns

Response Syntax

{
    'ChangeSetId': 'string',
    'ChangeSetName': 'string',
    'Hooks': [
        {
            'InvocationPoint': 'PRE_PROVISION',
            'FailureMode': 'FAIL'|'WARN',
            'TypeName': 'string',
            'TypeVersionId': 'string',
            'TypeConfigurationVersionId': 'string',
            'TargetDetails': {
                'TargetType': 'RESOURCE',
                'ResourceTargetDetails': {
                    'LogicalResourceId': 'string',
                    'ResourceType': 'string',
                    'ResourceAction': 'Add'|'Modify'|'Remove'|'Import'|'Dynamic'
                }
            }
        },
    ],
    'Status': 'PLANNING'|'PLANNED'|'UNAVAILABLE',
    'NextToken': 'string',
    'StackId': 'string',
    'StackName': 'string'
}

Response Structure

  • (dict) --

    • ChangeSetId (string) --

      The change set identifier (stack ID).

    • ChangeSetName (string) --

      The change set name.

    • Hooks (list) --

      List of hook objects.

      • (dict) --

        Specifies the resource, the hook, and the hook version to be invoked.

        • InvocationPoint (string) --

          Specifies the points in provisioning logic where a hook is invoked.

        • FailureMode (string) --

          Specify the hook failure mode for non-compliant resources in the followings ways.

          • FAIL Stops provisioning resources.

          • WARN Allows provisioning to continue with a warning message.

        • TypeName (string) --

          The unique name for your hook. Specifies a three-part namespace for your hook, with a recommended pattern of Organization::Service::Hook .

          Note

          The following organization namespaces are reserved and can't be used in your hook type names:

          • Alexa

          • AMZN

          • Amazon

          • ASK

          • AWS

          • Custom

          • Dev

        • TypeVersionId (string) --

          The version ID of the type specified.

        • TypeConfigurationVersionId (string) --

          The version ID of the type configuration.

        • TargetDetails (dict) --

          Specifies details about the target that the hook will run against.

          • TargetType (string) --

            The name of the type.

          • ResourceTargetDetails (dict) --

            Required if TargetType is RESOURCE .

            • LogicalResourceId (string) --

              The resource's logical ID, which is defined in the stack's template.

            • ResourceType (string) --

              The type of CloudFormation resource, such as AWS::S3::Bucket .

            • ResourceAction (string) --

              Specifies the action of the resource.

    • Status (string) --

      Provides the status of the change set hook.

    • NextToken (string) --

      Pagination token, null or empty if no more results.

    • StackId (string) --

      The stack identifier (stack ID).

    • StackName (string) --

      The stack name.

ActivateType (updated) Link ¶
Changes (request)
{'Type': {'HOOK'}}

Activates a public third-party extension, making it available for use in stack templates. For more information, see Using public extensions in the CloudFormation User Guide .

Once you have activated a public third-party extension in your account and region, use SetTypeConfiguration to specify configuration properties for the extension. For more information, see Configuring extensions at the account level in the CloudFormation User Guide .

See also: AWS API Documentation

Request Syntax

client.activate_type(
    Type='RESOURCE'|'MODULE'|'HOOK',
    PublicTypeArn='string',
    PublisherId='string',
    TypeName='string',
    TypeNameAlias='string',
    AutoUpdate=True|False,
    LoggingConfig={
        'LogRoleArn': 'string',
        'LogGroupName': 'string'
    },
    ExecutionRoleArn='string',
    VersionBump='MAJOR'|'MINOR',
    MajorVersion=123
)
type Type

string

param Type

The extension type.

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

type PublicTypeArn

string

param PublicTypeArn

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

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

type PublisherId

string

param PublisherId

The ID of the extension publisher.

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

type TypeName

string

param TypeName

The name of the extension.

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

type TypeNameAlias

string

param TypeNameAlias

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.

type AutoUpdate

boolean

param AutoUpdate

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 .

type LoggingConfig

dict

param LoggingConfig

Contains logging configuration information for an extension.

  • LogRoleArn (string) -- [REQUIRED]

    The Amazon Resource Name (ARN) of the role that CloudFormation should assume when sending log entries to CloudWatch Logs.

  • LogGroupName (string) -- [REQUIRED]

    The Amazon CloudWatch Logs group to which CloudFormation sends error logging information when invoking the extension's handlers.

type ExecutionRoleArn

string

param ExecutionRoleArn

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

type VersionBump

string

param VersionBump

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.

type MajorVersion

integer

param MajorVersion

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.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Number (ARN) of the activated extension, in this account and region.

BatchDescribeTypeConfigurations (updated) Link ¶
Changes (request, response)
Request
{'TypeConfigurationIdentifiers': {'Type': {'HOOK'}}}
Response
{'Errors': {'TypeConfigurationIdentifier': {'Type': {'HOOK'}}},
 'UnprocessedTypeConfigurations': {'Type': {'HOOK'}}}

Returns configuration data for the specified CloudFormation extensions, from the CloudFormation registry for the account and region.

For more information, see Configuring extensions at the account level in the CloudFormation User Guide .

See also: AWS API Documentation

Request Syntax

client.batch_describe_type_configurations(
    TypeConfigurationIdentifiers=[
        {
            'TypeArn': 'string',
            'TypeConfigurationAlias': 'string',
            'TypeConfigurationArn': 'string',
            'Type': 'RESOURCE'|'MODULE'|'HOOK',
            'TypeName': 'string'
        },
    ]
)
type TypeConfigurationIdentifiers

list

param TypeConfigurationIdentifiers

[REQUIRED]

The list of identifiers for the desired extension configurations.

  • (dict) --

    Identifying information for the configuration of a CloudFormation extension.

    • TypeArn (string) --

      The Amazon Resource Name (ARN) for the extension, in this account and region.

      For public extensions, this will be the ARN assigned when you activate the type in this account and region. For private extensions, this will be the ARN assigned when you register the type in this account and region.

    • TypeConfigurationAlias (string) --

      The alias specified for this configuration, if one was specified when the configuration was set.

    • TypeConfigurationArn (string) --

      The Amazon Resource Name (ARN) for the configuration, in this account and region.

    • Type (string) --

      The type of extension.

    • TypeName (string) --

      The name of the extension type to which this configuration applies.

rtype

dict

returns

Response Syntax

{
    'Errors': [
        {
            'ErrorCode': 'string',
            'ErrorMessage': 'string',
            'TypeConfigurationIdentifier': {
                'TypeArn': 'string',
                'TypeConfigurationAlias': 'string',
                'TypeConfigurationArn': 'string',
                'Type': 'RESOURCE'|'MODULE'|'HOOK',
                'TypeName': 'string'
            }
        },
    ],
    'UnprocessedTypeConfigurations': [
        {
            'TypeArn': 'string',
            'TypeConfigurationAlias': 'string',
            'TypeConfigurationArn': 'string',
            'Type': 'RESOURCE'|'MODULE'|'HOOK',
            'TypeName': 'string'
        },
    ],
    'TypeConfigurations': [
        {
            'Arn': 'string',
            'Alias': 'string',
            'Configuration': 'string',
            'LastUpdated': datetime(2015, 1, 1),
            'TypeArn': 'string',
            'TypeName': 'string',
            'IsDefaultConfiguration': True|False
        },
    ]
}

Response Structure

  • (dict) --

    • Errors (list) --

      A list of information concerning any errors generated during the setting of the specified configurations.

      • (dict) --

        Detailed information concerning an error generated during the setting of configuration data for a CloudFormation extension.

        • ErrorCode (string) --

          The error code.

        • ErrorMessage (string) --

          The error message.

        • TypeConfigurationIdentifier (dict) --

          Identifying information for the configuration of a CloudFormation extension.

          • TypeArn (string) --

            The Amazon Resource Name (ARN) for the extension, in this account and region.

            For public extensions, this will be the ARN assigned when you activate the type in this account and region. For private extensions, this will be the ARN assigned when you register the type in this account and region.

          • TypeConfigurationAlias (string) --

            The alias specified for this configuration, if one was specified when the configuration was set.

          • TypeConfigurationArn (string) --

            The Amazon Resource Name (ARN) for the configuration, in this account and region.

          • Type (string) --

            The type of extension.

          • TypeName (string) --

            The name of the extension type to which this configuration applies.

    • UnprocessedTypeConfigurations (list) --

      A list of any of the specified extension configurations that CloudFormation could not process for any reason.

      • (dict) --

        Identifying information for the configuration of a CloudFormation extension.

        • TypeArn (string) --

          The Amazon Resource Name (ARN) for the extension, in this account and region.

          For public extensions, this will be the ARN assigned when you activate the type in this account and region. For private extensions, this will be the ARN assigned when you register the type in this account and region.

        • TypeConfigurationAlias (string) --

          The alias specified for this configuration, if one was specified when the configuration was set.

        • TypeConfigurationArn (string) --

          The Amazon Resource Name (ARN) for the configuration, in this account and region.

        • Type (string) --

          The type of extension.

        • TypeName (string) --

          The name of the extension type to which this configuration applies.

    • TypeConfigurations (list) --

      A list of any of the specified extension configurations from the CloudFormation registry.

      • (dict) --

        Detailed information concerning the specification of a CloudFormation extension in a given account and region.

        For more information, see Configuring extensions at the account level in the CloudFormation User Guide .

        • Arn (string) --

          The Amazon Resource Name (ARN) for the configuration data, in this account and region.

        • Alias (string) --

          The alias specified for this configuration, if one was specified when the configuration was set.

        • Configuration (string) --

          A JSON string specifying the configuration data for the extension, in this account and region.

          If a configuration hasn't been set for a specified extension, CloudFormation returns {} .

        • LastUpdated (datetime) --

          When the configuration data was last updated for this extension.

          If a configuration hasn't been set for a specified extension, CloudFormation returns null .

        • TypeArn (string) --

          The Amazon Resource Name (ARN) for the extension, in this account and region.

          For public extensions, this will be the ARN assigned when you activate the type in this account and region. For private extensions, this will be the ARN assigned when you register the type in this account and region.

        • TypeName (string) --

          The name of the extension.

        • IsDefaultConfiguration (boolean) --

          Whether or not this configuration data is the default configuration for the extension.

DeactivateType (updated) Link ¶
Changes (request)
{'Type': {'HOOK'}}

Deactivates a public extension that was previously activated in this account and region.

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.

See also: AWS API Documentation

Request Syntax

client.deactivate_type(
    TypeName='string',
    Type='RESOURCE'|'MODULE'|'HOOK',
    Arn='string'
)
type TypeName

string

param TypeName

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 Type

string

param Type

The extension type.

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

type Arn

string

param Arn

The Amazon Resource Name (ARN) for the extension, in this account and region.

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

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DeregisterType (updated) Link ¶
Changes (request)
{'Type': {'HOOK'}}

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 .

See also: AWS API Documentation

Request Syntax

client.deregister_type(
    Arn='string',
    Type='RESOURCE'|'MODULE'|'HOOK',
    TypeName='string',
    VersionId='string'
)
type Arn

string

param Arn

The Amazon Resource Name (ARN) of the extension.

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

type Type

string

param Type

The kind of extension.

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

type TypeName

string

param TypeName

The name of the extension.

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

type VersionId

string

param VersionId

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.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DescribeChangeSet (updated) Link ¶
Changes (response)
{'Changes': {'HookInvocationCount': 'integer'}}

Returns the inputs for the change set and a list of changes that CloudFormation will make if you execute the change set. For more information, see Updating Stacks Using Change Sets in the CloudFormation User Guide.

See also: AWS API Documentation

Request Syntax

client.describe_change_set(
    ChangeSetName='string',
    StackName='string',
    NextToken='string'
)
type ChangeSetName

string

param ChangeSetName

[REQUIRED]

The name or Amazon Resource Name (ARN) of the change set that you want to describe.

type StackName

string

param StackName

If you specified the name of a change set, specify the stack name or ID (ARN) of the change set you want to describe.

type NextToken

string

param NextToken

A string (provided by the DescribeChangeSet response output) that identifies the next page of information that you want to retrieve.

rtype

dict

returns

Response Syntax

{
    'ChangeSetName': 'string',
    'ChangeSetId': 'string',
    'StackId': 'string',
    'StackName': 'string',
    'Description': 'string',
    'Parameters': [
        {
            'ParameterKey': 'string',
            'ParameterValue': 'string',
            'UsePreviousValue': True|False,
            'ResolvedValue': 'string'
        },
    ],
    'CreationTime': datetime(2015, 1, 1),
    'ExecutionStatus': 'UNAVAILABLE'|'AVAILABLE'|'EXECUTE_IN_PROGRESS'|'EXECUTE_COMPLETE'|'EXECUTE_FAILED'|'OBSOLETE',
    'Status': 'CREATE_PENDING'|'CREATE_IN_PROGRESS'|'CREATE_COMPLETE'|'DELETE_PENDING'|'DELETE_IN_PROGRESS'|'DELETE_COMPLETE'|'DELETE_FAILED'|'FAILED',
    'StatusReason': 'string',
    'NotificationARNs': [
        'string',
    ],
    'RollbackConfiguration': {
        'RollbackTriggers': [
            {
                'Arn': 'string',
                'Type': 'string'
            },
        ],
        'MonitoringTimeInMinutes': 123
    },
    'Capabilities': [
        'CAPABILITY_IAM'|'CAPABILITY_NAMED_IAM'|'CAPABILITY_AUTO_EXPAND',
    ],
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    'Changes': [
        {
            'Type': 'Resource',
            'HookInvocationCount': 123,
            'ResourceChange': {
                'Action': 'Add'|'Modify'|'Remove'|'Import'|'Dynamic',
                'LogicalResourceId': 'string',
                'PhysicalResourceId': 'string',
                'ResourceType': 'string',
                'Replacement': 'True'|'False'|'Conditional',
                'Scope': [
                    'Properties'|'Metadata'|'CreationPolicy'|'UpdatePolicy'|'DeletionPolicy'|'Tags',
                ],
                'Details': [
                    {
                        'Target': {
                            'Attribute': 'Properties'|'Metadata'|'CreationPolicy'|'UpdatePolicy'|'DeletionPolicy'|'Tags',
                            'Name': 'string',
                            'RequiresRecreation': 'Never'|'Conditionally'|'Always'
                        },
                        'Evaluation': 'Static'|'Dynamic',
                        'ChangeSource': 'ResourceReference'|'ParameterReference'|'ResourceAttribute'|'DirectModification'|'Automatic',
                        'CausingEntity': 'string'
                    },
                ],
                'ChangeSetId': 'string',
                'ModuleInfo': {
                    'TypeHierarchy': 'string',
                    'LogicalIdHierarchy': 'string'
                }
            }
        },
    ],
    'NextToken': 'string',
    'IncludeNestedStacks': True|False,
    'ParentChangeSetId': 'string',
    'RootChangeSetId': 'string'
}

Response Structure

  • (dict) --

    The output for the DescribeChangeSet action.

    • ChangeSetName (string) --

      The name of the change set.

    • ChangeSetId (string) --

      The Amazon Resource Name (ARN) of the change set.

    • StackId (string) --

      The Amazon Resource Name (ARN) of the stack that's associated with the change set.

    • StackName (string) --

      The name of the stack that's associated with the change set.

    • Description (string) --

      Information about the change set.

    • Parameters (list) --

      A list of Parameter structures that describes the input parameters and their values used to create the change set. For more information, see the Parameter data type.

      • (dict) --

        The Parameter data type.

        • ParameterKey (string) --

          The key associated with the parameter. If you don't specify a key and value for a particular parameter, CloudFormation uses the default value that's specified in your template.

        • ParameterValue (string) --

          The input value associated with the parameter.

        • UsePreviousValue (boolean) --

          During a stack update, use the existing parameter value that the stack is using for a given parameter key. If you specify true , do not specify a parameter value.

        • ResolvedValue (string) --

          Read-only. The value that corresponds to a SSM parameter key. This field is returned only for ` SSM https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#aws-ssm-parameter-types`__ parameter types in the template.

    • CreationTime (datetime) --

      The start time when the change set was created, in UTC.

    • ExecutionStatus (string) --

      If the change set execution status is AVAILABLE , you can execute the change set. If you can't execute the change set, the status indicates why. For example, a change set might be in an UNAVAILABLE state because CloudFormation is still creating it or in an OBSOLETE state because the stack was already updated.

    • Status (string) --

      The current status of the change set, such as CREATE_IN_PROGRESS , CREATE_COMPLETE , or FAILED .

    • StatusReason (string) --

      A description of the change set's status. For example, if your attempt to create a change set failed, CloudFormation shows the error message.

    • NotificationARNs (list) --

      The ARNs of the Amazon Simple Notification Service (Amazon SNS) topics that will be associated with the stack if you execute the change set.

      • (string) --

    • RollbackConfiguration (dict) --

      The rollback triggers for CloudFormation to monitor during stack creation and updating operations, and for the specified monitoring period afterwards.

      • RollbackTriggers (list) --

        The triggers to monitor during stack creation or update actions.

        By default, CloudFormation saves the rollback triggers specified for a stack and applies them to any subsequent update operations for the stack, unless you specify otherwise. If you do specify rollback triggers for this parameter, those triggers replace any list of triggers previously specified for the stack. This means:

        • To use the rollback triggers previously specified for this stack, if any, don't specify this parameter.

        • To specify new or updated rollback triggers, you must specify all the triggers that you want used for this stack, even triggers you've specified before (for example, when creating the stack or during a previous stack update). Any triggers that you don't include in the updated list of triggers are no longer applied to the stack.

        • To remove all currently specified triggers, specify an empty list for this parameter.

        If a specified trigger is missing, the entire stack operation fails and is rolled back.

        • (dict) --

          A rollback trigger CloudFormation monitors during creation and updating of stacks. If any of the alarms you specify goes to ALARM state during the stack operation or within the specified monitoring period afterwards, CloudFormation rolls back the entire stack operation.

          • Arn (string) --

            The Amazon Resource Name (ARN) of the rollback trigger.

            If a specified trigger is missing, the entire stack operation fails and is rolled back.

          • Type (string) --

            The resource type of the rollback trigger. Specify either AWS::CloudWatch::Alarm or AWS::CloudWatch::CompositeAlarm resource types.

      • MonitoringTimeInMinutes (integer) --

        The amount of time, in minutes, during which CloudFormation should monitor all the rollback triggers after the stack creation or update operation deploys all necessary resources.

        The default is 0 minutes.

        If you specify a monitoring period but don't specify any rollback triggers, CloudFormation still waits the specified period of time before cleaning up old resources after update operations. You can use this monitoring period to perform any manual stack validation desired, and manually cancel the stack creation or update (using CancelUpdateStack , for example) as necessary.

        If you specify 0 for this parameter, CloudFormation still monitors the specified rollback triggers during stack creation and update operations. Then, for update operations, it begins disposing of old resources immediately once the operation completes.

    • Capabilities (list) --

      If you execute the change set, the list of capabilities that were explicitly acknowledged when the change set was created.

      • (string) --

    • Tags (list) --

      If you execute the change set, the tags that will be associated with the stack.

      • (dict) --

        The Tag type enables you to specify a key-value pair that can be used to store information about an CloudFormation stack.

        • Key (string) --

          Required . A string used to identify this tag. You can specify a maximum of 128 characters for a tag key. Tags owned by Amazon Web Services (Amazon Web Services) have the reserved prefix: aws: .

        • Value (string) --

          Required . A string containing the value for this tag. You can specify a maximum of 256 characters for a tag value.

    • Changes (list) --

      A list of Change structures that describes the resources CloudFormation changes if you execute the change set.

      • (dict) --

        The Change structure describes the changes CloudFormation will perform if you execute the change set.

        • Type (string) --

          The type of entity that CloudFormation changes. Currently, the only entity type is Resource .

        • HookInvocationCount (integer) --

          Is either null , if no hooks invoke for the resource, or contains the number of hooks that will invoke for the resource.

        • ResourceChange (dict) --

          A ResourceChange structure that describes the resource and action that CloudFormation will perform.

          • Action (string) --

            The action that CloudFormation takes on the resource, such as Add (adds a new resource), Modify (changes a resource), Remove (deletes a resource), Import (imports a resource), or Dynamic (exact action for the resource can't be determined).

          • LogicalResourceId (string) --

            The resource's logical ID, which is defined in the stack's template.

          • PhysicalResourceId (string) --

            The resource's physical ID (resource name). Resources that you are adding don't have physical IDs because they haven't been created.

          • ResourceType (string) --

            The type of CloudFormation resource, such as AWS::S3::Bucket .

          • Replacement (string) --

            For the Modify action, indicates whether CloudFormation will replace the resource by creating a new one and deleting the old one. This value depends on the value of the RequiresRecreation property in the ResourceTargetDefinition structure. For example, if the RequiresRecreation field is Always and the Evaluation field is Static , Replacement is True . If the RequiresRecreation field is Always and the Evaluation field is Dynamic , Replacement is Conditionally .

            If you have multiple changes with different RequiresRecreation values, the Replacement value depends on the change with the most impact. A RequiresRecreation value of Always has the most impact, followed by Conditionally , and then Never .

          • Scope (list) --

            For the Modify action, indicates which resource attribute is triggering this update, such as a change in the resource attribute's Metadata , Properties , or Tags .

            • (string) --

          • Details (list) --

            For the Modify action, a list of ResourceChangeDetail structures that describes the changes that CloudFormation will make to the resource.

            • (dict) --

              For a resource with Modify as the action, the ResourceChange structure describes the changes CloudFormation will make to that resource.

              • Target (dict) --

                A ResourceTargetDefinition structure that describes the field that CloudFormation will change and whether the resource will be recreated.

                • Attribute (string) --

                  Indicates which resource attribute is triggering this update, such as a change in the resource attribute's Metadata , Properties , or Tags .

                • Name (string) --

                  If the Attribute value is Properties , the name of the property. For all other attributes, the value is null.

                • RequiresRecreation (string) --

                  If the Attribute value is Properties , indicates whether a change to this property causes the resource to be recreated. The value can be Never , Always , or Conditionally . To determine the conditions for a Conditionally recreation, see the update behavior for that property in the CloudFormation User Guide.

              • Evaluation (string) --

                Indicates whether CloudFormation can determine the target value, and whether the target value will change before you execute a change set.

                For Static evaluations, CloudFormation can determine that the target value will change, and its value. For example, if you directly modify the InstanceType property of an EC2 instance, CloudFormation knows that this property value will change, and its value, so this is a Static evaluation.

                For Dynamic evaluations, can't determine the target value because it depends on the result of an intrinsic function, such as a Ref or Fn::GetAtt intrinsic function, when the stack is updated. For example, if your template includes a reference to a resource that's conditionally recreated, the value of the reference (the physical ID of the resource) might change, depending on if the resource is recreated. If the resource is recreated, it will have a new physical ID, so all references to that resource will also be updated.

              • ChangeSource (string) --

                The group to which the CausingEntity value belongs. There are five entity groups:

                • ResourceReference entities are Ref intrinsic functions that refer to resources in the template, such as { "Ref" : "MyEC2InstanceResource" } .

                • ParameterReference entities are Ref intrinsic functions that get template parameter values, such as { "Ref" : "MyPasswordParameter" } .

                • ResourceAttribute entities are Fn::GetAtt intrinsic functions that get resource attribute values, such as { "Fn::GetAtt" : [ "MyEC2InstanceResource", "PublicDnsName" ] } .

                • DirectModification entities are changes that are made directly to the template.

                • Automatic entities are AWS::CloudFormation::Stack resource types, which are also known as nested stacks. If you made no changes to the AWS::CloudFormation::Stack resource, CloudFormation sets the ChangeSource to Automatic because the nested stack's template might have changed. Changes to a nested stack's template aren't visible to CloudFormation until you run an update on the parent stack.

              • CausingEntity (string) --

                The identity of the entity that triggered this change. This entity is a member of the group that's specified by the ChangeSource field. For example, if you modified the value of the KeyPairName parameter, the CausingEntity is the name of the parameter (KeyPairName ).

                If the ChangeSource value is DirectModification , no value is given for CausingEntity .

          • ChangeSetId (string) --

            The change set ID of the nested change set.

          • ModuleInfo (dict) --

            Contains information about the module from which the resource was created, if the resource was created from a module included in the stack template.

            • TypeHierarchy (string) --

              A concatenated list of the module type or types containing the resource. Module types are listed starting with the inner-most nested module, and separated by / .

              In the following example, the resource was created from a module of type AWS::First::Example::MODULE , that's nested inside a parent module of type AWS::Second::Example::MODULE .

              AWS::First::Example::MODULE/AWS::Second::Example::MODULE

            • LogicalIdHierarchy (string) --

              A concatenated list of the logical IDs of the module or modules containing the resource. Modules are listed starting with the inner-most nested module, and separated by / .

              In the following example, the resource was created from a module, moduleA , that's nested inside a parent module, moduleB .

              moduleA/moduleB

              For more information, see Referencing resources in a module in the CloudFormation User Guide .

    • NextToken (string) --

      If the output exceeds 1 MB, a string that identifies the next page of changes. If there is no additional page, this value is null.

    • IncludeNestedStacks (boolean) --

      Verifies if IncludeNestedStacks is set to True .

    • ParentChangeSetId (string) --

      Specifies the change set ID of the parent change set in the current nested change set hierarchy.

    • RootChangeSetId (string) --

      Specifies the change set ID of the root change set in the current nested change set hierarchy.

DescribeStackEvents (updated) Link ¶
Changes (response)
{'StackEvents': {'HookFailureMode': 'FAIL | WARN',
                 'HookInvocationPoint': 'PRE_PROVISION',
                 'HookStatus': 'HOOK_IN_PROGRESS | HOOK_COMPLETE_SUCCEEDED | '
                               'HOOK_COMPLETE_FAILED | HOOK_FAILED',
                 'HookStatusReason': 'string',
                 'HookType': 'string'}}

Returns all stack related events for a specified stack in reverse chronological order. For more information about a stack's event history, go to Stacks in the CloudFormation User Guide.

Note

You can list events for stacks that have failed to create or have been deleted by specifying the unique stack identifier (stack ID).

See also: AWS API Documentation

Request Syntax

client.describe_stack_events(
    StackName='string',
    NextToken='string'
)
type StackName

string

param StackName

The name or the unique stack ID that's associated with the stack, which aren't always interchangeable:

  • Running stacks: You can specify either the stack's name or its unique stack ID.

  • Deleted stacks: You must specify the unique stack ID.

Default: There is no default value.

type NextToken

string

param NextToken

A string that identifies the next page of events that you want to retrieve.

rtype

dict

returns

Response Syntax

{
    'StackEvents': [
        {
            'StackId': 'string',
            'EventId': 'string',
            'StackName': 'string',
            'LogicalResourceId': 'string',
            'PhysicalResourceId': 'string',
            'ResourceType': 'string',
            'Timestamp': datetime(2015, 1, 1),
            'ResourceStatus': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATE_COMPLETE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETE_COMPLETE'|'DELETE_SKIPPED'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED'|'UPDATE_COMPLETE'|'IMPORT_FAILED'|'IMPORT_COMPLETE'|'IMPORT_IN_PROGRESS'|'IMPORT_ROLLBACK_IN_PROGRESS'|'IMPORT_ROLLBACK_FAILED'|'IMPORT_ROLLBACK_COMPLETE'|'UPDATE_ROLLBACK_IN_PROGRESS'|'UPDATE_ROLLBACK_COMPLETE'|'UPDATE_ROLLBACK_FAILED'|'ROLLBACK_IN_PROGRESS'|'ROLLBACK_COMPLETE'|'ROLLBACK_FAILED',
            'ResourceStatusReason': 'string',
            'ResourceProperties': 'string',
            'ClientRequestToken': 'string',
            'HookType': 'string',
            'HookStatus': 'HOOK_IN_PROGRESS'|'HOOK_COMPLETE_SUCCEEDED'|'HOOK_COMPLETE_FAILED'|'HOOK_FAILED',
            'HookStatusReason': 'string',
            'HookInvocationPoint': 'PRE_PROVISION',
            'HookFailureMode': 'FAIL'|'WARN'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    The output for a DescribeStackEvents action.

    • StackEvents (list) --

      A list of StackEvents structures.

      • (dict) --

        The StackEvent data type.

        • StackId (string) --

          The unique ID name of the instance of the stack.

        • EventId (string) --

          The unique ID of this event.

        • StackName (string) --

          The name associated with a stack.

        • LogicalResourceId (string) --

          The logical name of the resource specified in the template.

        • PhysicalResourceId (string) --

          The name or unique identifier associated with the physical instance of the resource.

        • ResourceType (string) --

          Type of resource. (For more information, go to Amazon Web Services Resource Types Reference in the CloudFormation User Guide.)

        • Timestamp (datetime) --

          Time the status was updated.

        • ResourceStatus (string) --

          Current status of the resource.

        • ResourceStatusReason (string) --

          Success/failure message associated with the resource.

        • ResourceProperties (string) --

          BLOB of the properties used to create the resource.

        • ClientRequestToken (string) --

          The token passed to the operation that generated this event.

          All events triggered by a given stack operation are assigned the same client request token, which you can use to track operations. For example, if you execute a CreateStack operation with the token token1 , then all the StackEvents generated by that operation will have ClientRequestToken set as token1 .

          In the console, stack operations display the client request token on the Events tab. Stack operations that are initiated from the console use the token format Console-StackOperation-ID , which helps you easily identify the stack operation . For example, if you create a stack using the console, each stack event would be assigned the same token in the following format: Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002 .

        • HookType (string) --

          The name of the hook.

        • HookStatus (string) --

          Provides the status of the change set hook.

        • HookStatusReason (string) --

          Provides the reason for the hook status.

        • HookInvocationPoint (string) --

          Invocation points are points in provisioning logic where hooks are initiated.

        • HookFailureMode (string) --

          Specify the hook failure mode for non-compliant resources in the followings ways.

          • FAIL Stops provisioning resources.

          • WARN Allows provisioning to continue with a warning message.

    • NextToken (string) --

      If the output exceeds 1 MB in size, a string that identifies the next page of events. If no additional page exists, this value is null.

DescribeType (updated) Link ¶
Changes (both)
{'Type': {'HOOK'}}

Returns detailed information about an extension that has been registered.

If you specify a VersionId , DescribeType returns information about that specific extension version. Otherwise, it returns information about the default extension version.

See also: AWS API Documentation

Request Syntax

client.describe_type(
    Type='RESOURCE'|'MODULE'|'HOOK',
    TypeName='string',
    Arn='string',
    VersionId='string',
    PublisherId='string',
    PublicVersionNumber='string'
)
type Type

string

param Type

The kind of extension.

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

type TypeName

string

param TypeName

The name of the extension.

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

type Arn

string

param Arn

The Amazon Resource Name (ARN) of the extension.

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

type VersionId

string

param VersionId

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.

If you specify a VersionId , DescribeType returns information about that specific extension version. Otherwise, it returns information about the default extension version.

type PublisherId

string

param PublisherId

The publisher ID of the extension publisher.

Extensions provided by Amazon are not assigned a publisher ID.

type PublicVersionNumber

string

param PublicVersionNumber

The version number of a public third-party extension.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string',
    'Type': 'RESOURCE'|'MODULE'|'HOOK',
    'TypeName': 'string',
    'DefaultVersionId': 'string',
    'IsDefaultVersion': True|False,
    'TypeTestsStatus': 'PASSED'|'FAILED'|'IN_PROGRESS'|'NOT_TESTED',
    'TypeTestsStatusDescription': 'string',
    'Description': 'string',
    'Schema': 'string',
    'ProvisioningType': 'NON_PROVISIONABLE'|'IMMUTABLE'|'FULLY_MUTABLE',
    'DeprecatedStatus': 'LIVE'|'DEPRECATED',
    'LoggingConfig': {
        'LogRoleArn': 'string',
        'LogGroupName': 'string'
    },
    'RequiredActivatedTypes': [
        {
            'TypeNameAlias': 'string',
            'OriginalTypeName': 'string',
            'PublisherId': 'string',
            'SupportedMajorVersions': [
                123,
            ]
        },
    ],
    'ExecutionRoleArn': 'string',
    'Visibility': 'PUBLIC'|'PRIVATE',
    'SourceUrl': 'string',
    'DocumentationUrl': 'string',
    'LastUpdated': datetime(2015, 1, 1),
    'TimeCreated': datetime(2015, 1, 1),
    'ConfigurationSchema': 'string',
    'PublisherId': 'string',
    'OriginalTypeName': 'string',
    'OriginalTypeArn': 'string',
    'PublicVersionNumber': 'string',
    'LatestPublicVersion': 'string',
    'IsActivated': True|False,
    'AutoUpdate': True|False
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the extension.

    • Type (string) --

      The kind of extension.

    • TypeName (string) --

      The name of the extension.

      If the extension is a public third-party type you have activated with a type name alias, CloudFormation returns the type name alias. For more information, see ActivateType .

    • DefaultVersionId (string) --

      The ID of the default version of the extension. The default version is used when the extension version isn't specified.

      This applies only to private extensions you have registered in your account. For public extensions, both those provided by Amazon and published by third parties, CloudFormation returns null . For more information, see RegisterType .

      To set the default version of an extension, use `` SetTypeDefaultVersion `` .

    • IsDefaultVersion (boolean) --

      Whether the specified extension version is set as the default version.

      This applies only to private extensions you have registered in your account, and extensions published by Amazon. For public third-party extensions, whether or not they are activated in your account, CloudFormation returns null .

    • TypeTestsStatus (string) --

      The contract test status of the registered extension version. To return the extension test status of a specific extension version, you must specify VersionId .

      This applies only to registered private extension versions. CloudFormation doesn't return this information for public extensions, whether or not they are activated in your account.

      • PASSED : The extension has passed all its contract tests. An extension must have a test status of PASSED before it can be published. For more information, see Publishing extensions to make them available for public use in the CloudFormation Command Line Interface User Guide .

      • FAILED : The extension has failed one or more contract tests.

      • IN_PROGRESS : Contract tests are currently being performed on the extension.

      • NOT_TESTED : Contract tests haven't been performed on the extension.

    • TypeTestsStatusDescription (string) --

      The description of the test status. To return the extension test status of a specific extension version, you must specify VersionId .

      This applies only to registered private extension versions. CloudFormation doesn't return this information for public extensions, whether or not they are activated in your account.

    • Description (string) --

      The description of the extension.

    • Schema (string) --

      The schema that defines the extension.

      For more information on extension schemas, see Resource Provider Schema in the CloudFormation CLI User Guide .

    • ProvisioningType (string) --

      For resource type extensions, the provisioning behavior of the resource type. CloudFormation determines the provisioning type during registration, based on the types of handlers in the schema handler package submitted.

      Valid values include:

      • FULLY_MUTABLE : The resource type includes an update handler to process updates to the type during stack update operations.

      • IMMUTABLE : The resource type doesn't include an update handler, so the type can't be updated and must instead be replaced during stack update operations.

      • NON_PROVISIONABLE : The resource type doesn't include all the following handlers, and therefore can't actually be provisioned.

        • create

        • read

        • delete

    • DeprecatedStatus (string) --

      The deprecation status of the extension version.

      Valid values include:

      • LIVE : The extension is activated or registered and can be used in CloudFormation operations, dependent on its provisioning behavior and visibility scope.

      • DEPRECATED : The extension has been deactivated or deregistered and can no longer be used in CloudFormation operations.

      For public third-party extensions, CloudFormation returns null .

    • LoggingConfig (dict) --

      Contains logging configuration information for private extensions. This applies only to private extensions you have registered in your account. For public extensions, both those provided by Amazon and published by third parties, CloudFormation returns null . For more information, see RegisterType .

      • LogRoleArn (string) --

        The Amazon Resource Name (ARN) of the role that CloudFormation should assume when sending log entries to CloudWatch Logs.

      • LogGroupName (string) --

        The Amazon CloudWatch Logs group to which CloudFormation sends error logging information when invoking the extension's handlers.

    • RequiredActivatedTypes (list) --

      For extensions that are modules, the public third-party extensions that must be activated in your account in order for the module itself to be activated.

      • (dict) --

        For extensions that are modules, a public third-party extension that must be activated in your account in order for the module itself to be activated.

        For more information, see Activating public modules for use in your account in the CloudFormation User Guide .

        • TypeNameAlias (string) --

          An alias assigned 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.

        • OriginalTypeName (string) --

          The type name of the public extension.

          If you specified a TypeNameAlias when enabling the extension in this account and region, CloudFormation treats that alias as the extension's type name within the account and region, not the type name of the public extension. For more information, see Specifying aliases to refer to extensions in the CloudFormation User Guide .

        • PublisherId (string) --

          The publisher ID of the extension publisher.

        • SupportedMajorVersions (list) --

          A list of the major versions of the extension type that the macro supports.

          • (integer) --

    • ExecutionRoleArn (string) --

      The Amazon Resource Name (ARN) of the IAM execution role used to register the extension. This applies only to private extensions you have registered in your account. For more information, see RegisterType .

      If the registered extension calls any Amazon Web Services APIs, you must create an * IAM execution role * that includes the necessary permissions to call those Amazon Web Services APIs, and provision that execution role in your account. CloudFormation then assumes that execution role to provide your extension with the appropriate credentials.

    • Visibility (string) --

      The scope at which the extension is visible and usable in CloudFormation operations.

      Valid values include:

      • PRIVATE : The extension is only visible and usable within the account in which it is registered. CloudFormation marks any extensions you register as PRIVATE .

      • PUBLIC : The extension is publicly visible and usable within any Amazon account.

    • SourceUrl (string) --

      The URL of the source code for the extension.

    • DocumentationUrl (string) --

      The URL of a page providing detailed documentation for this extension.

    • LastUpdated (datetime) --

      When the specified extension version was registered. This applies only to:

      • Private extensions you have registered in your account. For more information, see RegisterType .

      • Public extensions you have activated in your account with auto-update specified. For more information, see ActivateType .

    • TimeCreated (datetime) --

      When the specified private extension version was registered or activated in your account.

    • ConfigurationSchema (string) --

      A JSON string that represent the current configuration data for the extension in this account and region.

      To set the configuration data for an extension, use SetTypeConfiguration . For more information, see Configuring extensions at the account level in the CloudFormation User Guide .

    • PublisherId (string) --

      The publisher ID of the extension publisher.

      This applies only to public third-party extensions. For private registered extensions, and extensions provided by Amazon Web Services, CloudFormation returns null .

    • OriginalTypeName (string) --

      For public extensions that have been activated for this account and region, the type name of the public extension.

      If you specified a TypeNameAlias when enabling the extension in this account and region, CloudFormation treats that alias as the extension's type name within the account and region, not the type name of the public extension. For more information, see Specifying aliases to refer to extensions in the CloudFormation User Guide .

    • OriginalTypeArn (string) --

      For public extensions that have been activated for this account and region, the Amazon Resource Name (ARN) of the public extension.

    • PublicVersionNumber (string) --

      The version number of a public third-party extension.

      This applies only if you specify a public extension you have activated in your account, or specify a public extension without specifying a version. For all other extensions, CloudFormation returns null .

    • LatestPublicVersion (string) --

      The latest version of a public extension that is available for use.

      This only applies if you specify a public extension, and you don't specify a version. For all other requests, CloudFormation returns null .

    • IsActivated (boolean) --

      Whether or not the extension is activated in the account and region.

      This only applies to public third-party extensions. For all other extensions, CloudFormation returns null .

    • AutoUpdate (boolean) --

      Whether CloudFormation automatically updates 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. For more information, see Activating public extensions for use in your account in the CloudFormation User Guide .

ListTypeRegistrations (updated) Link ¶
Changes (request)
{'Type': {'HOOK'}}

Returns a list of registration tokens for the specified extension(s).

See also: AWS API Documentation

Request Syntax

client.list_type_registrations(
    Type='RESOURCE'|'MODULE'|'HOOK',
    TypeName='string',
    TypeArn='string',
    RegistrationStatusFilter='COMPLETE'|'IN_PROGRESS'|'FAILED',
    MaxResults=123,
    NextToken='string'
)
type Type

string

param Type

The kind of extension.

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

type TypeName

string

param TypeName

The name of the extension.

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

type TypeArn

string

param TypeArn

The Amazon Resource Name (ARN) of the extension.

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

type RegistrationStatusFilter

string

param RegistrationStatusFilter

The current status of the extension registration request.

The default is IN_PROGRESS .

type MaxResults

integer

param MaxResults

The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

type NextToken

string

param NextToken

If the previous paginated request didn't return all the remaining results, the response object's NextToken parameter value is set to a token. To retrieve the next set of results, call this action again and assign that token to the request object's NextToken parameter. If there are no remaining results, the previous response object's NextToken parameter is set to null .

rtype

dict

returns

Response Syntax

{
    'RegistrationTokenList': [
        'string',
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • RegistrationTokenList (list) --

      A list of extension registration tokens.

      Use `` DescribeTypeRegistration `` to return detailed information about a type registration request.

      • (string) --

    • NextToken (string) --

      If the request doesn't return all of the remaining results, NextToken is set to a token. To retrieve the next set of results, call this action again and assign that token to the request object's NextToken parameter. If the request returns all results, NextToken is set to null .

ListTypeVersions (updated) Link ¶
Changes (request, response)
Request
{'Type': {'HOOK'}}
Response
{'TypeVersionSummaries': {'Type': {'HOOK'}}}

Returns summary information about the versions of an extension.

See also: AWS API Documentation

Request Syntax

client.list_type_versions(
    Type='RESOURCE'|'MODULE'|'HOOK',
    TypeName='string',
    Arn='string',
    MaxResults=123,
    NextToken='string',
    DeprecatedStatus='LIVE'|'DEPRECATED',
    PublisherId='string'
)
type Type

string

param Type

The kind of the extension.

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

type TypeName

string

param TypeName

The name of the extension for which you want version summary information.

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

type Arn

string

param Arn

The Amazon Resource Name (ARN) of the extension for which you want version summary information.

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

type MaxResults

integer

param MaxResults

The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

type NextToken

string

param NextToken

If the previous paginated request didn't return all of the remaining results, the response object's NextToken parameter value is set to a token. To retrieve the next set of results, call this action again and assign that token to the request object's NextToken parameter. If there are no remaining results, the previous response object's NextToken parameter is set to null .

type DeprecatedStatus

string

param DeprecatedStatus

The deprecation status of the extension versions that you want to get summary information about.

Valid values include:

  • LIVE : The extension version is registered and can be used in CloudFormation operations, dependent on its provisioning behavior and visibility scope.

  • DEPRECATED : The extension version has been deregistered and can no longer be used in CloudFormation operations.

The default is LIVE .

type PublisherId

string

param PublisherId

The publisher ID of the extension publisher.

Extensions published by Amazon aren't assigned a publisher ID.

rtype

dict

returns

Response Syntax

{
    'TypeVersionSummaries': [
        {
            'Type': 'RESOURCE'|'MODULE'|'HOOK',
            'TypeName': 'string',
            'VersionId': 'string',
            'IsDefaultVersion': True|False,
            'Arn': 'string',
            'TimeCreated': datetime(2015, 1, 1),
            'Description': 'string',
            'PublicVersionNumber': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TypeVersionSummaries (list) --

      A list of TypeVersionSummary structures that contain information about the specified extension's versions.

      • (dict) --

        Contains summary information about a specific version of a CloudFormation extension.

        • Type (string) --

          The kind of extension.

        • TypeName (string) --

          The name of the extension.

        • VersionId (string) --

          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's registered.

        • IsDefaultVersion (boolean) --

          Whether the specified extension version is set as the default version.

          This applies only to private extensions you have registered in your account, and extensions published by Amazon. For public third-party extensions, CloudFormation returns null .

        • Arn (string) --

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

        • TimeCreated (datetime) --

          When the version was registered.

        • Description (string) --

          The description of the extension version.

        • PublicVersionNumber (string) --

          For public extensions that have been activated for this account and region, the version of the public extension to be used for CloudFormation operations in this account and region. For any extensions other than activated third-arty extensions, CloudFormation returns null .

          How you specified AutoUpdate when enabling the extension affects whether CloudFormation automatically updates the extension in this account and region when a new version is released. For more information, see Setting CloudFormation to automatically use new versions of extensions in the CloudFormation User Guide .

    • NextToken (string) --

      If the request doesn't return all of the remaining results, NextToken is set to a token. To retrieve the next set of results, call this action again and assign that token to the request object's NextToken parameter. If the request returns all results, NextToken is set to null .

ListTypes (updated) Link ¶
Changes (request, response)
Request
{'Type': {'HOOK'}}
Response
{'TypeSummaries': {'Type': {'HOOK'}}}

Returns summary information about extension that have been registered with CloudFormation.

See also: AWS API Documentation

Request Syntax

client.list_types(
    Visibility='PUBLIC'|'PRIVATE',
    ProvisioningType='NON_PROVISIONABLE'|'IMMUTABLE'|'FULLY_MUTABLE',
    DeprecatedStatus='LIVE'|'DEPRECATED',
    Type='RESOURCE'|'MODULE'|'HOOK',
    Filters={
        'Category': 'REGISTERED'|'ACTIVATED'|'THIRD_PARTY'|'AWS_TYPES',
        'PublisherId': 'string',
        'TypeNamePrefix': 'string'
    },
    MaxResults=123,
    NextToken='string'
)
type Visibility

string

param Visibility

The scope at which the extensions are visible and usable in CloudFormation operations.

Valid values include:

  • PRIVATE : Extensions that are visible and usable within this account and region. This includes:

    • Private extensions you have registered in this account and region.

    • Public extensions that you have activated in this account and region.

  • PUBLIC : Extensions that are publicly visible and available to be activated within any Amazon account. This includes extensions from Amazon, as well as third-party publishers.

The default is PRIVATE .

type ProvisioningType

string

param ProvisioningType

For resource types, the provisioning behavior of the resource type. CloudFormation determines the provisioning type during registration, based on the types of handlers in the schema handler package submitted.

Valid values include:

  • FULLY_MUTABLE : The resource type includes an update handler to process updates to the type during stack update operations.

  • IMMUTABLE : The resource type doesn't include an update handler, so the type can't be updated and must instead be replaced during stack update operations.

  • NON_PROVISIONABLE : The resource type doesn't include create, read, and delete handlers, and therefore can't actually be provisioned.

The default is FULLY_MUTABLE .

type DeprecatedStatus

string

param DeprecatedStatus

The deprecation status of the extension that you want to get summary information about.

Valid values include:

  • LIVE : The extension is registered for use in CloudFormation operations.

  • DEPRECATED : The extension has been deregistered and can no longer be used in CloudFormation operations.

type Type

string

param Type

The type of extension.

type Filters

dict

param Filters

Filter criteria to use in determining which extensions to return.

Filters must be compatible with Visibility to return valid results. For example, specifying AWS_TYPES for Category and PRIVATE for Visibility returns an empty list of types, but specifying PUBLIC for Visibility returns the desired list.

  • Category (string) --

    The category of extensions to return.

    • REGISTERED : Private extensions that have been registered for this account and region.

    • ACTIVATED : Public extensions that have been activated for this account and region.

    • THIRD_PARTY : Extensions available for use from publishers other than Amazon. This includes:

      • Private extensions registered in the account.

      • Public extensions from publishers other than Amazon, whether activated or not.

    • AWS_TYPES : Extensions available for use from Amazon.

  • PublisherId (string) --

    The id of the publisher of the extension.

    Extensions published by Amazon aren't assigned a publisher ID. Use the AWS_TYPES category to specify a list of types published by Amazon.

  • TypeNamePrefix (string) --

    A prefix to use as a filter for results.

type MaxResults

integer

param MaxResults

The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

type NextToken

string

param NextToken

If the previous paginated request didn't return all of the remaining results, the response object's NextToken parameter value is set to a token. To retrieve the next set of results, call this action again and assign that token to the request object's NextToken parameter. If there are no remaining results, the previous response object's NextToken parameter is set to null .

rtype

dict

returns

Response Syntax

{
    'TypeSummaries': [
        {
            'Type': 'RESOURCE'|'MODULE'|'HOOK',
            'TypeName': 'string',
            'DefaultVersionId': 'string',
            'TypeArn': 'string',
            'LastUpdated': datetime(2015, 1, 1),
            'Description': 'string',
            'PublisherId': 'string',
            'OriginalTypeName': 'string',
            'PublicVersionNumber': 'string',
            'LatestPublicVersion': 'string',
            'PublisherIdentity': 'AWS_Marketplace'|'GitHub'|'Bitbucket',
            'PublisherName': 'string',
            'IsActivated': True|False
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TypeSummaries (list) --

      A list of TypeSummary structures that contain information about the specified extensions.

      • (dict) --

        Contains summary information about the specified CloudFormation extension.

        • Type (string) --

          The kind of extension.

        • TypeName (string) --

          The name of the extension.

          If you specified a TypeNameAlias when you activate this extension in your account and region, CloudFormation considers that alias as the type name.

        • DefaultVersionId (string) --

          The ID of the default version of the extension. The default version is used when the extension version isn't specified.

          This applies only to private extensions you have registered in your account. For public extensions, both those provided by Amazon and published by third parties, CloudFormation returns null . For more information, see RegisterType .

          To set the default version of an extension, use `` SetTypeDefaultVersion `` .

        • TypeArn (string) --

          The Amazon Resource Name (ARN) of the extension.

        • LastUpdated (datetime) --

          When the specified extension version was registered. This applies only to:

          • Private extensions you have registered in your account. For more information, see RegisterType .

          • Public extensions you have activated in your account with auto-update specified. For more information, see ActivateType .

          For all other extension types, CloudFormation returns null .

        • Description (string) --

          The description of the extension.

        • PublisherId (string) --

          The ID of the extension publisher, if the extension is published by a third party. Extensions published by Amazon don't return a publisher ID.

        • OriginalTypeName (string) --

          For public extensions that have been activated for this account and region, the type name of the public extension.

          If you specified a TypeNameAlias when enabling the extension in this account and region, CloudFormation treats that alias as the extension's type name within the account and region, not the type name of the public extension. For more information, see Specifying aliases to refer to extensions in the CloudFormation User Guide .

        • PublicVersionNumber (string) --

          For public extensions that have been activated for this account and region, the version of the public extension to be used for CloudFormation operations in this account and Region.

          How you specified AutoUpdate when enabling the extension affects whether CloudFormation automatically updates the extension in this account and region when a new version is released. For more information, see Setting CloudFormation to automatically use new versions of extensions in the CloudFormation User Guide .

        • LatestPublicVersion (string) --

          For public extensions that have been activated for this account and region, the latest version of the public extension that is available . For any extensions other than activated third-arty extensions, CloudFormation returns null .

          How you specified AutoUpdate when enabling the extension affects whether CloudFormation automatically updates the extension in this account and region when a new version is released. For more information, see Setting CloudFormation to automatically use new versions of extensions in the CloudFormation User Guide .

        • PublisherIdentity (string) --

          The service used to verify the publisher identity.

          For more information, see Registering your account to publish CloudFormation extensions in the CFN-CLI User Guide for Extension Development .

        • PublisherName (string) --

          The publisher name, as defined in the public profile for that publisher in the service used to verify the publisher identity.

        • IsActivated (boolean) --

          Whether or not the extension is activated for this account and region.

          This applies only to third-party public extensions. Extensions published by Amazon are activated by default.

    • NextToken (string) --

      If the request doesn't return all the remaining results, NextToken is set to a token. To retrieve the next set of results, call this action again and assign that token to the request object's NextToken parameter. If the request returns all results, NextToken is set to null .

PublishType (updated) Link ¶
Changes (request)
{'Type': {'HOOK'}}

Publishes the specified extension to the CloudFormation registry as a public extension in this region. Public extensions are available for use by all CloudFormation users. For more information on publishing extensions, see Publishing extensions to make them available for public use in the CloudFormation CLI User Guide .

To publish an extension, you must be registered as a publisher with CloudFormation. For more information, see RegisterPublisher .

See also: AWS API Documentation

Request Syntax

client.publish_type(
    Type='RESOURCE'|'MODULE'|'HOOK',
    Arn='string',
    TypeName='string',
    PublicVersionNumber='string'
)
type Type

string

param Type

The type of the extension.

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

type Arn

string

param Arn

The Amazon Resource Number (ARN) of the extension.

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

type TypeName

string

param TypeName

The name of the extension.

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

type PublicVersionNumber

string

param PublicVersionNumber

The version number to assign to this version of the extension.

Use the following format, and adhere to semantic versioning when assigning a version number to your extension:

MAJOR.MINOR.PATCH

For more information, see Semantic Versioning 2.0.0 .

If you don't specify a version number, CloudFormation increments the version number by one minor version release.

You cannot specify a version number the first time you publish a type. CloudFormation automatically sets the first version number to be 1.0.0 .

rtype

dict

returns

Response Syntax

{
    'PublicTypeArn': 'string'
}

Response Structure

  • (dict) --

    • PublicTypeArn (string) --

      The Amazon Resource Number (ARN) assigned to the public extension upon publication.

RegisterType (updated) Link ¶
Changes (request)
{'Type': {'HOOK'}}

Registers an extension with the CloudFormation service. Registering an extension makes it available for use in CloudFormation templates in your Amazon Web Services account, and includes:

  • Validating the extension schema.

  • Determining which handlers, if any, have been specified for the extension.

  • Making the extension available for use in your account.

For more information on how to develop extensions and ready them for registration, see Creating Resource Providers in the CloudFormation CLI User Guide .

You can have a maximum of 50 resource extension versions registered at a time. This maximum is per account and per region. Use DeregisterType to deregister specific extension versions if necessary.

Once you have initiated a registration request using `` RegisterType `` , you can use `` DescribeTypeRegistration `` to monitor the progress of the registration request.

Once you have registered a private extension in your account and region, use SetTypeConfiguration to specify configuration properties for the extension. For more information, see Configuring extensions at the account level in the CloudFormation User Guide .

See also: AWS API Documentation

Request Syntax

client.register_type(
    Type='RESOURCE'|'MODULE'|'HOOK',
    TypeName='string',
    SchemaHandlerPackage='string',
    LoggingConfig={
        'LogRoleArn': 'string',
        'LogGroupName': 'string'
    },
    ExecutionRoleArn='string',
    ClientRequestToken='string'
)
type Type

string

param Type

The kind of extension.

type TypeName

string

param TypeName

[REQUIRED]

The name of the extension being registered.

We recommend that extension names adhere to the following patterns:

  • For resource types, company_or_organization ::service ::type .

  • For modules, company_or_organization ::service ::type ::MODULE.

Note

The following organization namespaces are reserved and can't be used in your extension names:

  • Alexa

  • AMZN

  • Amazon

  • AWS

  • Custom

  • Dev

type SchemaHandlerPackage

string

param SchemaHandlerPackage

[REQUIRED]

A URL to the S3 bucket containing the extension project package that contains the necessary files for the extension you want to register.

For information on generating a schema handler package for the extension you want to register, see submit in the CloudFormation CLI User Guide .

Note

The user registering the extension must be able to access the package in the S3 bucket. That's, the user needs to have GetObject permissions for the schema handler package. For more information, see Actions, Resources, and Condition Keys for Amazon S3 in the Identity and Access Management User Guide .

type LoggingConfig

dict

param LoggingConfig

Specifies logging configuration information for an extension.

  • LogRoleArn (string) -- [REQUIRED]

    The Amazon Resource Name (ARN) of the role that CloudFormation should assume when sending log entries to CloudWatch Logs.

  • LogGroupName (string) -- [REQUIRED]

    The Amazon CloudWatch Logs group to which CloudFormation sends error logging information when invoking the extension's handlers.

type ExecutionRoleArn

string

param ExecutionRoleArn

The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the extension.

For CloudFormation to assume the specified execution role, the role must contain a trust relationship with the CloudFormation service principle (resources.cloudformation.amazonaws.com ). For more information on adding trust relationships, see Modifying a role trust policy in the Identity and Access Management User Guide .

If your extension calls Amazon Web Services APIs in any of its handlers, you must create an * IAM execution role * 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.

type ClientRequestToken

string

param ClientRequestToken

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.

rtype

dict

returns

Response Syntax

{
    'RegistrationToken': 'string'
}

Response Structure

  • (dict) --

    • RegistrationToken (string) --

      The identifier for this registration request.

      Use this registration token when calling `` DescribeTypeRegistration `` , which returns information about the status and IDs of the extension registration.

SetTypeConfiguration (updated) Link ¶
Changes (request)
{'Type': {'HOOK'}}

Specifies the configuration data for a registered CloudFormation extension, in the given account and region.

To view the current configuration data for an extension, refer to the ConfigurationSchema element of DescribeType . For more information, see Configuring extensions at the account level in the CloudFormation User Guide .

Warning

It's strongly recommended that you use dynamic references to restrict sensitive configuration definitions, such as third-party credentials. For more details on dynamic references, see Using dynamic references to specify template values in the CloudFormation User Guide .

See also: AWS API Documentation

Request Syntax

client.set_type_configuration(
    TypeArn='string',
    Configuration='string',
    ConfigurationAlias='string',
    TypeName='string',
    Type='RESOURCE'|'MODULE'|'HOOK'
)
type TypeArn

string

param TypeArn

The Amazon Resource Name (ARN) for the extension, in this account and region.

For public extensions, this will be the ARN assigned when you activate the type in this account and region. For private extensions, this will be the ARN assigned when you register the type 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.

type Configuration

string

param Configuration

[REQUIRED]

The configuration data for the extension, in this account and region.

The configuration data must be formatted as JSON, and validate against the schema returned in the ConfigurationSchema response element of API_DescribeType . For more information, see Defining account-level configuration data for an extension in the CloudFormation CLI User Guide .

type ConfigurationAlias

string

param ConfigurationAlias

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 TypeName

string

param TypeName

The name of the extension.

Conditional: You must specify ConfigurationArn , or Type and TypeName .

type Type

string

param Type

The type of extension.

Conditional: You must specify ConfigurationArn , or Type and TypeName .

rtype

dict

returns

Response Syntax

{
    'ConfigurationArn': 'string'
}

Response Structure

  • (dict) --

    • ConfigurationArn (string) --

      The Amazon Resource Name (ARN) for the configuration data, in this account and region.

      Conditional: You must specify ConfigurationArn , or Type and TypeName .

SetTypeDefaultVersion (updated) Link ¶
Changes (request)
{'Type': {'HOOK'}}

Specify the default version of an extension. The default version of an extension will be used in CloudFormation operations.

See also: AWS API Documentation

Request Syntax

client.set_type_default_version(
    Arn='string',
    Type='RESOURCE'|'MODULE'|'HOOK',
    TypeName='string',
    VersionId='string'
)
type Arn

string

param Arn

The Amazon Resource Name (ARN) of the extension for which you want version summary information.

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

type Type

string

param Type

The kind of extension.

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

type TypeName

string

param TypeName

The name of the extension.

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

type VersionId

string

param VersionId

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.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

TestType (updated) Link ¶
Changes (request)
{'Type': {'HOOK'}}

Tests a registered extension to make sure it meets all necessary requirements for being published in the CloudFormation registry.

  • For resource types, this includes passing all contracts tests defined for the type.

  • For modules, this includes determining if the module's model meets all necessary requirements.

For more information, see Testing your public extension prior to publishing in the CloudFormation CLI User Guide .

If you don't specify a version, CloudFormation uses the default version of the extension in your account and region for testing.

To perform testing, CloudFormation assumes the execution role specified when the type was registered. For more information, see RegisterType .

Once you've initiated testing on an extension using TestType , you can use DescribeType to monitor the current test status and test status description for the extension.

An extension must have a test status of PASSED before it can be published. For more information, see Publishing extensions to make them available for public use in the CloudFormation CLI User Guide .

See also: AWS API Documentation

Request Syntax

client.test_type(
    Arn='string',
    Type='RESOURCE'|'MODULE'|'HOOK',
    TypeName='string',
    VersionId='string',
    LogDeliveryBucket='string'
)
type Arn

string

param Arn

The Amazon Resource Name (ARN) of the extension.

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

type Type

string

param Type

The type of the extension to test.

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

type TypeName

string

param TypeName

The name of the extension to test.

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

type VersionId

string

param VersionId

The version of the extension to test.

You can specify the version id with either Arn , or with TypeName and Type .

If you don't specify a version, CloudFormation uses the default version of the extension in this account and region for testing.

type LogDeliveryBucket

string

param LogDeliveryBucket

The S3 bucket to which CloudFormation delivers the contract test execution logs.

CloudFormation delivers the logs by the time contract testing has completed and the extension has been assigned a test type status of PASSED or FAILED .

The user calling TestType must be able to access items in the specified S3 bucket. Specifically, the user needs the following permissions:

  • GetObject

  • PutObject

For more information, see Actions, Resources, and Condition Keys for Amazon S3 in the Amazon Web Services Identity and Access Management User Guide .

rtype

dict

returns

Response Syntax

{
    'TypeVersionArn': 'string'
}

Response Structure

  • (dict) --

    • TypeVersionArn (string) --

      The Amazon Resource Name (ARN) of the extension.