This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.
sagemaker¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-aws repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-aws repo.
- class
pulumi_aws.sagemaker.Endpoint(resource_name, opts=None, endpoint_config_name=None, name=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Provides a SageMaker Endpoint resource.
import pulumi import pulumi_aws as aws endpoint = aws.sagemaker.Endpoint("endpoint", endpoint_config_name=aws_sagemaker_endpoint_configuration["ec"]["name"], tags={ "Name": "foo", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
endpoint_config_name (pulumi.Input[str]) – The name of the endpoint configuration to use.
name (pulumi.Input[str]) – The name of the endpoint. If omitted, this provider will assign a random, unique name.
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
arn: pulumi.Output[str] = None¶The Amazon Resource Name (ARN) assigned by AWS to this endpoint.
endpoint_config_name: pulumi.Output[str] = None¶The name of the endpoint configuration to use.
name: pulumi.Output[str] = None¶The name of the endpoint. If omitted, this provider will assign a random, unique name.
A mapping of tags to assign to the resource.
- static
get(resource_name, id, opts=None, arn=None, endpoint_config_name=None, name=None, tags=None)¶ Get an existing Endpoint resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) assigned by AWS to this endpoint.
endpoint_config_name (pulumi.Input[str]) – The name of the endpoint configuration to use.
name (pulumi.Input[str]) – The name of the endpoint. If omitted, this provider will assign a random, unique name.
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_aws.sagemaker.EndpointConfiguration(resource_name, opts=None, kms_key_arn=None, name=None, production_variants=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Provides a SageMaker endpoint configuration resource.
import pulumi import pulumi_aws as aws ec = aws.sagemaker.EndpointConfiguration("ec", production_variants=[{ "initialInstanceCount": 1, "instance_type": "ml.t2.medium", "modelName": aws_sagemaker_model["m"]["name"], "variantName": "variant-1", }], tags={ "Name": "foo", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
kms_key_arn (pulumi.Input[str]) – Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.
name (pulumi.Input[str]) – The name of the endpoint configuration. If omitted, this provider will assign a random, unique name.
production_variants (pulumi.Input[list]) – Fields are documented below.
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
The production_variants object supports the following:
acceleratorType(pulumi.Input[str]) - The size of the Elastic Inference (EI) instance to use for the production variant.initialInstanceCount(pulumi.Input[float]) - Initial number of instances used for auto-scaling.initialVariantWeight(pulumi.Input[float]) - Determines initial traffic distribution among all of the models that you specify in the endpoint configuration. If unspecified, it defaults to 1.0.instance_type(pulumi.Input[str]) - The type of instance to start.modelName(pulumi.Input[str]) - The name of the model to use.variantName(pulumi.Input[str]) - The name of the variant. If omitted, this provider will assign a random, unique name.
arn: pulumi.Output[str] = None¶The Amazon Resource Name (ARN) assigned by AWS to this endpoint configuration.
kms_key_arn: pulumi.Output[str] = None¶Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.
name: pulumi.Output[str] = None¶The name of the endpoint configuration. If omitted, this provider will assign a random, unique name.
production_variants: pulumi.Output[list] = None¶Fields are documented below.
acceleratorType(str) - The size of the Elastic Inference (EI) instance to use for the production variant.initialInstanceCount(float) - Initial number of instances used for auto-scaling.initialVariantWeight(float) - Determines initial traffic distribution among all of the models that you specify in the endpoint configuration. If unspecified, it defaults to 1.0.instance_type(str) - The type of instance to start.modelName(str) - The name of the model to use.variantName(str) - The name of the variant. If omitted, this provider will assign a random, unique name.
A mapping of tags to assign to the resource.
- static
get(resource_name, id, opts=None, arn=None, kms_key_arn=None, name=None, production_variants=None, tags=None)¶ Get an existing EndpointConfiguration resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) assigned by AWS to this endpoint configuration.
kms_key_arn (pulumi.Input[str]) – Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.
name (pulumi.Input[str]) – The name of the endpoint configuration. If omitted, this provider will assign a random, unique name.
production_variants (pulumi.Input[list]) – Fields are documented below.
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
The production_variants object supports the following:
acceleratorType(pulumi.Input[str]) - The size of the Elastic Inference (EI) instance to use for the production variant.initialInstanceCount(pulumi.Input[float]) - Initial number of instances used for auto-scaling.initialVariantWeight(pulumi.Input[float]) - Determines initial traffic distribution among all of the models that you specify in the endpoint configuration. If unspecified, it defaults to 1.0.instance_type(pulumi.Input[str]) - The type of instance to start.modelName(pulumi.Input[str]) - The name of the model to use.variantName(pulumi.Input[str]) - The name of the variant. If omitted, this provider will assign a random, unique name.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_aws.sagemaker.Model(resource_name, opts=None, containers=None, enable_network_isolation=None, execution_role_arn=None, name=None, primary_container=None, tags=None, vpc_config=None, __props__=None, __name__=None, __opts__=None)¶ Provides a SageMaker model resource.
import pulumi import pulumi_aws as aws model = aws.sagemaker.Model("model", execution_role_arn=aws_iam_role["foo"]["arn"], primary_container={ "image": "174872318107.dkr.ecr.us-west-2.amazonaws.com/kmeans:1", }) assume_role = aws.iam.get_policy_document(statements=[{ "actions": ["sts:AssumeRole"], "principals": [{ "identifiers": ["sagemaker.amazonaws.com"], "type": "Service", }], }]) role = aws.iam.Role("role", assume_role_policy=assume_role.json)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
containers (pulumi.Input[list]) – Specifies containers in the inference pipeline. If not specified, the
primary_containerargument is required. Fields are documented below.enable_network_isolation (pulumi.Input[bool]) – Isolates the model container. No inbound or outbound network calls can be made to or from the model container.
execution_role_arn (pulumi.Input[str]) – A role that SageMaker can assume to access model artifacts and docker images for deployment.
name (pulumi.Input[str]) – The name of the model (must be unique). If omitted, this provider will assign a random, unique name.
primary_container (pulumi.Input[dict]) – The primary docker image containing inference code that is used when the model is deployed for predictions. If not specified, the
containerargument is required. Fields are documented below.tags (pulumi.Input[dict]) – A map of tags to assign to the resource.
vpc_config (pulumi.Input[dict]) – Specifies the VPC that you want your model to connect to. VpcConfig is used in hosting services and in batch transform.
The containers object supports the following:
containerHostname(pulumi.Input[str]) - The DNS host name for the container.environment(pulumi.Input[dict]) - Environment variables for the Docker container. A list of key value pairs.image(pulumi.Input[str]) - The registry path where the inference code image is stored in Amazon ECR.modelDataUrl(pulumi.Input[str]) - The URL for the S3 location where model artifacts are stored.
The primary_container object supports the following:
containerHostname(pulumi.Input[str]) - The DNS host name for the container.environment(pulumi.Input[dict]) - Environment variables for the Docker container. A list of key value pairs.image(pulumi.Input[str]) - The registry path where the inference code image is stored in Amazon ECR.modelDataUrl(pulumi.Input[str]) - The URL for the S3 location where model artifacts are stored.
The vpc_config object supports the following:
security_group_ids(pulumi.Input[list])subnets(pulumi.Input[list])
arn: pulumi.Output[str] = None¶The Amazon Resource Name (ARN) assigned by AWS to this model.
containers: pulumi.Output[list] = None¶Specifies containers in the inference pipeline. If not specified, the
primary_containerargument is required. Fields are documented below.containerHostname(str) - The DNS host name for the container.environment(dict) - Environment variables for the Docker container. A list of key value pairs.image(str) - The registry path where the inference code image is stored in Amazon ECR.modelDataUrl(str) - The URL for the S3 location where model artifacts are stored.
enable_network_isolation: pulumi.Output[bool] = None¶Isolates the model container. No inbound or outbound network calls can be made to or from the model container.
execution_role_arn: pulumi.Output[str] = None¶A role that SageMaker can assume to access model artifacts and docker images for deployment.
name: pulumi.Output[str] = None¶The name of the model (must be unique). If omitted, this provider will assign a random, unique name.
primary_container: pulumi.Output[dict] = None¶The primary docker image containing inference code that is used when the model is deployed for predictions. If not specified, the
containerargument is required. Fields are documented below.containerHostname(str) - The DNS host name for the container.environment(dict) - Environment variables for the Docker container. A list of key value pairs.image(str) - The registry path where the inference code image is stored in Amazon ECR.modelDataUrl(str) - The URL for the S3 location where model artifacts are stored.
A map of tags to assign to the resource.
vpc_config: pulumi.Output[dict] = None¶Specifies the VPC that you want your model to connect to. VpcConfig is used in hosting services and in batch transform.
security_group_ids(list)subnets(list)
- static
get(resource_name, id, opts=None, arn=None, containers=None, enable_network_isolation=None, execution_role_arn=None, name=None, primary_container=None, tags=None, vpc_config=None)¶ Get an existing Model resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) assigned by AWS to this model.
containers (pulumi.Input[list]) – Specifies containers in the inference pipeline. If not specified, the
primary_containerargument is required. Fields are documented below.enable_network_isolation (pulumi.Input[bool]) – Isolates the model container. No inbound or outbound network calls can be made to or from the model container.
execution_role_arn (pulumi.Input[str]) – A role that SageMaker can assume to access model artifacts and docker images for deployment.
name (pulumi.Input[str]) – The name of the model (must be unique). If omitted, this provider will assign a random, unique name.
primary_container (pulumi.Input[dict]) – The primary docker image containing inference code that is used when the model is deployed for predictions. If not specified, the
containerargument is required. Fields are documented below.tags (pulumi.Input[dict]) – A map of tags to assign to the resource.
vpc_config (pulumi.Input[dict]) – Specifies the VPC that you want your model to connect to. VpcConfig is used in hosting services and in batch transform.
The containers object supports the following:
containerHostname(pulumi.Input[str]) - The DNS host name for the container.environment(pulumi.Input[dict]) - Environment variables for the Docker container. A list of key value pairs.image(pulumi.Input[str]) - The registry path where the inference code image is stored in Amazon ECR.modelDataUrl(pulumi.Input[str]) - The URL for the S3 location where model artifacts are stored.
The primary_container object supports the following:
containerHostname(pulumi.Input[str]) - The DNS host name for the container.environment(pulumi.Input[dict]) - Environment variables for the Docker container. A list of key value pairs.image(pulumi.Input[str]) - The registry path where the inference code image is stored in Amazon ECR.modelDataUrl(pulumi.Input[str]) - The URL for the S3 location where model artifacts are stored.
The vpc_config object supports the following:
security_group_ids(pulumi.Input[list])subnets(pulumi.Input[list])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_aws.sagemaker.NotebookInstance(resource_name, opts=None, direct_internet_access=None, instance_type=None, kms_key_id=None, lifecycle_config_name=None, name=None, role_arn=None, security_groups=None, subnet_id=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Provides a Sagemaker Notebook Instance resource.
import pulumi import pulumi_aws as aws ni = aws.sagemaker.NotebookInstance("ni", instance_type="ml.t2.medium", role_arn=aws_iam_role["role"]["arn"], tags={ "Name": "foo", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
direct_internet_access (pulumi.Input[str]) – Set to
Disabledto disable internet access to notebook. Requiressecurity_groupsandsubnet_idto be set. Supported values:Enabled(Default) orDisabled. If set toDisabled, the notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker training and endpoint services unless your configure a NAT Gateway in your VPC.instance_type (pulumi.Input[str]) – The name of ML compute instance type.
kms_key_id (pulumi.Input[str]) – The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.
lifecycle_config_name (pulumi.Input[str]) – The name of a lifecycle configuration to associate with the notebook instance.
name (pulumi.Input[str]) – The name of the notebook instance (must be unique).
role_arn (pulumi.Input[str]) – The ARN of the IAM role to be used by the notebook instance which allows SageMaker to call other services on your behalf.
security_groups (pulumi.Input[list]) – The associated security groups.
subnet_id (pulumi.Input[str]) – The VPC subnet ID.
tags (pulumi.Input[dict]) – A map of tags to assign to the resource.
arn: pulumi.Output[str] = None¶The Amazon Resource Name (ARN) assigned by AWS to this notebook instance.
direct_internet_access: pulumi.Output[str] = None¶Set to
Disabledto disable internet access to notebook. Requiressecurity_groupsandsubnet_idto be set. Supported values:Enabled(Default) orDisabled. If set toDisabled, the notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker training and endpoint services unless your configure a NAT Gateway in your VPC.
instance_type: pulumi.Output[str] = None¶The name of ML compute instance type.
kms_key_id: pulumi.Output[str] = None¶The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.
lifecycle_config_name: pulumi.Output[str] = None¶The name of a lifecycle configuration to associate with the notebook instance.
name: pulumi.Output[str] = None¶The name of the notebook instance (must be unique).
role_arn: pulumi.Output[str] = None¶The ARN of the IAM role to be used by the notebook instance which allows SageMaker to call other services on your behalf.
security_groups: pulumi.Output[list] = None¶The associated security groups.
subnet_id: pulumi.Output[str] = None¶The VPC subnet ID.
A map of tags to assign to the resource.
- static
get(resource_name, id, opts=None, arn=None, direct_internet_access=None, instance_type=None, kms_key_id=None, lifecycle_config_name=None, name=None, role_arn=None, security_groups=None, subnet_id=None, tags=None)¶ Get an existing NotebookInstance resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) assigned by AWS to this notebook instance.
direct_internet_access (pulumi.Input[str]) – Set to
Disabledto disable internet access to notebook. Requiressecurity_groupsandsubnet_idto be set. Supported values:Enabled(Default) orDisabled. If set toDisabled, the notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker training and endpoint services unless your configure a NAT Gateway in your VPC.instance_type (pulumi.Input[str]) – The name of ML compute instance type.
kms_key_id (pulumi.Input[str]) – The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.
lifecycle_config_name (pulumi.Input[str]) – The name of a lifecycle configuration to associate with the notebook instance.
name (pulumi.Input[str]) – The name of the notebook instance (must be unique).
role_arn (pulumi.Input[str]) – The ARN of the IAM role to be used by the notebook instance which allows SageMaker to call other services on your behalf.
security_groups (pulumi.Input[list]) – The associated security groups.
subnet_id (pulumi.Input[str]) – The VPC subnet ID.
tags (pulumi.Input[dict]) – A map of tags to assign to the resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_aws.sagemaker.NotebookInstanceLifecycleConfiguration(resource_name, opts=None, name=None, on_create=None, on_start=None, __props__=None, __name__=None, __opts__=None)¶ Provides a lifecycle configuration for SageMaker Notebook Instances.
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
name (pulumi.Input[str]) – The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.
on_create (pulumi.Input[str]) – A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.
on_start (pulumi.Input[str]) – A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it’s created.
arn: pulumi.Output[str] = None¶The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.
name: pulumi.Output[str] = None¶The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.
on_create: pulumi.Output[str] = None¶A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.
on_start: pulumi.Output[str] = None¶A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it’s created.
- static
get(resource_name, id, opts=None, arn=None, name=None, on_create=None, on_start=None)¶ Get an existing NotebookInstanceLifecycleConfiguration resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.
name (pulumi.Input[str]) – The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.
on_create (pulumi.Input[str]) – A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.
on_start (pulumi.Input[str]) – A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it’s created.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str