@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)", date="2022-06-22T23:27:52.470Z") public class CfnResourceShare extends CfnResource implements IInspectable
Specifies a resource share.
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.*; CfnResourceShare cfnResourceShare = CfnResourceShare.Builder.create(this, "MyCfnResourceShare") .name("name") // the properties below are optional .allowExternalPrincipals(false) .permissionArns(List.of("permissionArns")) .principals(List.of("principals")) .resourceArns(List.of("resourceArns")) .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnResourceShare.Builder
A fluent builder for
CfnResourceShare . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnResourceShare(Construct scope,
java.lang.String id,
CfnResourceShareProps props)
Create a new `AWS::RAM::ResourceShare`.
|
protected |
CfnResourceShare(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnResourceShare(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAllowExternalPrincipals()
Specifies whether principals outside your organization in AWS Organizations can be associated with a resource share.
|
java.lang.String |
getAttrArn()
The Amazon Resource Name (ARN) of the resource share.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getName()
Specifies the name of the resource share.
|
java.util.List<java.lang.String> |
getPermissionArns()
Specifies the [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com//general/latest/gr/aws-arns-and-namespaces.html) of the AWS RAM permission to associate with the resource share.
|
java.util.List<java.lang.String> |
getPrincipals()
Specifies a list of one or more principals to associate with the resource share.
|
java.util.List<java.lang.String> |
getResourceArns()
Specifies a list of one or more ARNs of the resources to associate with the resource share.
|
TagManager |
getTags()
Specifies one or more tags to attach to the resource share itself.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAllowExternalPrincipals(java.lang.Boolean value)
Specifies whether principals outside your organization in AWS Organizations can be associated with a resource share.
|
void |
setAllowExternalPrincipals(IResolvable value)
Specifies whether principals outside your organization in AWS Organizations can be associated with a resource share.
|
void |
setName(java.lang.String value)
Specifies the name of the resource share.
|
void |
setPermissionArns(java.util.List<java.lang.String> value)
Specifies the [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com//general/latest/gr/aws-arns-and-namespaces.html) of the AWS RAM permission to associate with the resource share.
|
void |
setPrincipals(java.util.List<java.lang.String> value)
Specifies a list of one or more principals to associate with the resource share.
|
void |
setResourceArns(java.util.List<java.lang.String> value)
Specifies a list of one or more ARNs of the resources to associate with the resource share.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnResourceShare(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnResourceShare(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnResourceShare(Construct scope, java.lang.String id, CfnResourceShareProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
It doesn't attach the tags to the resources associated with the resource share.
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.Object getAllowExternalPrincipals()
A value of true
lets you share with individual AWS accounts that are not in your organization. A value of false
only has meaning if your account is a member of an AWS Organization. The default value is true
.
public void setAllowExternalPrincipals(java.lang.Boolean value)
A value of true
lets you share with individual AWS accounts that are not in your organization. A value of false
only has meaning if your account is a member of an AWS Organization. The default value is true
.
public void setAllowExternalPrincipals(IResolvable value)
A value of true
lets you share with individual AWS accounts that are not in your organization. A value of false
only has meaning if your account is a member of an AWS Organization. The default value is true
.
public java.util.List<java.lang.String> getPermissionArns()
public void setPermissionArns(java.util.List<java.lang.String> value)
public java.util.List<java.lang.String> getPrincipals()
You can include the following values:
123456789012
arn:aws:organizations::123456789012:organization/o-exampleorgid
arn:aws:organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123
arn:aws:iam::123456789012:role/rolename
arn:aws:iam::123456789012user/username
Not all resource types can be shared with IAM roles and users. For more information, see Sharing with IAM roles and users in the AWS Resource Access Manager User Guide .
public void setPrincipals(java.util.List<java.lang.String> value)
You can include the following values:
123456789012
arn:aws:organizations::123456789012:organization/o-exampleorgid
arn:aws:organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123
arn:aws:iam::123456789012:role/rolename
arn:aws:iam::123456789012user/username
Not all resource types can be shared with IAM roles and users. For more information, see Sharing with IAM roles and users in the AWS Resource Access Manager User Guide .
public java.util.List<java.lang.String> getResourceArns()
public void setResourceArns(java.util.List<java.lang.String> value)