Class: AWSCDK::Organizations::CfnResourcePolicyProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Organizations::CfnResourcePolicyProps
- Defined in:
- organizations/cfn_resource_policy_props.rb
Overview
Properties for defining a CfnResourcePolicy.
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
The policy text of the organization resource policy.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
A list of tags that you want to attach to the newly created resource policy.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content:, tags: nil) ⇒ CfnResourcePolicyProps
constructor
A new instance of CfnResourcePolicyProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(content:, tags: nil) ⇒ CfnResourcePolicyProps
Returns a new instance of CfnResourcePolicyProps.
11 12 13 14 15 16 |
# File 'organizations/cfn_resource_policy_props.rb', line 11 def initialize(content:, tags: nil) @content = content Jsii::Type.check_type(@content, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "content") @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
#content ⇒ Object (readonly)
The policy text of the organization resource policy.
You can specify the resource policy content as a JSON object or a JSON string.
When you specify the resource policy content as a JSON string, you can't perform drift detection on the CloudFormation stack. For this reason, we recommend specifying the resource policy content as a JSON object instead.
26 27 28 |
# File 'organizations/cfn_resource_policy_props.rb', line 26 def content @content end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
A list of tags that you want to attach to the newly created resource policy.
For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null . For more information about tagging, see Tagging AWS Organizations resources in the AWS Organizations User Guide .
If any one of the tags is not valid or if you exceed the allowed number of tags for the resource policy, then the entire request fails and the resource policy is not created.
35 36 37 |
# File 'organizations/cfn_resource_policy_props.rb', line 35 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
37 38 39 40 41 42 |
# File 'organizations/cfn_resource_policy_props.rb', line 37 def self.jsii_properties { :content => "content", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'organizations/cfn_resource_policy_props.rb', line 44 def to_jsii result = {} result.merge!({ "content" => @content, "tags" => @tags, }) result.compact end |