@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:35.843Z") @Stability(value=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:
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.*;
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.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnResourceVersion(software.constructs.Construct scope,
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 |
|---|---|
String |
getAttrArn()
The Amazon Resource Name (ARN) of the resource version.
|
IResolvable |
getAttrIsDefaultVersion()
Whether the resource version is set as the default version.
|
String |
getAttrProvisioningType()
The provisioning behavior of the resource type.
|
String |
getAttrTypeArn()
The Amazon Resource Name (ARN) of the resource.
|
String |
getAttrVersionId()
The ID of a specific version of the resource.
|
String |
getAttrVisibility()
The scope at which the resource is visible and usable in CloudFormation operations.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getExecutionRoleArn()
The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the resource.
|
Object |
getLoggingConfig()
Logging configuration information for a resource.
|
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.
|
String |
getTypeName()
The name of the resource being registered.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setExecutionRoleArn(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(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(String value)
The name of the resource being registered.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnResourceVersion(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnResourceVersion(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnResourceVersion(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
@Stability(value=Stable) @NotNull public IResolvable getAttrIsDefaultVersion()
@Stability(value=Stable) @NotNull public 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.@Stability(value=Stable) @NotNull public String getAttrTypeArn()
@Stability(value=Stable) @NotNull public 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.
@Stability(value=Stable) @NotNull public 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.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public 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 .
@Stability(value=Stable)
public void setSchemaHandlerPackage(@NotNull
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 .
@Stability(value=Stable) @NotNull public 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:
AlexaAMZNAmazonAWSCustomDev
@Stability(value=Stable)
public void setTypeName(@NotNull
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:
AlexaAMZNAmazonAWSCustomDev
@Stability(value=Stable) @Nullable public 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.
@Stability(value=Stable)
public void setExecutionRoleArn(@Nullable
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.
@Stability(value=Stable) @Nullable public Object getLoggingConfig()
@Stability(value=Stable)
public void setLoggingConfig(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setLoggingConfig(@Nullable
CfnResourceVersion.LoggingConfigProperty value)
Copyright © 2022. All rights reserved.