Skip to content

test_type

Operation

test_type

test_type(request: TestTypeInput | TestTypeInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[TestTypeInputDict]) -> TestTypeOutput

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 before publishing in the CloudFormation Command Line Interface (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 pass the returned TypeVersionArn into 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 Command Line Interface (CLI) User Guide.

Parameters:

Name Type Description Default
request TestTypeInput | TestTypeInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[TestTypeInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
TestTypeOutput

An instance of TestTypeOutput.

test_type async

test_type(request: TestTypeInput | TestTypeInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[TestTypeInputDict]) -> TestTypeOutput

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 before publishing in the CloudFormation Command Line Interface (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 pass the returned TypeVersionArn into 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 Command Line Interface (CLI) User Guide.

Parameters:

Name Type Description Default
request TestTypeInput | TestTypeInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[TestTypeInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
TestTypeOutput

An instance of TestTypeOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

TestTypeInputDict

Bases: TypedDict

Dictionary form of TestTypeInput.

Attributes

arn instance-attribute
arn: str | None

The Amazon Resource Name (ARN) of the extension.

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

log_delivery_bucket instance-attribute
log_delivery_bucket: str | None

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 Identity and Access Management User Guide.

type instance-attribute
type: str | None

The type of the extension to test.

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

type_name instance-attribute
type_name: str | None

The name of the extension to test.

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

version_id instance-attribute
version_id: str | None

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.

TestTypeInput dataclass

Bases: _SerdeShape

Dataclass for TestTypeInput structure.

Attributes

arn class-attribute instance-attribute
arn: str | None = ...

The Amazon Resource Name (ARN) of the extension.

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

log_delivery_bucket class-attribute instance-attribute
log_delivery_bucket: str | None = ...

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 Identity and Access Management User Guide.

type class-attribute instance-attribute
type: str | None = ...

The type of the extension to test.

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

type_name class-attribute instance-attribute
type_name: str | None = ...

The name of the extension to test.

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

version_id class-attribute instance-attribute
version_id: str | None = ...

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.

Output

TestTypeOutput dataclass

Bases: _SerdeShape

Dataclass for TestTypeOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

type_version_arn class-attribute instance-attribute
type_version_arn: str | None = ...

The Amazon Resource Name (ARN) of the extension.