CfnResourceSharePropsMixin

class aws_cdk.cfn_property_mixins.aws_ram.CfnResourceSharePropsMixin(props, *, strategy=None)

Bases: Mixin

Creates a resource share.

You can provide a list of the Amazon Resource Names (ARNs) for the resources that you want to share, a list of principals you want to share the resources with, and the permissions to grant those principals. .. epigraph:

Sharing a resource makes it available for use by principals outside of the AWS account that created the resource. Sharing doesn't change any permissions or quotas that apply to the resource in the account that created it.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html

CloudformationResource:

AWS::RAM::ResourceShare

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_ram as ram
import aws_cdk as cdk

# merge_strategy: cdk.IMergeStrategy

cfn_resource_share_props_mixin = ram.CfnResourceSharePropsMixin(ram.CfnResourceShareMixinProps(
    allow_external_principals=False,
    name="name",
    permission_arns=["permissionArns"],
    principals=["principals"],
    resource_arns=["resourceArns"],
    resource_share_configuration=ram.CfnResourceSharePropsMixin.ResourceShareConfigurationProperty(
        exclusive_account_access=False,
        retain_sharing_on_account_leave_organization=False
    ),
    sources=["sources"],
    tags=[cdk.CfnTag(
        key="key",
        value="value"
    )]
),
    strategy=merge_strategy
)

Create a mixin to apply properties to AWS::RAM::ResourceShare.

Parameters:
  • props (Union[CfnResourceShareMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[IMergeStrategy]) – Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

None

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['allowExternalPrincipals', 'name', 'permissionArns', 'principals', 'resourceArns', 'resourceShareConfiguration', 'sources', 'tags']

Static Methods

classmethod is_mixin(x)

Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

ResourceShareConfigurationProperty

class CfnResourceSharePropsMixin.ResourceShareConfigurationProperty(*, exclusive_account_access=None, retain_sharing_on_account_leave_organization=None)

Bases: object

The configuration for a resource share.

Parameters:
  • exclusive_account_access (Union[bool, IResolvable, None]) – The resource share restricts access to an account.

  • retain_sharing_on_account_leave_organization (Union[bool, IResolvable, None]) – Specifies whether the consumer account retains access to the resource share after leaving the organization.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ram-resourceshare-resourceshareconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_ram as ram

resource_share_configuration_property = ram.CfnResourceSharePropsMixin.ResourceShareConfigurationProperty(
    exclusive_account_access=False,
    retain_sharing_on_account_leave_organization=False
)

Attributes

exclusive_account_access

The resource share restricts access to an account.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ram-resourceshare-resourceshareconfiguration.html#cfn-ram-resourceshare-resourceshareconfiguration-exclusiveaccountaccess

retain_sharing_on_account_leave_organization

Specifies whether the consumer account retains access to the resource share after leaving the organization.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ram-resourceshare-resourceshareconfiguration.html#cfn-ram-resourceshare-resourceshareconfiguration-retainsharingonaccountleaveorganization