Skip to content
GitHubXDiscord

PublicTypeVersion

The PublicTypeVersion resource allows you to manage the versions of public types in AWS CloudFormation. This resource can be utilized to register, update, and manage the versions of public CloudFormation types. For more details, refer to the AWS CloudFormation PublicTypeVersions documentation.

This example demonstrates how to create a basic PublicTypeVersion with minimal required properties.

import AWS from "alchemy/aws/control";
const publicTypeVersion = await AWS.CloudFormation.PublicTypeVersion("myPublicTypeVersion", {
TypeName: "MyOrg::MyType",
Type: "resource",
PublicVersionNumber: "1.0.0"
});

In this example, we configure a PublicTypeVersion with additional options such as log delivery bucket and adopting existing resources.

const advancedPublicTypeVersion = await AWS.CloudFormation.PublicTypeVersion("advancedPublicTypeVersion", {
TypeName: "MyOrg::MyAdvancedType",
Type: "resource",
PublicVersionNumber: "1.0.1",
LogDeliveryBucket: "my-log-delivery-bucket",
adopt: true
});

This example shows how to set up a PublicTypeVersion with a specific log delivery bucket for logging purposes.

const loggingPublicTypeVersion = await AWS.CloudFormation.PublicTypeVersion("loggingPublicTypeVersion", {
TypeName: "MyOrg::MyLoggingType",
Type: "resource",
PublicVersionNumber: "1.0.2",
LogDeliveryBucket: "my-logging-bucket"
});

Here, we demonstrate how to adopt an existing public type version when creating a new instance.

const adoptExistingPublicTypeVersion = await AWS.CloudFormation.PublicTypeVersion("adoptExistingPublicTypeVersion", {
TypeName: "MyOrg::MyAdoptedType",
Type: "resource",
PublicVersionNumber: "1.0.0",
adopt: true // This will adopt the existing resource
});