# CfnAppProps

Properties for defining a `CfnApp`.

Used as props by: [CfnApp](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnApp.html)

- Source: Generated at build time
- Type last changed: v2.195.0 · 7 May 2025

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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"
    } }
};
```

Golang:

```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

- `appName`: string (required) — The name of the app.

- `appType`: string (required) — The type of app.

- `domainId`: string (required) — The domain ID.

- `recoveryMode`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Indicates whether the application is launched in recovery mode.

- `resourceSpec`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnApp.ResourceSpecProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnApp.ResourceSpecProperty.html) — Specifies the ARNs of a SageMaker image and SageMaker image version, and the instance type that the version runs on.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An array of key-value pairs to apply to this resource.

  For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .

- `userProfileName`: string (required) — The user profile name.
