Class: AWSCDK::RAM::CfnPermissionProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::RAM::CfnPermissionProps
- Defined in:
- ram/cfn_permission_props.rb
Overview
Properties for defining a CfnPermission.
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
Specifies the name of the customer managed permission.
-
#policy_template ⇒ Object
readonly
A string in JSON format string that contains the following elements of a resource-based policy:.
-
#resource_type ⇒ String
readonly
Specifies the name of the resource type that this customer managed permission applies to.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
Specifies a list of one or more tag key and value pairs to attach to the permission.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, policy_template:, resource_type:, tags: nil) ⇒ CfnPermissionProps
constructor
A new instance of CfnPermissionProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(name:, policy_template:, resource_type:, tags: nil) ⇒ CfnPermissionProps
Returns a new instance of CfnPermissionProps.
13 14 15 16 17 18 19 20 21 22 |
# File 'ram/cfn_permission_props.rb', line 13 def initialize(name:, policy_template:, resource_type:, tags: nil) @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @policy_template = policy_template Jsii::Type.check_type(@policy_template, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "policyTemplate") @resource_type = resource_type Jsii::Type.check_type(@resource_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceType") @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#name ⇒ String (readonly)
Specifies the name of the customer managed permission.
The name must be unique within the AWS Region .
30 31 32 |
# File 'ram/cfn_permission_props.rb', line 30 def name @name end |
#policy_template ⇒ Object (readonly)
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 or Principal elements. Those are both filled in by AWS RAM when it instantiates the resource-based policy on each resource shared using this managed permission. The Resource comes from the ARN of the specific resource that you are sharing. The Principal comes from the list of identities added to the resource share.
41 42 43 |
# File 'ram/cfn_permission_props.rb', line 41 def policy_template @policy_template end |
#resource_type ⇒ String (readonly)
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 string ec2:subnet . To see the list of valid values for this parameter, query the ListResourceTypes operation.
48 49 50 |
# File 'ram/cfn_permission_props.rb', line 48 def resource_type @resource_type end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
Specifies a list of one or more tag key and value pairs to attach to the permission.
53 54 55 |
# File 'ram/cfn_permission_props.rb', line 53 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
55 56 57 58 59 60 61 62 |
# File 'ram/cfn_permission_props.rb', line 55 def self.jsii_properties { :name => "name", :policy_template => "policyTemplate", :resource_type => "resourceType", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
64 65 66 67 68 69 70 71 72 73 |
# File 'ram/cfn_permission_props.rb', line 64 def to_jsii result = {} result.merge!({ "name" => @name, "policyTemplate" => @policy_template, "resourceType" => @resource_type, "tags" => @tags, }) result.compact end |