Class CfnPermission

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

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-05T03:43:49.767Z") @Stability(Stable) public class CfnPermission extends CfnResource implements IInspectable, 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:
  • 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

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

      @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 new permission.
    • getAttrIsResourceTypeDefault

      @Stability(Stable) @NotNull public IResolvable getAttrIsResourceTypeDefault()
      Specifies whether this permission is the default for new resource shares that include resources of the associated resource type.
    • getAttrPermissionType

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

      @Stability(Stable) @NotNull public String getAttrVersion()
      The version number for this version of the permission.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getName

      @Stability(Stable) @NotNull public String getName()
      Specifies the name of the customer managed permission.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      Specifies the name of the customer managed permission.
    • getPolicyTemplate

      @Stability(Stable) @NotNull public Object getPolicyTemplate()
      A string in JSON format string that contains the following elements of a resource-based policy:.
    • setPolicyTemplate

      @Stability(Stable) public void setPolicyTemplate(@NotNull Object value)
      A string in JSON format string that contains the following elements of a resource-based policy:.
    • getResourceType

      @Stability(Stable) @NotNull public String getResourceType()
      Specifies the name of the resource type that this customer managed permission applies to.
    • setResourceType

      @Stability(Stable) public void setResourceType(@NotNull String value)
      Specifies the name of the resource type that this customer managed permission applies to.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      Specifies a list of one or more tag key and value pairs to attach to the permission.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      Specifies a list of one or more tag key and value pairs to attach to the permission.