Skip to content
v2.277.0

CfnAppProps Struct ​

Properties for defining a CfnApp.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const cfnAppProps: sagemaker.CfnAppProps = {
  appName: 'appName',
  appType: 'appType',
  domainId: 'domainId',
  userProfileName: 'userProfileName',

  // the properties below are optional
  recoveryMode: false,
  resourceSpec: {
    instanceType: 'instanceType',
    lifecycleConfigArn: 'lifecycleConfigArn',
    sageMakerImageArn: 'sageMakerImageArn',
    sageMakerImageVersionArn: 'sageMakerImageVersionArn',
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker

cfn_app_props = sagemaker.CfnAppProps(
    app_name="appName",
    app_type="appType",
    domain_id="domainId",
    user_profile_name="userProfileName",

    # the properties below are optional
    recovery_mode=False,
    resource_spec=sagemaker.CfnApp.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"
    )]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sagemaker.*;

CfnAppProps cfnAppProps = CfnAppProps.builder()
        .appName("appName")
        .appType("appType")
        .domainId("domainId")
        .userProfileName("userProfileName")

        // the properties below are optional
        .recoveryMode(false)
        .resourceSpec(ResourceSpecProperty.builder()
                .instanceType("instanceType")
                .lifecycleConfigArn("lifecycleConfigArn")
                .sageMakerImageArn("sageMakerImageArn")
                .sageMakerImageVersionArn("sageMakerImageVersionArn")
                .build())
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;

var cfnAppProps = new CfnAppProps {
    AppName = "appName",
    AppType = "appType",
    DomainId = "domainId",
    UserProfileName = "userProfileName",

    // the properties below are optional
    RecoveryMode = false,
    ResourceSpec = new ResourceSpecProperty {
        InstanceType = "instanceType",
        LifecycleConfigArn = "lifecycleConfigArn",
        SageMakerImageArn = "sageMakerImageArn",
        SageMakerImageVersionArn = "sageMakerImageVersionArn"
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnAppProps := &CfnAppProps{
	AppName: jsii.String("appName"),
	AppType: jsii.String("appType"),
	DomainId: jsii.String("domainId"),
	UserProfileName: jsii.String("userProfileName"),

	// the properties below are optional
	RecoveryMode: jsii.Boolean(false),
	ResourceSpec: &ResourceSpecProperty{
		InstanceType: jsii.String("instanceType"),
		LifecycleConfigArn: jsii.String("lifecycleConfigArn"),
		SageMakerImageArn: jsii.String("sageMakerImageArn"),
		SageMakerImageVersionArn: jsii.String("sageMakerImageVersionArn"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

appNamestringapp_namestrappNameStringAppNamestringAppName*stringrequired#
The name of the app.
appTypestringapp_typestrappTypeStringAppTypestringAppType*stringrequired#
The type of app.
domainIdstringdomain_idstrdomainIdStringDomainIdstringDomainId*stringrequired#
The domain ID.
recoveryModeoptionalboolean | IResolvablerecovery_modeoptionaltyping.Union[bool, IResolvable]recoveryModeoptionalBooleanRecoveryModeoptionalboolRecoveryModeoptionalinterface{}#
Indicates whether the application is launched in recovery mode.
resourceSpecoptionalIResolvable | CfnApp.ResourceSpecPropertyresource_specoptionaltyping.Union[IResolvable, ResourceSpecProperty]resourceSpecoptionalIResolvableResourceSpecoptionalIResolvableResourceSpecoptionalinterface{}#
Specifies the ARNs of a SageMaker image and SageMaker image version, and the instance type that the version runs on.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#
An array of key-value pairs to apply to this resource.

For more information, see Tag .

userProfileNamestringuser_profile_namestruserProfileNameStringUserProfileNamestringUserProfileName*stringrequired#
The user profile name.