Class CfnResourcePolicy
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::Organizations::ResourcePolicy.
Creates or updates a resource-based delegation policy that can be used to delegate policy management for AWS Organizations to specified member accounts to perform policy actions that are by default available only to the management account.
For more information about delegated policy management, see Delegated administrator for AWS Organizations in the AWS Organizations User Guide .
You can only call this operation from the organization's management account.
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.organizations.*;
Object content;
CfnResourcePolicy cfnResourcePolicy = CfnResourcePolicy.Builder.create(this, "MyCfnResourcePolicy")
.content(content)
// the properties below are optional
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
-
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.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnResourcePolicy(Construct scope, String id, CfnResourcePolicyProps props) Create a newAWS::Organizations::ResourcePolicy.protectedCfnResourcePolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnResourcePolicy(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionReturns the Amazon Resource Name (ARN) of the policy.Returns the unique identifier (ID) of the resource policy.The policy text of the organization resource policy.getTags()A list of tags that you want to attach to the newly created resource policy.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetContent(Object value) The policy text of the organization resource policy.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, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods 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.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnResourcePolicy
protected CfnResourcePolicy(software.amazon.jsii.JsiiObjectRef objRef) -
CfnResourcePolicy
protected CfnResourcePolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnResourcePolicy
@Stability(Stable) public CfnResourcePolicy(@NotNull Construct scope, @NotNull String id, @NotNull CfnResourcePolicyProps props) Create a newAWS::Organizations::ResourcePolicy.- 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:
inspectin 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
Returns the Amazon Resource Name (ARN) of the policy.For example:
arn:aws:organizations::111111111111:resourcepolicy/o-exampleorgid/rp-examplepolicyid111. -
getAttrId
Returns the unique identifier (ID) of the resource policy.For example:
rp-examplepolicyid111. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
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.
-
getContent
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.
-
setContent
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.
-