> **Experimental**
>
> `@aws-cdk/aws-sagemaker-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# ModelAttributes

Represents a Model resource defined outside this stack.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/model.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/@aws-cdk/aws-sagemaker-alpha/lib/model.ts#L44)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as sagemaker_alpha from '@aws-cdk/aws-sagemaker-alpha';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';

declare const role: iam.Role;
declare const securityGroup: ec2.SecurityGroup;
const modelAttributes: sagemaker_alpha.ModelAttributes = {
  modelArn: 'modelArn',

  // the properties below are optional
  role: role,
  securityGroups: [securityGroup],
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker_alpha as sagemaker_alpha
from aws_cdk import aws_ec2 as ec2
from aws_cdk import aws_iam as iam

# role: iam.Role
# security_group: ec2.SecurityGroup

model_attributes = sagemaker_alpha.ModelAttributes(
    model_arn="modelArn",

    # the properties below are optional
    role=role,
    security_groups=[security_group]
)
```

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.alpha.*;
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.services.iam.*;

Role role;
SecurityGroup securityGroup;

ModelAttributes modelAttributes = ModelAttributes.builder()
        .modelArn("modelArn")

        // the properties below are optional
        .role(role)
        .securityGroups(List.of(securityGroup))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.Sagemaker.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker.Alpha;
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.IAM;

Role role;
SecurityGroup securityGroup;

var modelAttributes = new ModelAttributes {
    ModelArn = "modelArn",

    // the properties below are optional
    Role = role,
    SecurityGroups = new [] { securityGroup }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdksagemakeralpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import sagemaker_alpha "github.com/aws/aws-cdk-go/awscdksagemakeralpha"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var role Role
var securityGroup SecurityGroup

modelAttributes := &ModelAttributes{
	ModelArn: jsii.String("modelArn"),

	// the properties below are optional
	Role: role,
	SecurityGroups: []ISecurityGroup{
		securityGroup,
	},
}
```

## Properties

- `modelArn`: string (required) — The ARN of this model.

- `role`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The IAM execution role associated with this model.

  **Default:** When not provided, any role-related operations will no-op.

- `securityGroups`: [ISecurityGroup](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.ISecurityGroup.html)[] — The security groups for this model, if in a VPC.

  **Default:** When not provided, the connections to/from this model cannot be managed.
