Class CfnPermission
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::RAM::Permission
.
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();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnPermission
(Construct scope, String id, CfnPermissionProps props) Create a newAWS::RAM::Permission
.protected
CfnPermission
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnPermission
(software.amazon.jsii.JsiiObjectRef objRef) -
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 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()
Specifies a list of one or more tag key and value pairs to attach to the permission.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
Specifies the name of the customer managed permission.void
setPolicyTemplate
(Object value) A string in JSON format string that contains the following elements of a resource-based policy:.void
setResourceType
(String value) Specifies the name of the resource type that this customer managed permission applies to.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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 Construct scope, @NotNull String id, @NotNull CfnPermissionProps props) Create a newAWS::RAM::Permission
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in 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:
getCfnProperties
in classCfnResource
-
getTags
Specifies a list of one or more tag key and value pairs to attach to the permission. -
getName
Specifies the name of the customer managed permission.The name must be unique within the AWS Region .
-
setName
Specifies the name of the customer managed permission.The name must be unique within the AWS Region .
-
getPolicyTemplate
A string in JSON format string that contains the following elements of a resource-based policy:.- Effect : must be set to
ALLOW
. - Action : specifies the actions that are allowed by this customer managed permission. The list must contain only actions that are supported by the specified resource type. For a list of all actions supported by each resource type, see Actions, resources, and condition keys for AWS services in the AWS Identity and Access Management User Guide .
- Condition : (optional) specifies conditional parameters that must evaluate to true when a user attempts an action for that action to be allowed. For more information about the Condition element, see IAM policies: Condition element in the AWS Identity and Access Management User Guide .
This template can't include either the
Resource
orPrincipal
elements. Those are both filled in by AWS RAM when it instantiates the resource-based policy on each resource shared using this managed permission. TheResource
comes from the ARN of the specific resource that you are sharing. ThePrincipal
comes from the list of identities added to the resource share. - Effect : must be set to
-
setPolicyTemplate
A string in JSON format string that contains the following elements of a resource-based policy:.- Effect : must be set to
ALLOW
. - Action : specifies the actions that are allowed by this customer managed permission. The list must contain only actions that are supported by the specified resource type. For a list of all actions supported by each resource type, see Actions, resources, and condition keys for AWS services in the AWS Identity and Access Management User Guide .
- Condition : (optional) specifies conditional parameters that must evaluate to true when a user attempts an action for that action to be allowed. For more information about the Condition element, see IAM policies: Condition element in the AWS Identity and Access Management User Guide .
This template can't include either the
Resource
orPrincipal
elements. Those are both filled in by AWS RAM when it instantiates the resource-based policy on each resource shared using this managed permission. TheResource
comes from the ARN of the specific resource that you are sharing. ThePrincipal
comes from the list of identities added to the resource share. - Effect : must be set to
-
getResourceType
Specifies the name of the resource type that this customer managed permission applies to.The format is
*<service-code>* : *<resource-type>*
and is not case sensitive. For example, to specify an Amazon EC2 Subnet, you can use the stringec2:subnet
. To see the list of valid values for this parameter, query the ListResourceTypes operation. -
setResourceType
Specifies the name of the resource type that this customer managed permission applies to.The format is
*<service-code>* : *<resource-type>*
and is not case sensitive. For example, to specify an Amazon EC2 Subnet, you can use the stringec2:subnet
. To see the list of valid values for this parameter, query the ListResourceTypes operation.
-