1. Packages
  2. AWS
  3. API Docs
  4. sagemaker
  5. Image
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.sagemaker.Image

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Provides a SageMaker Image resource.

    Example Usage

    Basic usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.sagemaker.Image("example", {
        imageName: "example",
        roleArn: test.arn,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.sagemaker.Image("example",
        image_name="example",
        role_arn=test["arn"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sagemaker"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sagemaker.NewImage(ctx, "example", &sagemaker.ImageArgs{
    			ImageName: pulumi.String("example"),
    			RoleArn:   pulumi.Any(test.Arn),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Sagemaker.Image("example", new()
        {
            ImageName = "example",
            RoleArn = test.Arn,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.sagemaker.Image;
    import com.pulumi.aws.sagemaker.ImageArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Image("example", ImageArgs.builder()
                .imageName("example")
                .roleArn(test.arn())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:sagemaker:Image
        properties:
          imageName: example
          roleArn: ${test.arn}
    

    Create Image Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Image(name: string, args: ImageArgs, opts?: CustomResourceOptions);
    @overload
    def Image(resource_name: str,
              args: ImageArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Image(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              image_name: Optional[str] = None,
              role_arn: Optional[str] = None,
              description: Optional[str] = None,
              display_name: Optional[str] = None,
              tags: Optional[Mapping[str, str]] = None)
    func NewImage(ctx *Context, name string, args ImageArgs, opts ...ResourceOption) (*Image, error)
    public Image(string name, ImageArgs args, CustomResourceOptions? opts = null)
    public Image(String name, ImageArgs args)
    public Image(String name, ImageArgs args, CustomResourceOptions options)
    
    type: aws:sagemaker:Image
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ImageArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ImageArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ImageArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ImageArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ImageArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var awsImageResource = new Aws.Sagemaker.Image("awsImageResource", new()
    {
        ImageName = "string",
        RoleArn = "string",
        Description = "string",
        DisplayName = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := sagemaker.NewImage(ctx, "awsImageResource", &sagemaker.ImageArgs{
    	ImageName:   pulumi.String("string"),
    	RoleArn:     pulumi.String("string"),
    	Description: pulumi.String("string"),
    	DisplayName: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var awsImageResource = new Image("awsImageResource", ImageArgs.builder()
        .imageName("string")
        .roleArn("string")
        .description("string")
        .displayName("string")
        .tags(Map.of("string", "string"))
        .build());
    
    aws_image_resource = aws.sagemaker.Image("awsImageResource",
        image_name="string",
        role_arn="string",
        description="string",
        display_name="string",
        tags={
            "string": "string",
        })
    
    const awsImageResource = new aws.sagemaker.Image("awsImageResource", {
        imageName: "string",
        roleArn: "string",
        description: "string",
        displayName: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:sagemaker:Image
    properties:
        description: string
        displayName: string
        imageName: string
        roleArn: string
        tags:
            string: string
    

    Image Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Image resource accepts the following input properties:

    ImageName string
    The name of the image. Must be unique to your account.
    RoleArn string
    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.
    Description string
    The description of the image.
    DisplayName string
    The display name of the image. When the image is added to a domain (must be unique to the domain).
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    ImageName string
    The name of the image. Must be unique to your account.
    RoleArn string
    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.
    Description string
    The description of the image.
    DisplayName string
    The display name of the image. When the image is added to a domain (must be unique to the domain).
    Tags map[string]string
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    imageName String
    The name of the image. Must be unique to your account.
    roleArn String
    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.
    description String
    The description of the image.
    displayName String
    The display name of the image. When the image is added to a domain (must be unique to the domain).
    tags Map<String,String>
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    imageName string
    The name of the image. Must be unique to your account.
    roleArn string
    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.
    description string
    The description of the image.
    displayName string
    The display name of the image. When the image is added to a domain (must be unique to the domain).
    tags {[key: string]: string}
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    image_name str
    The name of the image. Must be unique to your account.
    role_arn str
    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.
    description str
    The description of the image.
    display_name str
    The display name of the image. When the image is added to a domain (must be unique to the domain).
    tags Mapping[str, str]
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    imageName String
    The name of the image. Must be unique to your account.
    roleArn String
    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.
    description String
    The description of the image.
    displayName String
    The display name of the image. When the image is added to a domain (must be unique to the domain).
    tags Map<String>
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Image resource produces the following output properties:

    Arn string
    The Amazon Resource Name (ARN) assigned by AWS to this Image.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The Amazon Resource Name (ARN) assigned by AWS to this Image.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) assigned by AWS to this Image.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The Amazon Resource Name (ARN) assigned by AWS to this Image.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The Amazon Resource Name (ARN) assigned by AWS to this Image.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) assigned by AWS to this Image.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing Image Resource

    Get an existing Image resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ImageState, opts?: CustomResourceOptions): Image
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            image_name: Optional[str] = None,
            role_arn: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> Image
    func GetImage(ctx *Context, name string, id IDInput, state *ImageState, opts ...ResourceOption) (*Image, error)
    public static Image Get(string name, Input<string> id, ImageState? state, CustomResourceOptions? opts = null)
    public static Image get(String name, Output<String> id, ImageState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    The Amazon Resource Name (ARN) assigned by AWS to this Image.
    Description string
    The description of the image.
    DisplayName string
    The display name of the image. When the image is added to a domain (must be unique to the domain).
    ImageName string
    The name of the image. Must be unique to your account.
    RoleArn string
    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The Amazon Resource Name (ARN) assigned by AWS to this Image.
    Description string
    The description of the image.
    DisplayName string
    The display name of the image. When the image is added to a domain (must be unique to the domain).
    ImageName string
    The name of the image. Must be unique to your account.
    RoleArn string
    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.
    Tags map[string]string
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) assigned by AWS to this Image.
    description String
    The description of the image.
    displayName String
    The display name of the image. When the image is added to a domain (must be unique to the domain).
    imageName String
    The name of the image. Must be unique to your account.
    roleArn String
    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.
    tags Map<String,String>
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The Amazon Resource Name (ARN) assigned by AWS to this Image.
    description string
    The description of the image.
    displayName string
    The display name of the image. When the image is added to a domain (must be unique to the domain).
    imageName string
    The name of the image. Must be unique to your account.
    roleArn string
    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.
    tags {[key: string]: string}
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The Amazon Resource Name (ARN) assigned by AWS to this Image.
    description str
    The description of the image.
    display_name str
    The display name of the image. When the image is added to a domain (must be unique to the domain).
    image_name str
    The name of the image. Must be unique to your account.
    role_arn str
    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.
    tags Mapping[str, str]
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) assigned by AWS to this Image.
    description String
    The description of the image.
    displayName String
    The display name of the image. When the image is added to a domain (must be unique to the domain).
    imageName String
    The name of the image. Must be unique to your account.
    roleArn String
    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.
    tags Map<String>
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Import

    Using pulumi import, import SageMaker Code Images using the name. For example:

    $ pulumi import aws:sagemaker/image:Image test_image my-code-repo
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi