@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-14T16:25:20.488Z") 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:
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();
Modifier and Type | Class and Description |
---|---|
static class |
CfnResourceVersion.Builder
A fluent builder for
CfnResourceVersion . |
static interface |
CfnResourceVersion.LoggingConfigProperty
Logging configuration information for a resource.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnResourceVersion(Construct scope,
java.lang.String id,
CfnResourceVersionProps props)
Create a new `AWS::CloudFormation::ResourceVersion`.
|
protected |
CfnResourceVersion(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnResourceVersion(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
The Amazon Resource Name (ARN) of the resource version.
|
IResolvable |
getAttrIsDefaultVersion()
Whether the resource version is set as the default version.
|
java.lang.String |
getAttrProvisioningType()
The provisioning behavior of the resource type.
|
java.lang.String |
getAttrTypeArn()
The Amazon Resource Name (ARN) of the resource.
|
java.lang.String |
getAttrVersionId()
The ID of a specific version of the resource.
|
java.lang.String |
getAttrVisibility()
The scope at which the resource is visible and usable in CloudFormation operations.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getExecutionRoleArn()
The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the resource.
|
java.lang.Object |
getLoggingConfig()
Logging configuration information for a resource.
|
java.lang.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.
|
java.lang.String |
getTypeName()
The name of the resource being registered.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setExecutionRoleArn(java.lang.String value)
The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the resource.
|
void |
setLoggingConfig(CfnResourceVersion.LoggingConfigProperty value)
Logging configuration information for a resource.
|
void |
setLoggingConfig(IResolvable value)
Logging configuration information for a resource.
|
void |
setSchemaHandlerPackage(java.lang.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.
|
void |
setTypeName(java.lang.String value)
The name of the resource being registered.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnResourceVersion(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnResourceVersion(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnResourceVersion(Construct scope, java.lang.String id, CfnResourceVersionProps props)
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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
public IResolvable getAttrIsDefaultVersion()
public java.lang.String getAttrProvisioningType()
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.public java.lang.String getAttrTypeArn()
public java.lang.String getAttrVersionId()
The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the resource version when it is registered.
public java.lang.String getAttrVisibility()
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.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getSchemaHandlerPackage()
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 .
public void setSchemaHandlerPackage(java.lang.String value)
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 .
public java.lang.String getTypeName()
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
public void setTypeName(java.lang.String value)
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
public java.lang.String getExecutionRoleArn()
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.
public void setExecutionRoleArn(java.lang.String value)
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.
public java.lang.Object getLoggingConfig()
public void setLoggingConfig(IResolvable value)
public void setLoggingConfig(CfnResourceVersion.LoggingConfigProperty value)