CfnAppPropsMixin

class aws_cdk.mixins_preview.aws_sagemaker.mixins.CfnAppPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates a running app for the specified UserProfile.

This operation is automatically invoked by Amazon SageMaker AI upon access to the associated Domain, and when new kernel configurations are selected by the user. A user may have multiple Apps active simultaneously.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-app.html

CloudformationResource:

AWS::SageMaker::App

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_sagemaker import mixins as sagemaker_mixins

cfn_app_props_mixin = sagemaker_mixins.CfnAppPropsMixin(sagemaker_mixins.CfnAppMixinProps(
    app_name="appName",
    app_type="appType",
    domain_id="domainId",
    recovery_mode=False,
    resource_spec=sagemaker_mixins.CfnAppPropsMixin.ResourceSpecProperty(
        instance_type="instanceType",
        lifecycle_config_arn="lifecycleConfigArn",
        sage_maker_image_arn="sageMakerImageArn",
        sage_maker_image_version_arn="sageMakerImageVersionArn"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    user_profile_name="userProfileName"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::SageMaker::App.

Parameters:
  • props (Union[CfnAppMixinProps, 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 = ['appName', 'appType', 'domainId', 'recoveryMode', 'resourceSpec', 'tags', 'userProfileName']

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

ResourceSpecProperty

class CfnAppPropsMixin.ResourceSpecProperty(*, instance_type=None, lifecycle_config_arn=None, sage_maker_image_arn=None, sage_maker_image_version_arn=None)

Bases: object

Specifies the ARN’s of a SageMaker AI image and SageMaker AI image version, and the instance type that the version runs on.

When both SageMakerImageVersionArn and SageMakerImageArn are passed, SageMakerImageVersionArn is used. Any updates to SageMakerImageArn will not take effect if SageMakerImageVersionArn already exists in the ResourceSpec because SageMakerImageVersionArn always takes precedence. To clear the value set for SageMakerImageVersionArn , pass None as the value.

Parameters:
  • instance_type (Optional[str]) – The instance type that the image version runs on. .. epigraph:: JupyterServer apps only support the system value. For KernelGateway apps , the system value is translated to ml.t3.medium . KernelGateway apps also support all other values for available instance types.

  • lifecycle_config_arn (Optional[str]) – The Amazon Resource Name (ARN) of the Lifecycle Configuration attached to the Resource.

  • sage_maker_image_arn (Optional[str]) – The ARN of the SageMaker AI image that the image version belongs to.

  • sage_maker_image_version_arn (Optional[str]) – The ARN of the image version created on the instance. To clear the value set for SageMakerImageVersionArn , pass None as the value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-app-resourcespec.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_sagemaker import mixins as sagemaker_mixins

resource_spec_property = sagemaker_mixins.CfnAppPropsMixin.ResourceSpecProperty(
    instance_type="instanceType",
    lifecycle_config_arn="lifecycleConfigArn",
    sage_maker_image_arn="sageMakerImageArn",
    sage_maker_image_version_arn="sageMakerImageVersionArn"
)

Attributes

instance_type

The instance type that the image version runs on.

JupyterServer apps only support the system value.

For KernelGateway apps , the system value is translated to ml.t3.medium . KernelGateway apps also support all other values for available instance types.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-app-resourcespec.html#cfn-sagemaker-app-resourcespec-instancetype

lifecycle_config_arn

The Amazon Resource Name (ARN) of the Lifecycle Configuration attached to the Resource.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-app-resourcespec.html#cfn-sagemaker-app-resourcespec-lifecycleconfigarn

sage_maker_image_arn

The ARN of the SageMaker AI image that the image version belongs to.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-app-resourcespec.html#cfn-sagemaker-app-resourcespec-sagemakerimagearn

sage_maker_image_version_arn

The ARN of the image version created on the instance.

To clear the value set for SageMakerImageVersionArn , pass None as the value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-app-resourcespec.html#cfn-sagemaker-app-resourcespec-sagemakerimageversionarn