Class CfnResourceVersion

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:54.911Z") @Stability(Stable) public class CfnResourceVersion extends CfnResource implements IInspectable
A CloudFormation AWS::CloudFormation::ResourceVersion.

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.core.*;
 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();
 
  • 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 Construct scope, @NotNull String id, @NotNull CfnResourceVersionProps props)
      Create a new AWS::CloudFormation::ResourceVersion.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      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 resource version.
    • getAttrIsDefaultVersion

      @Stability(Stable) @NotNull public IResolvable getAttrIsDefaultVersion()
      Whether the resource version is set as the default version.
    • getAttrProvisioningType

      @Stability(Stable) @NotNull public String getAttrProvisioningType()
      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
    • getAttrTypeArn

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

      @Stability(Stable) @NotNull public String getAttrVersionId()
      The ID of a specific version of the resource.

      The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the resource version when it is registered.

    • getAttrVisibility

      @Stability(Stable) @NotNull public String getAttrVisibility()
      The scope at which the resource is visible and usable in CloudFormation operations.

      Valid values include:

      • PRIVATE : The resource is only visible and usable within the account in which it's registered. CloudFormation marks any resources you register as PRIVATE .
      • PUBLIC : The resource is publicly visible and usable within any Amazon 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.

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

      The user registering the resource must be able to access the package in the S3 bucket. That is, 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 AWS Identity and Access Management User Guide .

    • 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.

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

      The user registering the resource must be able to access the package in the S3 bucket. That is, 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 AWS Identity and Access Management User Guide .

    • getTypeName

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

      We recommend that resource names adhere to the following pattern: company_or_organization :: service :: type .

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

      • Alexa
      • AMZN
      • Amazon
      • AWS
      • Custom
      • Dev

    • setTypeName

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

      We recommend that resource names adhere to the following pattern: company_or_organization :: service :: type .

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

      • Alexa
      • AMZN
      • Amazon
      • AWS
      • Custom
      • Dev

    • getExecutionRoleArn

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

      If your resource calls AWS APIs in any of its handlers, you must create an IAM execution role that includes the necessary permissions to call those AWS 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.

    • 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.

      If your resource calls AWS APIs in any of its handlers, you must create an IAM execution role that includes the necessary permissions to call those AWS 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.

    • 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.