Experimental
@aws-cdk/aws-sagemaker-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
ModelAttributes Struct
Represents a Model resource defined outside this stack.
| Stability | Experimental |
|---|---|
| Source | lib/model.ts |
Example
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
# 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
// 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();
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 }
};
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
The ARN of this model.
The IAM execution role associated with this model.
Default: When not provided, any role-related operations will no-op.
securityGroupsoptionalISecurityGroup[]security_groupsoptionaltyping.List[ISecurityGroup]securityGroupsoptionalList<ISecurityGroup>SecurityGroupsoptionalISecurityGroup[]SecurityGroupsoptional*[]ISecurityGroup #The security groups for this model, if in a VPC.
Default: When not provided, the connections to/from this model cannot be managed.