Class CfnPermission
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.ram.CfnPermission
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IPermissionRef,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:10:12.380Z")
@Stability(Stable)
public class CfnPermission
extends CfnResource
implements IInspectable, IPermissionRef, ITaggable
Creates a customer managed permission for a specified resource type that you can attach to resource shares.
It is created in the AWS Region in which you call the operation.
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.ram.*;
Object policyTemplate;
CfnPermission cfnPermission = CfnPermission.Builder.create(this, "MyCfnPermission")
.name("name")
.policyTemplate(policyTemplate)
.resourceType("resourceType")
// the properties below are optional
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.ram.IPermissionRef
IPermissionRef.Jsii$Default, IPermissionRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnPermission(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnPermission(software.amazon.jsii.JsiiObjectRef objRef) CfnPermission(software.constructs.Construct scope, String id, CfnPermissionProps props) Create a newAWS::RAM::Permission. -
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of the new permission.Specifies whether this permission is the default for new resource shares that include resources of the associated resource type.The type of managed permission.The version number for this version of the permission.getName()Specifies the name of the customer managed permission.A reference to a Permission resource.A string in JSON format string that contains the following elements of a resource-based policy:.Specifies the name of the resource type that this customer managed permission applies to.getTags()Tag Manager which manages the tags for this resource.Specifies a list of one or more tag key and value pairs to attach to the permission.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidSpecifies the name of the customer managed permission.voidsetPolicyTemplate(Object value) A string in JSON format string that contains the following elements of a resource-based policy:.voidsetResourceType(String value) Specifies the name of the resource type that this customer managed permission applies to.voidsetTagsRaw(List<CfnTag> value) Specifies a list of one or more tag key and value pairs to attach to the permission.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnPermission
protected CfnPermission(software.amazon.jsii.JsiiObjectRef objRef) -
CfnPermission
protected CfnPermission(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnPermission
@Stability(Stable) public CfnPermission(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnPermissionProps props) Create a newAWS::RAM::Permission.- 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
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the new permission. -
getAttrIsResourceTypeDefault
Specifies whether this permission is the default for new resource shares that include resources of the associated resource type. -
getAttrPermissionType
The type of managed permission. This can be one of the following values:.- AWS_MANAGED_PERMISSION – AWS created and manages this managed permission. You can associate it with your resource shares, but you can't modify it.
- CUSTOMER_MANAGED_PERMISSION – You, or another principal in your account created this managed permission. You can associate it with your resource shares and create new versions that have different permissions.
-
getAttrVersion
The version number for this version of the permission. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getPermissionRef
A reference to a Permission resource.- Specified by:
getPermissionRefin interfaceIPermissionRef
-
getTags
Tag Manager which manages the tags for this resource. -
getName
Specifies the name of the customer managed permission. -
setName
Specifies the name of the customer managed permission. -
getPolicyTemplate
A string in JSON format string that contains the following elements of a resource-based policy:. -
setPolicyTemplate
A string in JSON format string that contains the following elements of a resource-based policy:. -
getResourceType
Specifies the name of the resource type that this customer managed permission applies to. -
setResourceType
Specifies the name of the resource type that this customer managed permission applies to. -
getTagsRaw
Specifies a list of one or more tag key and value pairs to attach to the permission. -
setTagsRaw
Specifies a list of one or more tag key and value pairs to attach to the permission.
-