CfnUserPropsMixin

class aws_cdk.mixins_preview.aws_transfer.mixins.CfnUserPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::Transfer::User resource creates a user and associates them with an existing server.

You can only create and associate users with servers that have the IdentityProviderType set to SERVICE_MANAGED . Using parameters for CreateUser , you can specify the user name, set the home directory, store the user’s public key, and assign the user’s AWS Identity and Access Management (IAM) role. You can also optionally add a session policy, and assign metadata with tags that can be used to group and search for users.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-user.html

CloudformationResource:

AWS::Transfer::User

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.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_transfer import mixins as transfer_mixins

cfn_user_props_mixin = transfer_mixins.CfnUserPropsMixin(transfer_mixins.CfnUserMixinProps(
    home_directory="homeDirectory",
    home_directory_mappings=[transfer_mixins.CfnUserPropsMixin.HomeDirectoryMapEntryProperty(
        entry="entry",
        target="target",
        type="type"
    )],
    home_directory_type="homeDirectoryType",
    policy="policy",
    posix_profile=transfer_mixins.CfnUserPropsMixin.PosixProfileProperty(
        gid=123,
        secondary_gids=[123],
        uid=123
    ),
    role="role",
    server_id="serverId",
    ssh_public_keys=["sshPublicKeys"],
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    user_name="userName"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Transfer::User.

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

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

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['homeDirectory', 'homeDirectoryMappings', 'homeDirectoryType', 'policy', 'posixProfile', 'role', 'serverId', 'sshPublicKeys', 'tags', 'userName']

Static Methods

classmethod is_mixin(x)

(experimental) 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.

Stability:

experimental

HomeDirectoryMapEntryProperty

class CfnUserPropsMixin.HomeDirectoryMapEntryProperty(*, entry=None, target=None, type=None)

Bases: object

Represents an object that contains entries and targets for HomeDirectoryMappings .

Parameters:
  • entry (Optional[str]) – Represents an entry for HomeDirectoryMappings .

  • target (Optional[str]) – Represents the map target that is used in a HomeDirectoryMapEntry .

  • type (Optional[str]) – Specifies the type of mapping. Set the type to FILE if you want the mapping to point to a file, or DIRECTORY for the directory to point to a directory. .. epigraph:: By default, home directory mappings have a Type of DIRECTORY when you create a Transfer Family server. You would need to explicitly set Type to FILE if you want a mapping to have a file target.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-user-homedirectorymapentry.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.mixins_preview.aws_transfer import mixins as transfer_mixins

home_directory_map_entry_property = transfer_mixins.CfnUserPropsMixin.HomeDirectoryMapEntryProperty(
    entry="entry",
    target="target",
    type="type"
)

Attributes

entry

Represents an entry for HomeDirectoryMappings .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-user-homedirectorymapentry.html#cfn-transfer-user-homedirectorymapentry-entry

target

Represents the map target that is used in a HomeDirectoryMapEntry .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-user-homedirectorymapentry.html#cfn-transfer-user-homedirectorymapentry-target

type

Specifies the type of mapping.

Set the type to FILE if you want the mapping to point to a file, or DIRECTORY for the directory to point to a directory. .. epigraph:

By default, home directory mappings have a ``Type`` of ``DIRECTORY`` when you create a Transfer Family server. You would need to explicitly set ``Type`` to ``FILE`` if you want a mapping to have a file target.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-user-homedirectorymapentry.html#cfn-transfer-user-homedirectorymapentry-type

PosixProfileProperty

class CfnUserPropsMixin.PosixProfileProperty(*, gid=None, secondary_gids=None, uid=None)

Bases: object

The full POSIX identity, including user ID ( Uid ), group ID ( Gid ), and any secondary groups IDs ( SecondaryGids ), that controls your users’ access to your Amazon EFS file systems.

The POSIX permissions that are set on files and directories in your file system determine the level of access your users get when transferring files into and out of your Amazon EFS file systems.

Parameters:
  • gid (Union[int, float, None]) – The POSIX group ID used for all EFS operations by this user.

  • secondary_gids (Union[Sequence[Union[int, float]], IResolvable, None]) – The secondary POSIX group IDs used for all EFS operations by this user.

  • uid (Union[int, float, None]) – The POSIX user ID used for all EFS operations by this user.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-user-posixprofile.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.mixins_preview.aws_transfer import mixins as transfer_mixins

posix_profile_property = transfer_mixins.CfnUserPropsMixin.PosixProfileProperty(
    gid=123,
    secondary_gids=[123],
    uid=123
)

Attributes

gid

The POSIX group ID used for all EFS operations by this user.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-user-posixprofile.html#cfn-transfer-user-posixprofile-gid

secondary_gids

The secondary POSIX group IDs used for all EFS operations by this user.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-user-posixprofile.html#cfn-transfer-user-posixprofile-secondarygids

uid

The POSIX user ID used for all EFS operations by this user.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-user-posixprofile.html#cfn-transfer-user-posixprofile-uid