Class CfnResourceVersion

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.cloudformation.CfnResourceVersion
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:13.547Z") @Stability(Stable) public class CfnResourceVersion extends CfnResource implements IInspectable
Registers a resource version with the CloudFormation service.

Registering a resource version makes it available for use in CloudFormation templates in your AWS account , and includes:

  • Validating the resource schema.
  • Determining which handlers, if any, have been specified for the resource.
  • Making the resource available for use in your account.

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

You can have a maximum of 50 resource versions registered at a time. This maximum is per account and per Region.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.cloudformation.*;
 CfnResourceVersion cfnResourceVersion = CfnResourceVersion.Builder.create(this, "MyCfnResourceVersion")
         .schemaHandlerPackage("schemaHandlerPackage")
         .typeName("typeName")
         // the properties below are optional
         .executionRoleArn("executionRoleArn")
         .loggingConfig(LoggingConfigProperty.builder()
                 .logGroupName("logGroupName")
                 .logRoleArn("logRoleArn")
                 .build())
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnResourceVersion

      protected CfnResourceVersion(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnResourceVersion

      protected CfnResourceVersion(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnResourceVersion

      @Stability(Stable) public CfnResourceVersion(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnResourceVersionProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the extension.
    • getAttrIsDefaultVersion

      @Stability(Stable) @NotNull public IResolvable getAttrIsDefaultVersion()
      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 AWS . For public third-party extensions, whether they are activated in your account, CloudFormation returns null .

    • getAttrProvisioningType

      @Stability(Stable) @NotNull public String getAttrProvisioningType()
      For resource type extensions, the provisioning behavior of the resource type.

      AWS 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
    • getAttrTypeArn

      @Stability(Stable) @NotNull public String getAttrTypeArn()
      The Amazon Resource Name (ARN) of the extension.
    • getAttrVersionId

      @Stability(Stable) @NotNull public String getAttrVersionId()
      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.

    • getAttrVisibility

      @Stability(Stable) @NotNull public String getAttrVisibility()
      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. AWS CloudFormation marks any extensions you register as PRIVATE .
      • PUBLIC : The extension is publicly visible and usable within any AWS account.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getSchemaHandlerPackage

      @Stability(Stable) @NotNull public String getSchemaHandlerPackage()
      A URL to the S3 bucket containing the resource project package that contains the necessary files for the resource you want to register.
    • setSchemaHandlerPackage

      @Stability(Stable) public void setSchemaHandlerPackage(@NotNull String value)
      A URL to the S3 bucket containing the resource project package that contains the necessary files for the resource you want to register.
    • getTypeName

      @Stability(Stable) @NotNull public String getTypeName()
      The name of the resource being registered.
    • setTypeName

      @Stability(Stable) public void setTypeName(@NotNull String value)
      The name of the resource being registered.
    • getExecutionRoleArn

      @Stability(Stable) @Nullable public String getExecutionRoleArn()
      The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the resource.
    • setExecutionRoleArn

      @Stability(Stable) public void setExecutionRoleArn(@Nullable String value)
      The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the resource.
    • getLoggingConfig

      @Stability(Stable) @Nullable public Object getLoggingConfig()
      Logging configuration information for a resource.
    • setLoggingConfig

      @Stability(Stable) public void setLoggingConfig(@Nullable IResolvable value)
      Logging configuration information for a resource.
    • setLoggingConfig

      @Stability(Stable) public void setLoggingConfig(@Nullable CfnResourceVersion.LoggingConfigProperty value)
      Logging configuration information for a resource.