AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Class: Aws::SageMaker::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb

Overview

An API client for SageMaker. To construct a client, you need to configure a :region and :credentials.

client = Aws::SageMaker::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails or Aws::ECSCredentials to enable retries and extended timeouts.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test or custom endpoints. This should be a valid HTTP(S) URI.

  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :secret_access_key (String)
  • :session_token (String)
  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a Timeout::Error.

  • :http_read_timeout (Integer) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.



334
335
336
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 334

def initialize(*args)
  super
end

Instance Method Details

#add_association(params = {}) ⇒ Types::AddAssociationResponse

Creates an association between the source and the destination. A source can be associated with multiple destinations, and a destination can be associated with multiple sources. An association is a lineage tracking entity. For more information, see Amazon SageMaker ML Lineage Tracking.

Examples:

Request syntax with placeholder values


resp = client.add_association({
  source_arn: "AssociationEntityArn", # required
  destination_arn: "AssociationEntityArn", # required
  association_type: "ContributedTo", # accepts ContributedTo, AssociatedWith, DerivedFrom, Produced
})

Response structure


resp.source_arn #=> String
resp.destination_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :source_arn (required, String)

    The ARN of the source.

  • :destination_arn (required, String)

    The Amazon Resource Name (ARN) of the destination.

  • :association_type (String)

    The type of association. The following are suggested uses for each type. Amazon SageMaker places no restrictions on their use.

    • ContributedTo - The source contributed to the destination or had a part in enabling the destination. For example, the training data contributed to the training job.

    • AssociatedWith - The source is connected to the destination. For example, an approval workflow is associated with a model deployment.

    • DerivedFrom - The destination is a modification of the source. For example, a digest output of a channel input for a processing job is derived from the original inputs.

    • Produced - The source generated the destination. For example, a training job produced a model artifact.

Returns:

See Also:



396
397
398
399
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 396

def add_association(params = {}, options = {})
  req = build_request(:add_association, params)
  req.send_request(options)
end

#add_tags(params = {}) ⇒ Types::AddTagsOutput

Adds or overwrites one or more tags for the specified Amazon SageMaker resource. You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints.

Each tag consists of a key and an optional value. Tag keys must be unique per resource. For more information about tags, see For more information, see Amazon Web Services Tagging Strategies.

Tags that you add to a hyperparameter tuning job by calling this API are also added to any training jobs that the hyperparameter tuning job launches after you call this API, but not to training jobs that the hyperparameter tuning job launched before you called this API. To make sure that the tags associated with a hyperparameter tuning job are also added to all training jobs that the hyperparameter tuning job launches, add the tags when you first create the tuning job by specifying them in the Tags parameter of CreateHyperParameterTuningJob

Tags that you add to a SageMaker Studio Domain or User Profile by calling this API are also added to any Apps that the Domain or User Profile launches after you call this API, but not to Apps that the Domain or User Profile launched before you called this API. To make sure that the tags associated with a Domain or User Profile are also added to all Apps that the Domain or User Profile launches, add the tags when you first create the Domain or User Profile by specifying them in the Tags parameter of CreateDomain or CreateUserProfile.

Examples:

Request syntax with placeholder values


resp = client.add_tags({
  resource_arn: "ResourceArn", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource that you want to tag.

  • :tags (required, Array<Types::Tag>)

    An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

Returns:

See Also:



476
477
478
479
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 476

def add_tags(params = {}, options = {})
  req = build_request(:add_tags, params)
  req.send_request(options)
end

#associate_trial_component(params = {}) ⇒ Types::AssociateTrialComponentResponse

Associates a trial component with a trial. A trial component can be associated with multiple trials. To disassociate a trial component from a trial, call the DisassociateTrialComponent API.

Examples:

Request syntax with placeholder values


resp = client.associate_trial_component({
  trial_component_name: "ExperimentEntityName", # required
  trial_name: "ExperimentEntityName", # required
})

Response structure


resp.trial_component_arn #=> String
resp.trial_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :trial_component_name (required, String)

    The name of the component to associated with the trial.

  • :trial_name (required, String)

    The name of the trial to associate with.

Returns:

See Also:



512
513
514
515
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 512

def associate_trial_component(params = {}, options = {})
  req = build_request(:associate_trial_component, params)
  req.send_request(options)
end

#create_action(params = {}) ⇒ Types::CreateActionResponse

Creates an action. An action is a lineage tracking entity that represents an action or activity. For example, a model deployment or an HPO job. Generally, an action involves at least one input or output artifact. For more information, see Amazon SageMaker ML Lineage Tracking.

Examples:

Request syntax with placeholder values


resp = client.create_action({
  action_name: "ExperimentEntityName", # required
  source: { # required
    source_uri: "String2048", # required
    source_type: "String256",
    source_id: "String256",
  },
  action_type: "String256", # required
  description: "ExperimentDescription",
  status: "Unknown", # accepts Unknown, InProgress, Completed, Failed, Stopping, Stopped
  properties: {
    "StringParameterValue" => "StringParameterValue",
  },
  metadata_properties: {
    commit_id: "MetadataPropertyValue",
    repository: "MetadataPropertyValue",
    generated_by: "MetadataPropertyValue",
    project_id: "MetadataPropertyValue",
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.action_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :action_name (required, String)

    The name of the action. Must be unique to your account in an Amazon Web Services Region.

  • :source (required, Types::ActionSource)

    The source type, ID, and URI.

  • :action_type (required, String)

    The action type.

  • :description (String)

    The description of the action.

  • :status (String)

    The status of the action.

  • :properties (Hash<String,String>)

    A list of properties to add to the action.

  • :metadata_properties (Types::MetadataProperties)

    Metadata properties of the tracking entity, trial, or trial component.

  • :tags (Array<Types::Tag>)

    A list of tags to apply to the action.

Returns:

See Also:



593
594
595
596
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 593

def create_action(params = {}, options = {})
  req = build_request(:create_action, params)
  req.send_request(options)
end

#create_algorithm(params = {}) ⇒ Types::CreateAlgorithmOutput

Create a machine learning algorithm that you can use in Amazon SageMaker and list in the Amazon Web Services Marketplace.

Examples:

Request syntax with placeholder values


resp = client.create_algorithm({
  algorithm_name: "EntityName", # required
  algorithm_description: "EntityDescription",
  training_specification: { # required
    training_image: "ContainerImage", # required
    training_image_digest: "ImageDigest",
    supported_hyper_parameters: [
      {
        name: "ParameterName", # required
        description: "EntityDescription",
        type: "Integer", # required, accepts Integer, Continuous, Categorical, FreeText
        range: {
          integer_parameter_range_specification: {
            min_value: "ParameterValue", # required
            max_value: "ParameterValue", # required
          },
          continuous_parameter_range_specification: {
            min_value: "ParameterValue", # required
            max_value: "ParameterValue", # required
          },
          categorical_parameter_range_specification: {
            values: ["ParameterValue"], # required
          },
        },
        is_tunable: false,
        is_required: false,
        default_value: "HyperParameterValue",
      },
    ],
    supported_training_instance_types: ["ml.m4.xlarge"], # required, accepts ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.p3dn.24xlarge, ml.p4d.24xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.c5n.xlarge, ml.c5n.2xlarge, ml.c5n.4xlarge, ml.c5n.9xlarge, ml.c5n.18xlarge
    supports_distributed_training: false,
    metric_definitions: [
      {
        name: "MetricName", # required
        regex: "MetricRegex", # required
      },
    ],
    training_channels: [ # required
      {
        name: "ChannelName", # required
        description: "EntityDescription",
        is_required: false,
        supported_content_types: ["ContentType"], # required
        supported_compression_types: ["None"], # accepts None, Gzip
        supported_input_modes: ["Pipe"], # required, accepts Pipe, File, FastFile
      },
    ],
    supported_tuning_job_objective_metrics: [
      {
        type: "Maximize", # required, accepts Maximize, Minimize
        metric_name: "MetricName", # required
      },
    ],
  },
  inference_specification: {
    containers: [ # required
      {
        container_hostname: "ContainerHostname",
        image: "ContainerImage", # required
        image_digest: "ImageDigest",
        model_data_url: "Url",
        product_id: "ProductId",
        environment: {
          "EnvironmentKey" => "EnvironmentValue",
        },
      },
    ],
    supported_transform_instance_types: ["ml.m4.xlarge"], # accepts ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge
    supported_realtime_inference_instance_types: ["ml.t2.medium"], # accepts ml.t2.medium, ml.t2.large, ml.t2.xlarge, ml.t2.2xlarge, ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.m5d.large, ml.m5d.xlarge, ml.m5d.2xlarge, ml.m5d.4xlarge, ml.m5d.12xlarge, ml.m5d.24xlarge, ml.c4.large, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.large, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.c5d.large, ml.c5d.xlarge, ml.c5d.2xlarge, ml.c5d.4xlarge, ml.c5d.9xlarge, ml.c5d.18xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.12xlarge, ml.r5.24xlarge, ml.r5d.large, ml.r5d.xlarge, ml.r5d.2xlarge, ml.r5d.4xlarge, ml.r5d.12xlarge, ml.r5d.24xlarge, ml.inf1.xlarge, ml.inf1.2xlarge, ml.inf1.6xlarge, ml.inf1.24xlarge
    supported_content_types: ["ContentType"], # required
    supported_response_mime_types: ["ResponseMIMEType"], # required
  },
  validation_specification: {
    validation_role: "RoleArn", # required
    validation_profiles: [ # required
      {
        profile_name: "EntityName", # required
        training_job_definition: { # required
          training_input_mode: "Pipe", # required, accepts Pipe, File, FastFile
          hyper_parameters: {
            "HyperParameterKey" => "HyperParameterValue",
          },
          input_data_config: [ # required
            {
              channel_name: "ChannelName", # required
              data_source: { # required
                s3_data_source: {
                  s3_data_type: "ManifestFile", # required, accepts ManifestFile, S3Prefix, AugmentedManifestFile
                  s3_uri: "S3Uri", # required
                  s3_data_distribution_type: "FullyReplicated", # accepts FullyReplicated, ShardedByS3Key
                  attribute_names: ["AttributeName"],
                },
                file_system_data_source: {
                  file_system_id: "FileSystemId", # required
                  file_system_access_mode: "rw", # required, accepts rw, ro
                  file_system_type: "EFS", # required, accepts EFS, FSxLustre
                  directory_path: "DirectoryPath", # required
                },
              },
              content_type: "ContentType",
              compression_type: "None", # accepts None, Gzip
              record_wrapper_type: "None", # accepts None, RecordIO
              input_mode: "Pipe", # accepts Pipe, File, FastFile
              shuffle_config: {
                seed: 1, # required
              },
            },
          ],
          output_data_config: { # required
            kms_key_id: "KmsKeyId",
            s3_output_path: "S3Uri", # required
          },
          resource_config: { # required
            instance_type: "ml.m4.xlarge", # required, accepts ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.p3dn.24xlarge, ml.p4d.24xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.c5n.xlarge, ml.c5n.2xlarge, ml.c5n.4xlarge, ml.c5n.9xlarge, ml.c5n.18xlarge
            instance_count: 1, # required
            volume_size_in_gb: 1, # required
            volume_kms_key_id: "KmsKeyId",
          },
          stopping_condition: { # required
            max_runtime_in_seconds: 1,
            max_wait_time_in_seconds: 1,
          },
        },
        transform_job_definition: {
          max_concurrent_transforms: 1,
          max_payload_in_mb: 1,
          batch_strategy: "MultiRecord", # accepts MultiRecord, SingleRecord
          environment: {
            "TransformEnvironmentKey" => "TransformEnvironmentValue",
          },
          transform_input: { # required
            data_source: { # required
              s3_data_source: { # required
                s3_data_type: "ManifestFile", # required, accepts ManifestFile, S3Prefix, AugmentedManifestFile
                s3_uri: "S3Uri", # required
              },
            },
            content_type: "ContentType",
            compression_type: "None", # accepts None, Gzip
            split_type: "None", # accepts None, Line, RecordIO, TFRecord
          },
          transform_output: { # required
            s3_output_path: "S3Uri", # required
            accept: "Accept",
            assemble_with: "None", # accepts None, Line
            kms_key_id: "KmsKeyId",
          },
          transform_resources: { # required
            instance_type: "ml.m4.xlarge", # required, accepts ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge
            instance_count: 1, # required
            volume_kms_key_id: "KmsKeyId",
          },
        },
      },
    ],
  },
  certify_for_marketplace: false,
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.algorithm_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :algorithm_name (required, String)

    The name of the algorithm.

  • :algorithm_description (String)

    A description of the algorithm.

  • :training_specification (required, Types::TrainingSpecification)

    Specifies details about training jobs run by this algorithm, including the following:

    • The Amazon ECR path of the container and the version digest of the algorithm.

    • The hyperparameters that the algorithm supports.

    • The instance types that the algorithm supports for training.

    • Whether the algorithm supports distributed training.

    • The metrics that the algorithm emits to Amazon CloudWatch.

    • Which metrics that the algorithm emits can be used as the objective metric for hyperparameter tuning jobs.

    • The input channels that the algorithm supports for training data. For example, an algorithm might support train, validation, and test channels.

  • :inference_specification (Types::InferenceSpecification)

    Specifies details about inference jobs that the algorithm runs, including the following:

    • The Amazon ECR paths of containers that contain the inference code and model artifacts.

    • The instance types that the algorithm supports for transform jobs and real-time endpoints used for inference.

    • The input and output content formats that the algorithm supports for inference.

  • :validation_specification (Types::AlgorithmValidationSpecification)

    Specifies configurations for one or more training jobs and that Amazon SageMaker runs to test the algorithm's training code and, optionally, one or more batch transform jobs that Amazon SageMaker runs to test the algorithm's inference code.

  • :certify_for_marketplace (Boolean)

    Whether to certify the algorithm so that it can be listed in Amazon Web Services Marketplace.

  • :tags (Array<Types::Tag>)

    An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

Returns:

See Also:



841
842
843
844
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 841

def create_algorithm(params = {}, options = {})
  req = build_request(:create_algorithm, params)
  req.send_request(options)
end

#create_app(params = {}) ⇒ Types::CreateAppResponse

Creates a running app for the specified UserProfile. Supported apps are JupyterServer and KernelGateway. This operation is automatically invoked by Amazon SageMaker Studio upon access to the associated Domain, and when new kernel configurations are selected by the user. A user may have multiple Apps active simultaneously.

Examples:

Request syntax with placeholder values


resp = client.create_app({
  domain_id: "DomainId", # required
  user_profile_name: "UserProfileName", # required
  app_type: "JupyterServer", # required, accepts JupyterServer, KernelGateway, TensorBoard
  app_name: "AppName", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  resource_spec: {
    sage_maker_image_arn: "ImageArn",
    sage_maker_image_version_arn: "ImageVersionArn",
    instance_type: "system", # accepts system, ml.t3.micro, ml.t3.small, ml.t3.medium, ml.t3.large, ml.t3.xlarge, ml.t3.2xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.8xlarge, ml.m5.12xlarge, ml.m5.16xlarge, ml.m5.24xlarge, ml.m5d.large, ml.m5d.xlarge, ml.m5d.2xlarge, ml.m5d.4xlarge, ml.m5d.8xlarge, ml.m5d.12xlarge, ml.m5d.16xlarge, ml.m5d.24xlarge, ml.c5.large, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.12xlarge, ml.c5.18xlarge, ml.c5.24xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.p3dn.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.8xlarge, ml.r5.12xlarge, ml.r5.16xlarge, ml.r5.24xlarge
    lifecycle_config_arn: "StudioLifecycleConfigArn",
  },
})

Response structure


resp.app_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The domain ID.

  • :user_profile_name (required, String)

    The user profile name.

  • :app_type (required, String)

    The type of app. Supported apps are JupyterServer and KernelGateway. TensorBoard is not supported.

  • :app_name (required, String)

    The name of the app.

  • :tags (Array<Types::Tag>)

    Each tag consists of a key and an optional value. Tag keys must be unique per resource.

  • :resource_spec (Types::ResourceSpec)

    The instance type and the Amazon Resource Name (ARN) of the SageMaker image created on the instance.

Returns:

See Also:



906
907
908
909
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 906

def create_app(params = {}, options = {})
  req = build_request(:create_app, params)
  req.send_request(options)
end

#create_app_image_config(params = {}) ⇒ Types::CreateAppImageConfigResponse

Creates a configuration for running a SageMaker image as a KernelGateway app. The configuration specifies the Amazon Elastic File System (EFS) storage volume on the image, and a list of the kernels in the image.

Examples:

Request syntax with placeholder values


resp = client.create_app_image_config({
  app_image_config_name: "AppImageConfigName", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  kernel_gateway_image_config: {
    kernel_specs: [ # required
      {
        name: "KernelName", # required
        display_name: "KernelDisplayName",
      },
    ],
    file_system_config: {
      mount_path: "MountPath",
      default_uid: 1,
      default_gid: 1,
    },
  },
})

Response structure


resp.app_image_config_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :app_image_config_name (required, String)

    The name of the AppImageConfig. Must be unique to your account.

  • :tags (Array<Types::Tag>)

    A list of tags to apply to the AppImageConfig.

  • :kernel_gateway_image_config (Types::KernelGatewayImageConfig)

    The KernelGatewayImageConfig.

Returns:

See Also:



962
963
964
965
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 962

def create_app_image_config(params = {}, options = {})
  req = build_request(:create_app_image_config, params)
  req.send_request(options)
end

#create_artifact(params = {}) ⇒ Types::CreateArtifactResponse

Creates an artifact. An artifact is a lineage tracking entity that represents a URI addressable object or data. Some examples are the S3 URI of a dataset and the ECR registry path of an image. For more information, see Amazon SageMaker ML Lineage Tracking.

Examples:

Request syntax with placeholder values


resp = client.create_artifact({
  artifact_name: "ExperimentEntityName",
  source: { # required
    source_uri: "String2048", # required
    source_types: [
      {
        source_id_type: "MD5Hash", # required, accepts MD5Hash, S3ETag, S3Version, Custom
        value: "String256", # required
      },
    ],
  },
  artifact_type: "String256", # required
  properties: {
    "StringParameterValue" => "StringParameterValue",
  },
  metadata_properties: {
    commit_id: "MetadataPropertyValue",
    repository: "MetadataPropertyValue",
    generated_by: "MetadataPropertyValue",
    project_id: "MetadataPropertyValue",
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.artifact_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :artifact_name (String)

    The name of the artifact. Must be unique to your account in an Amazon Web Services Region.

  • :source (required, Types::ArtifactSource)

    The ID, ID type, and URI of the source.

  • :artifact_type (required, String)

    The artifact type.

  • :properties (Hash<String,String>)

    A list of properties to add to the artifact.

  • :metadata_properties (Types::MetadataProperties)

    Metadata properties of the tracking entity, trial, or trial component.

  • :tags (Array<Types::Tag>)

    A list of tags to apply to the artifact.

Returns:

See Also:



1038
1039
1040
1041
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 1038

def create_artifact(params = {}, options = {})
  req = build_request(:create_artifact, params)
  req.send_request(options)
end

#create_auto_ml_job(params = {}) ⇒ Types::CreateAutoMLJobResponse

Creates an Autopilot job.

Find the best-performing model after you run an Autopilot job by calling .

For information about how to use Autopilot, see Automate Model Development with Amazon SageMaker Autopilot.

Examples:

Request syntax with placeholder values


resp = client.create_auto_ml_job({
  auto_ml_job_name: "AutoMLJobName", # required
  input_data_config: [ # required
    {
      data_source: { # required
        s3_data_source: { # required
          s3_data_type: "ManifestFile", # required, accepts ManifestFile, S3Prefix
          s3_uri: "S3Uri", # required
        },
      },
      compression_type: "None", # accepts None, Gzip
      target_attribute_name: "TargetAttributeName", # required
    },
  ],
  output_data_config: { # required
    kms_key_id: "KmsKeyId",
    s3_output_path: "S3Uri", # required
  },
  problem_type: "BinaryClassification", # accepts BinaryClassification, MulticlassClassification, Regression
  auto_ml_job_objective: {
    metric_name: "Accuracy", # required, accepts Accuracy, MSE, F1, F1macro, AUC
  },
  auto_ml_job_config: {
    completion_criteria: {
      max_candidates: 1,
      max_runtime_per_training_job_in_seconds: 1,
      max_auto_ml_job_runtime_in_seconds: 1,
    },
    security_config: {
      volume_kms_key_id: "KmsKeyId",
      enable_inter_container_traffic_encryption: false,
      vpc_config: {
        security_group_ids: ["SecurityGroupId"], # required
        subnets: ["SubnetId"], # required
      },
    },
  },
  role_arn: "RoleArn", # required
  generate_candidate_definitions_only: false,
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  model_deploy_config: {
    auto_generate_endpoint_name: false,
    endpoint_name: "EndpointName",
  },
})

Response structure


resp.auto_ml_job_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :auto_ml_job_name (required, String)

    Identifies an Autopilot job. The name must be unique to your account and is case-insensitive.

  • :input_data_config (required, Array<Types::AutoMLChannel>)

    An array of channel objects that describes the input data and its location. Each channel is a named input source. Similar to InputDataConfig supported by . Format(s) supported: CSV. Minimum of 500 rows.

  • :output_data_config (required, Types::AutoMLOutputDataConfig)

    Provides information about encryption and the Amazon S3 output path needed to store artifacts from an AutoML job. Format(s) supported: CSV.

  • :problem_type (String)

    Defines the type of supervised learning available for the candidates. Options include: BinaryClassification, MulticlassClassification, and Regression. For more information, see Amazon SageMaker Autopilot problem types and algorithm support.

  • :auto_ml_job_objective (Types::AutoMLJobObjective)

    Defines the objective metric used to measure the predictive quality of an AutoML job. You provide an AutoMLJobObjective$MetricName and Autopilot infers whether to minimize or maximize it.

  • :auto_ml_job_config (Types::AutoMLJobConfig)

    Contains CompletionCriteria and SecurityConfig settings for the AutoML job.

  • :role_arn (required, String)

    The ARN of the role that is used to access the data.

  • :generate_candidate_definitions_only (Boolean)

    Generates possible candidates without training the models. A candidate is a combination of data preprocessors, algorithms, and algorithm parameter settings.

  • :tags (Array<Types::Tag>)

    Each tag consists of a key and an optional value. Tag keys must be unique per resource.

  • :model_deploy_config (Types::ModelDeployConfig)

    Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment.

Returns:

See Also:



1170
1171
1172
1173
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 1170

def create_auto_ml_job(params = {}, options = {})
  req = build_request(:create_auto_ml_job, params)
  req.send_request(options)
end

#create_code_repository(params = {}) ⇒ Types::CreateCodeRepositoryOutput

Creates a Git repository as a resource in your Amazon SageMaker account. You can associate the repository with notebook instances so that you can use Git source control for the notebooks you create. The Git repository is a resource in your Amazon SageMaker account, so it can be associated with more than one notebook instance, and it persists independently from the lifecycle of any notebook instances it is associated with.

The repository can be hosted either in Amazon Web Services CodeCommit or in any other Git repository.

Examples:

Request syntax with placeholder values


resp = client.create_code_repository({
  code_repository_name: "EntityName", # required
  git_config: { # required
    repository_url: "GitConfigUrl", # required
    branch: "Branch",
    secret_arn: "SecretArn",
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.code_repository_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :code_repository_name (required, String)

    The name of the Git repository. The name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).

  • :git_config (required, Types::GitConfig)

    Specifies details about the repository, including the URL where the repository is located, the default branch, and credentials to use to access the repository.

  • :tags (Array<Types::Tag>)

    An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

Returns:

See Also:



1238
1239
1240
1241
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 1238

def create_code_repository(params = {}, options = {})
  req = build_request(:create_code_repository, params)
  req.send_request(options)
end

#create_compilation_job(params = {}) ⇒ Types::CreateCompilationJobResponse

Starts a model compilation job. After the model has been compiled, Amazon SageMaker saves the resulting model artifacts to an Amazon Simple Storage Service (Amazon S3) bucket that you specify.

If you choose to host your model using Amazon SageMaker hosting services, you can use the resulting model artifacts as part of the model. You can also use the artifacts with Amazon Web Services IoT Greengrass. In that case, deploy them as an ML resource.

In the request body, you provide the following:

  • A name for the compilation job

  • Information about the input model artifacts

  • The output location for the compiled model and the device (target) that the model runs on

  • The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker assumes to perform the model compilation job.

You can also provide a Tag to track the model compilation job's resource use and costs. The response body contains the CompilationJobArn for the compiled job.

To stop a model compilation job, use StopCompilationJob. To get information about a particular model compilation job, use DescribeCompilationJob. To get information about multiple model compilation jobs, use ListCompilationJobs.

Examples:

Request syntax with placeholder values


resp = client.create_compilation_job({
  compilation_job_name: "EntityName", # required
  role_arn: "RoleArn", # required
  input_config: { # required
    s3_uri: "S3Uri", # required
    data_input_config: "DataInputConfig", # required
    framework: "TENSORFLOW", # required, accepts TENSORFLOW, KERAS, MXNET, ONNX, PYTORCH, XGBOOST, TFLITE, DARKNET, SKLEARN
    framework_version: "FrameworkVersion",
  },
  output_config: { # required
    s3_output_location: "S3Uri", # required
    target_device: "lambda", # accepts lambda, ml_m4, ml_m5, ml_c4, ml_c5, ml_p2, ml_p3, ml_g4dn, ml_inf1, ml_eia2, jetson_tx1, jetson_tx2, jetson_nano, jetson_xavier, rasp3b, imx8qm, deeplens, rk3399, rk3288, aisage, sbe_c, qcs605, qcs603, sitara_am57x, amba_cv22, amba_cv25, x86_win32, x86_win64, coreml, jacinto_tda4vm, imx8mplus
    target_platform: {
      os: "ANDROID", # required, accepts ANDROID, LINUX
      arch: "X86_64", # required, accepts X86_64, X86, ARM64, ARM_EABI, ARM_EABIHF
      accelerator: "INTEL_GRAPHICS", # accepts INTEL_GRAPHICS, MALI, NVIDIA
    },
    compiler_options: "CompilerOptions",
    kms_key_id: "KmsKeyId",
  },
  vpc_config: {
    security_group_ids: ["NeoVpcSecurityGroupId"], # required
    subnets: ["NeoVpcSubnetId"], # required
  },
  stopping_condition: { # required
    max_runtime_in_seconds: 1,
    max_wait_time_in_seconds: 1,
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.compilation_job_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :compilation_job_name (required, String)

    A name for the model compilation job. The name must be unique within the Amazon Web Services Region and within your Amazon Web Services account.

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.

    During model compilation, Amazon SageMaker needs your permission to:

    • Read input data from an S3 bucket

    • Write model artifacts to an S3 bucket

    • Write logs to Amazon CloudWatch Logs

    • Publish metrics to Amazon CloudWatch

    You grant permissions for all of these tasks to an IAM role. To pass this role to Amazon SageMaker, the caller of this API must have the iam:PassRole permission. For more information, see Amazon SageMaker Roles.

  • :input_config (required, Types::InputConfig)

    Provides information about the location of input model artifacts, the name and shape of the expected data inputs, and the framework in which the model was trained.

  • :output_config (required, Types::OutputConfig)

    Provides information about the output location for the compiled model and the target device the model runs on.

  • :vpc_config (Types::NeoVpcConfig)

    A VpcConfig object that specifies the VPC that you want your compilation job to connect to. Control access to your models by configuring the VPC. For more information, see Protect Compilation Jobs by Using an Amazon Virtual Private Cloud.

  • :stopping_condition (required, Types::StoppingCondition)

    Specifies a limit to how long a model compilation job can run. When the job reaches the time limit, Amazon SageMaker ends the compilation job. Use this API to cap model training costs.

  • :tags (Array<Types::Tag>)

    An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

Returns:

See Also:



1385
1386
1387
1388
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 1385

def create_compilation_job(params = {}, options = {})
  req = build_request(:create_compilation_job, params)
  req.send_request(options)
end

#create_context(params = {}) ⇒ Types::CreateContextResponse

Creates a context. A context is a lineage tracking entity that represents a logical grouping of other tracking or experiment entities. Some examples are an endpoint and a model package. For more information, see Amazon SageMaker ML Lineage Tracking.

Examples:

Request syntax with placeholder values


resp = client.create_context({
  context_name: "ExperimentEntityName", # required
  source: { # required
    source_uri: "String2048", # required
    source_type: "String256",
    source_id: "String256",
  },
  context_type: "String256", # required
  description: "ExperimentDescription",
  properties: {
    "StringParameterValue" => "StringParameterValue",
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.context_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :context_name (required, String)

    The name of the context. Must be unique to your account in an Amazon Web Services Region.

  • :source (required, Types::ContextSource)

    The source type, ID, and URI.

  • :context_type (required, String)

    The context type.

  • :description (String)

    The description of the context.

  • :properties (Hash<String,String>)

    A list of properties to add to the context.

  • :tags (Array<Types::Tag>)

    A list of tags to apply to the context.

Returns:

See Also:



1452
1453
1454
1455
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 1452

def create_context(params = {}, options = {})
  req = build_request(:create_context, params)
  req.send_request(options)
end

#create_data_quality_job_definition(params = {}) ⇒ Types::CreateDataQualityJobDefinitionResponse

Creates a definition for a job that monitors data quality and drift. For information about model monitor, see Amazon SageMaker Model Monitor.

Examples:

Request syntax with placeholder values


resp = client.create_data_quality_job_definition({
  job_definition_name: "MonitoringJobDefinitionName", # required
  data_quality_baseline_config: {
    baselining_job_name: "ProcessingJobName",
    constraints_resource: {
      s3_uri: "S3Uri",
    },
    statistics_resource: {
      s3_uri: "S3Uri",
    },
  },
  data_quality_app_specification: { # required
    image_uri: "ImageUri", # required
    container_entrypoint: ["ContainerEntrypointString"],
    container_arguments: ["ContainerArgument"],
    record_preprocessor_source_uri: "S3Uri",
    post_analytics_processor_source_uri: "S3Uri",
    environment: {
      "ProcessingEnvironmentKey" => "ProcessingEnvironmentValue",
    },
  },
  data_quality_job_input: { # required
    endpoint_input: { # required
      endpoint_name: "EndpointName", # required
      local_path: "ProcessingLocalPath", # required
      s3_input_mode: "Pipe", # accepts Pipe, File
      s3_data_distribution_type: "FullyReplicated", # accepts FullyReplicated, ShardedByS3Key
      features_attribute: "String",
      inference_attribute: "String",
      probability_attribute: "String",
      probability_threshold_attribute: 1.0,
      start_time_offset: "MonitoringTimeOffsetString",
      end_time_offset: "MonitoringTimeOffsetString",
    },
  },
  data_quality_job_output_config: { # required
    monitoring_outputs: [ # required
      {
        s3_output: { # required
          s3_uri: "MonitoringS3Uri", # required
          local_path: "ProcessingLocalPath", # required
          s3_upload_mode: "Continuous", # accepts Continuous, EndOfJob
        },
      },
    ],
    kms_key_id: "KmsKeyId",
  },
  job_resources: { # required
    cluster_config: { # required
      instance_count: 1, # required
      instance_type: "ml.t3.medium", # required, accepts ml.t3.medium, ml.t3.large, ml.t3.xlarge, ml.t3.2xlarge, ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.8xlarge, ml.r5.12xlarge, ml.r5.16xlarge, ml.r5.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge
      volume_size_in_gb: 1, # required
      volume_kms_key_id: "KmsKeyId",
    },
  },
  network_config: {
    enable_inter_container_traffic_encryption: false,
    enable_network_isolation: false,
    vpc_config: {
      security_group_ids: ["SecurityGroupId"], # required
      subnets: ["SubnetId"], # required
    },
  },
  role_arn: "RoleArn", # required
  stopping_condition: {
    max_runtime_in_seconds: 1, # required
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.job_definition_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :job_definition_name (required, String)

    The name for the monitoring job definition.

  • :data_quality_baseline_config (Types::DataQualityBaselineConfig)

    Configures the constraints and baselines for the monitoring job.

  • :data_quality_app_specification (required, Types::DataQualityAppSpecification)

    Specifies the container that runs the monitoring job.

  • :data_quality_job_input (required, Types::DataQualityJobInput)

    A list of inputs for the monitoring job. Currently endpoints are supported as monitoring inputs.

  • :data_quality_job_output_config (required, Types::MonitoringOutputConfig)

    The output configuration for monitoring jobs.

  • :job_resources (required, Types::MonitoringResources)

    Identifies the resources to deploy for a monitoring job.

  • :network_config (Types::MonitoringNetworkConfig)

    Specifies networking configuration for the monitoring job.

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf.

  • :stopping_condition (Types::MonitoringStoppingCondition)

    A time limit for how long the monitoring job is allowed to run before stopping.

  • :tags (Array<Types::Tag>) — default: Optional

    An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

Returns:

See Also:



1593
1594
1595
1596
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 1593

def create_data_quality_job_definition(params = {}, options = {})
  req = build_request(:create_data_quality_job_definition, params)
  req.send_request(options)
end

#create_device_fleet(params = {}) ⇒ Struct

Creates a device fleet.

Examples:

Request syntax with placeholder values


resp = client.create_device_fleet({
  device_fleet_name: "EntityName", # required
  role_arn: "RoleArn",
  description: "DeviceFleetDescription",
  output_config: { # required
    s3_output_location: "S3Uri", # required
    kms_key_id: "KmsKeyId",
    preset_deployment_type: "GreengrassV2Component", # accepts GreengrassV2Component
    preset_deployment_config: "String",
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  enable_iot_role_alias: false,
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :device_fleet_name (required, String)

    The name of the fleet that the device belongs to.

  • :role_arn (String)

    The Amazon Resource Name (ARN) that has access to Amazon Web Services Internet of Things (IoT).

  • :description (String)

    A description of the fleet.

  • :output_config (required, Types::EdgeOutputConfig)

    The output configuration for storing sample data collected by the fleet.

  • :tags (Array<Types::Tag>)

    Creates tags for the specified fleet.

  • :enable_iot_role_alias (Boolean)

    Whether to create an Amazon Web Services IoT Role Alias during device fleet creation. The name of the role alias generated will match this pattern: "SageMakerEdge-{DeviceFleetName\}".

    For example, if your device fleet is called "demo-fleet", the name of the role alias will be "SageMakerEdge-demo-fleet".

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1652
1653
1654
1655
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 1652

def create_device_fleet(params = {}, options = {})
  req = build_request(:create_device_fleet, params)
  req.send_request(options)
end

#create_domain(params = {}) ⇒ Types::CreateDomainResponse

Creates a Domain used by Amazon SageMaker Studio. A domain consists of an associated Amazon Elastic File System (EFS) volume, a list of authorized users, and a variety of security, application, policy, and Amazon Virtual Private Cloud (VPC) configurations. An Amazon Web Services account is limited to one domain per region. Users within a domain can share notebook files and other artifacts with each other.

EFS storage

When a domain is created, an EFS volume is created for use by all of the users within the domain. Each user receives a private home directory within the EFS volume for notebooks, Git repositories, and data files.

SageMaker uses the Amazon Web Services Key Management Service (Amazon Web Services KMS) to encrypt the EFS volume attached to the domain with an Amazon Web Services managed key by default. For more control, you can specify a customer managed key. For more information, see Protect Data at Rest Using Encryption.

VPC configuration

All SageMaker Studio traffic between the domain and the EFS volume is through the specified VPC and subnets. For other Studio traffic, you can specify the AppNetworkAccessType parameter. AppNetworkAccessType corresponds to the network access type that you choose when you onboard to Studio. The following options are available:

  • PublicInternetOnly - Non-EFS traffic goes through a VPC managed by Amazon SageMaker, which allows internet access. This is the default value.

  • VpcOnly - All Studio traffic is through the specified VPC and subnets. Internet access is disabled by default. To allow internet access, you must specify a NAT gateway.

    When internet access is disabled, you won't be able to run a Studio notebook or to train or host models unless your VPC has an interface endpoint to the SageMaker API and runtime or a NAT gateway and your security groups allow outbound connections.

NFS traffic over TCP on port 2049 needs to be allowed in both inbound and outbound rules in order to launch a SageMaker Studio app successfully.

For more information, see Connect SageMaker Studio Notebooks to Resources in a VPC.

Examples:

Request syntax with placeholder values


resp = client.create_domain({
  domain_name: "DomainName", # required
  auth_mode: "SSO", # required, accepts SSO, IAM
  default_user_settings: { # required
    execution_role: "RoleArn",
    security_groups: ["SecurityGroupId"],
    sharing_settings: {
      notebook_output_option: "Allowed", # accepts Allowed, Disabled
      s3_output_path: "S3Uri",
      s3_kms_key_id: "KmsKeyId",
    },
    jupyter_server_app_settings: {
      default_resource_spec: {
        sage_maker_image_arn: "ImageArn",
        sage_maker_image_version_arn: "ImageVersionArn",
        instance_type: "system", # accepts system, ml.t3.micro, ml.t3.small, ml.t3.medium, ml.t3.large, ml.t3.xlarge, ml.t3.2xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.8xlarge, ml.m5.12xlarge, ml.m5.16xlarge, ml.m5.24xlarge, ml.m5d.large, ml.m5d.xlarge, ml.m5d.2xlarge, ml.m5d.4xlarge, ml.m5d.8xlarge, ml.m5d.12xlarge, ml.m5d.16xlarge, ml.m5d.24xlarge, ml.c5.large, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.12xlarge, ml.c5.18xlarge, ml.c5.24xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.p3dn.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.8xlarge, ml.r5.12xlarge, ml.r5.16xlarge, ml.r5.24xlarge
        lifecycle_config_arn: "StudioLifecycleConfigArn",
      },
      lifecycle_config_arns: ["StudioLifecycleConfigArn"],
    },
    kernel_gateway_app_settings: {
      default_resource_spec: {
        sage_maker_image_arn: "ImageArn",
        sage_maker_image_version_arn: "ImageVersionArn",
        instance_type: "system", # accepts system, ml.t3.micro, ml.t3.small, ml.t3.medium, ml.t3.large, ml.t3.xlarge, ml.t3.2xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.8xlarge, ml.m5.12xlarge, ml.m5.16xlarge, ml.m5.24xlarge, ml.m5d.large, ml.m5d.xlarge, ml.m5d.2xlarge, ml.m5d.4xlarge, ml.m5d.8xlarge, ml.m5d.12xlarge, ml.m5d.16xlarge, ml.m5d.24xlarge, ml.c5.large, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.12xlarge, ml.c5.18xlarge, ml.c5.24xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.p3dn.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.8xlarge, ml.r5.12xlarge, ml.r5.16xlarge, ml.r5.24xlarge
        lifecycle_config_arn: "StudioLifecycleConfigArn",
      },
      custom_images: [
        {
          image_name: "ImageName", # required
          image_version_number: 1,
          app_image_config_name: "AppImageConfigName", # required
        },
      ],
      lifecycle_config_arns: ["StudioLifecycleConfigArn"],
    },
    tensor_board_app_settings: {
      default_resource_spec: {
        sage_maker_image_arn: "ImageArn",
        sage_maker_image_version_arn: "ImageVersionArn",
        instance_type: "system", # accepts system, ml.t3.micro, ml.t3.small, ml.t3.medium, ml.t3.large, ml.t3.xlarge, ml.t3.2xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.8xlarge, ml.m5.12xlarge, ml.m5.16xlarge, ml.m5.24xlarge, ml.m5d.large, ml.m5d.xlarge, ml.m5d.2xlarge, ml.m5d.4xlarge, ml.m5d.8xlarge, ml.m5d.12xlarge, ml.m5d.16xlarge, ml.m5d.24xlarge, ml.c5.large, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.12xlarge, ml.c5.18xlarge, ml.c5.24xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.p3dn.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.8xlarge, ml.r5.12xlarge, ml.r5.16xlarge, ml.r5.24xlarge
        lifecycle_config_arn: "StudioLifecycleConfigArn",
      },
    },
  },
  subnet_ids: ["SubnetId"], # required
  vpc_id: "VpcId", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  app_network_access_type: "PublicInternetOnly", # accepts PublicInternetOnly, VpcOnly
  home_efs_file_system_kms_key_id: "KmsKeyId",
  kms_key_id: "KmsKeyId",
})

Response structure


resp.domain_arn #=> String
resp.url #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain_name (required, String)

    A name for the domain.

  • :auth_mode (required, String)

    The mode of authentication that members use to access the domain.

  • :default_user_settings (required, Types::UserSettings)

    The default settings to use to create a user profile when UserSettings isn't specified in the call to the CreateUserProfile API.

    SecurityGroups is aggregated when specified in both calls. For all other settings in UserSettings, the values specified in CreateUserProfile take precedence over those specified in CreateDomain.

  • :subnet_ids (required, Array<String>)

    The VPC subnets that Studio uses for communication.

  • :vpc_id (required, String)

    The ID of the Amazon Virtual Private Cloud (VPC) that Studio uses for communication.

  • :tags (Array<Types::Tag>)

    Tags to associated with the Domain. Each tag consists of a key and an optional value. Tag keys must be unique per resource. Tags are searchable using the Search API.

    Tags that you specify for the Domain are also added to all Apps that the Domain launches.

  • :app_network_access_type (String)

    Specifies the VPC used for non-EFS traffic. The default value is PublicInternetOnly.

    • PublicInternetOnly - Non-EFS traffic is through a VPC managed by Amazon SageMaker, which allows direct internet access

    • VpcOnly - All Studio traffic is through the specified VPC and subnets

  • :home_efs_file_system_kms_key_id (String)

    This member is deprecated and replaced with KmsKeyId.

  • :kms_key_id (String)

    SageMaker uses Amazon Web Services KMS to encrypt the EFS volume attached to the domain with an Amazon Web Services managed key by default. For more control, specify a customer managed key.

Returns:

See Also:



1834
1835
1836
1837
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 1834

def create_domain(params = {}, options = {})
  req = build_request(:create_domain, params)
  req.send_request(options)
end

#create_edge_packaging_job(params = {}) ⇒ Struct

Starts a SageMaker Edge Manager model packaging job. Edge Manager will use the model artifacts from the Amazon Simple Storage Service bucket that you specify. After the model has been packaged, Amazon SageMaker saves the resulting artifacts to an S3 bucket that you specify.

Examples:

Request syntax with placeholder values


resp = client.create_edge_packaging_job({
  edge_packaging_job_name: "EntityName", # required
  compilation_job_name: "EntityName", # required
  model_name: "EntityName", # required
  model_version: "EdgeVersion", # required
  role_arn: "RoleArn", # required
  output_config: { # required
    s3_output_location: "S3Uri", # required
    kms_key_id: "KmsKeyId",
    preset_deployment_type: "GreengrassV2Component", # accepts GreengrassV2Component
    preset_deployment_config: "String",
  },
  resource_key: "KmsKeyId",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :edge_packaging_job_name (required, String)

    The name of the edge packaging job.

  • :compilation_job_name (required, String)

    The name of the SageMaker Neo compilation job that will be used to locate model artifacts for packaging.

  • :model_name (required, String)

    The name of the model.

  • :model_version (required, String)

    The version of the model.

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to download and upload the model, and to contact SageMaker Neo.

  • :output_config (required, Types::EdgeOutputConfig)

    Provides information about the output location for the packaged model.

  • :resource_key (String)

    The Amazon Web Services KMS key to use when encrypting the EBS volume the edge packaging job runs on.

  • :tags (Array<Types::Tag>)

    Creates tags for the packaging job.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1901
1902
1903
1904
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 1901

def create_edge_packaging_job(params = {}, options = {})
  req = build_request(:create_edge_packaging_job, params)
  req.send_request(options)
end

#create_endpoint(params = {}) ⇒ Types::CreateEndpointOutput

Creates an endpoint using the endpoint configuration specified in the request. Amazon SageMaker uses the endpoint to provision resources and deploy models. You create the endpoint configuration with the CreateEndpointConfig API.

Use this API to deploy models using Amazon SageMaker hosting services.

For an example that calls this method when deploying a model to Amazon SageMaker hosting services, see the Create Endpoint example notebook.

You must not delete an EndpointConfig that is in use by an endpoint that is live or while the UpdateEndpoint or CreateEndpoint operations are being performed on the endpoint. To update an endpoint, you must create a new EndpointConfig.

The endpoint name must be unique within an Amazon Web Services Region in your Amazon Web Services account.

When it receives the request, Amazon SageMaker creates the endpoint, launches the resources (ML compute instances), and deploys the model(s) on them.

When you call CreateEndpoint, a load call is made to DynamoDB to verify that your endpoint configuration exists. When you read data from a DynamoDB table supporting Eventually Consistent Reads , the response might not reflect the results of a recently completed write operation. The response might include some stale data. If the dependent entities are not yet in DynamoDB, this causes a validation error. If you repeat your read request after a short time, the response should return the latest data. So retry logic is recommended to handle these possible issues. We also recommend that customers call DescribeEndpointConfig before calling CreateEndpoint to minimize the potential impact of a DynamoDB eventually consistent read.

When Amazon SageMaker receives the request, it sets the endpoint status to Creating. After it creates the endpoint, it sets the status to InService. Amazon SageMaker can then process incoming requests for inferences. To check the status of an endpoint, use the DescribeEndpoint API.

If any of the models hosted at this endpoint get model data from an Amazon S3 location, Amazon SageMaker uses Amazon Web Services Security Token Service to download model artifacts from the S3 path you provided. Amazon Web Services STS is activated in your IAM user account by default. If you previously deactivated Amazon Web Services STS for a region, you need to reactivate Amazon Web Services STS for that region. For more information, see Activating and Deactivating Amazon Web Services STS in an Amazon Web Services Region in the Amazon Web Services Identity and Access Management User Guide.

To add the IAM role policies for using this API operation, go to the IAM console, and choose Roles in the left navigation pane. Search the IAM role that you want to grant access to use the CreateEndpoint and CreateEndpointConfig API operations, add the following policies to the role.

  • Option 1: For a full SageMaker access, search and attach the AmazonSageMakerFullAccess policy.

  • Option 2: For granting a limited access to an IAM role, paste the following Action elements manually into the JSON file of the IAM role:

    "Action": ["sagemaker:CreateEndpoint", "sagemaker:CreateEndpointConfig"]

    "Resource": [

    "arn:aws:sagemaker:region:account-id:endpoint/endpointName"

    "arn:aws:sagemaker:region:account-id:endpoint-config/endpointConfigName"

    ]

    For more information, see SageMaker API Permissions: Actions, Permissions, and Resources Reference.

Examples:

Request syntax with placeholder values


resp = client.create_endpoint({
  endpoint_name: "EndpointName", # required
  endpoint_config_name: "EndpointConfigName", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.endpoint_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :endpoint_name (required, String)

    The name of the endpoint.The name must be unique within an Amazon Web Services Region in your Amazon Web Services account. The name is case-insensitive in CreateEndpoint, but the case is preserved and must be matched in .

  • :endpoint_config_name (required, String)

    The name of an endpoint configuration. For more information, see CreateEndpointConfig.

  • :tags (Array<Types::Tag>)

    An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

Returns:

See Also:



2043
2044
2045
2046
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 2043

def create_endpoint(params = {}, options = {})
  req = build_request(:create_endpoint, params)
  req.send_request(options)
end

#create_endpoint_config(params = {}) ⇒ Types::CreateEndpointConfigOutput

Creates an endpoint configuration that Amazon SageMaker hosting services uses to deploy models. In the configuration, you identify one or more models, created using the CreateModel API, to deploy and the resources that you want Amazon SageMaker to provision. Then you call the CreateEndpoint API.

Use this API if you want to use Amazon SageMaker hosting services to deploy models into production.

In the request, you define a ProductionVariant, for each model that you want to deploy. Each ProductionVariant parameter also describes the resources that you want Amazon SageMaker to provision. This includes the number and type of ML compute instances to deploy.

If you are hosting multiple models, you also assign a VariantWeight to specify how much traffic you want to allocate to each model. For example, suppose that you want to host two models, A and B, and you assign traffic weight 2 for model A and 1 for model B. Amazon SageMaker distributes two-thirds of the traffic to Model A, and one-third to model B.

When you call CreateEndpoint, a load call is made to DynamoDB to verify that your endpoint configuration exists. When you read data from a DynamoDB table supporting Eventually Consistent Reads , the response might not reflect the results of a recently completed write operation. The response might include some stale data. If the dependent entities are not yet in DynamoDB, this causes a validation error. If you repeat your read request after a short time, the response should return the latest data. So retry logic is recommended to handle these possible issues. We also recommend that customers call DescribeEndpointConfig before calling CreateEndpoint to minimize the potential impact of a DynamoDB eventually consistent read.

Examples:

Request syntax with placeholder values


resp = client.create_endpoint_config({
  endpoint_config_name: "EndpointConfigName", # required
  production_variants: [ # required
    {
      variant_name: "VariantName", # required
      model_name: "ModelName", # required
      initial_instance_count: 1, # required
      instance_type: "ml.t2.medium", # required, accepts ml.t2.medium, ml.t2.large, ml.t2.xlarge, ml.t2.2xlarge, ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.m5d.large, ml.m5d.xlarge, ml.m5d.2xlarge, ml.m5d.4xlarge, ml.m5d.12xlarge, ml.m5d.24xlarge, ml.c4.large, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.large, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.c5d.large, ml.c5d.xlarge, ml.c5d.2xlarge, ml.c5d.4xlarge, ml.c5d.9xlarge, ml.c5d.18xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.12xlarge, ml.r5.24xlarge, ml.r5d.large, ml.r5d.xlarge, ml.r5d.2xlarge, ml.r5d.4xlarge, ml.r5d.12xlarge, ml.r5d.24xlarge, ml.inf1.xlarge, ml.inf1.2xlarge, ml.inf1.6xlarge, ml.inf1.24xlarge
      initial_variant_weight: 1.0,
      accelerator_type: "ml.eia1.medium", # accepts ml.eia1.medium, ml.eia1.large, ml.eia1.xlarge, ml.eia2.medium, ml.eia2.large, ml.eia2.xlarge
      core_dump_config: {
        destination_s3_uri: "DestinationS3Uri", # required
        kms_key_id: "KmsKeyId",
      },
    },
  ],
  data_capture_config: {
    enable_capture: false,
    initial_sampling_percentage: 1, # required
    destination_s3_uri: "DestinationS3Uri", # required
    kms_key_id: "KmsKeyId",
    capture_options: [ # required
      {
        capture_mode: "Input", # required, accepts Input, Output
      },
    ],
    capture_content_type_header: {
      csv_content_types: ["CsvContentType"],
      json_content_types: ["JsonContentType"],
    },
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  kms_key_id: "KmsKeyId",
  async_inference_config: {
    client_config: {
      max_concurrent_invocations_per_instance: 1,
    },
    output_config: { # required
      kms_key_id: "KmsKeyId",
      s3_output_path: "DestinationS3Uri", # required
      notification_config: {
        success_topic: "SnsTopicArn",
        error_topic: "SnsTopicArn",
      },
    },
  },
})

Response structure


resp.endpoint_config_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :endpoint_config_name (required, String)

    The name of the endpoint configuration. You specify this name in a CreateEndpoint request.

  • :production_variants (required, Array<Types::ProductionVariant>)

    An list of ProductionVariant objects, one for each model that you want to host at this endpoint.

  • :data_capture_config (Types::DataCaptureConfig)
  • :tags (Array<Types::Tag>)

    An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

  • :kms_key_id (String)

    The Amazon Resource Name (ARN) of a Amazon Web Services 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.

    The KmsKeyId can be any of the following formats:

    • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

    • Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

    • Alias name: alias/ExampleAlias

    • Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias

    The KMS key policy must grant permission to the IAM role that you specify in your CreateEndpoint, UpdateEndpoint requests. For more information, refer to the Amazon Web Services Key Management Service section Using Key Policies in Amazon Web Services KMS

    Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a KmsKeyId when using an instance type with local storage. If any of the models that you specify in the ProductionVariants parameter use nitro-based instances with local storage, do not specify a value for the KmsKeyId parameter. If you specify a value for KmsKeyId when using any nitro-based instances with local storage, the call to CreateEndpointConfig fails.

    For a list of instance types that support local instance storage, see Instance Store Volumes.

    For more information about local instance storage encryption, see SSD Instance Store Volumes.

  • :async_inference_config (Types::AsyncInferenceConfig)

    Specifies configuration for how an endpoint performs asynchronous inference. This is a required field in order for your Endpoint to be invoked using InvokeEndpointAsync .

Returns:

See Also:



2231
2232
2233
2234
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 2231

def create_endpoint_config(params = {}, options = {})
  req = build_request(:create_endpoint_config, params)
  req.send_request(options)
end

#create_experiment(params = {}) ⇒ Types::CreateExperimentResponse

Creates an SageMaker experiment. An experiment is a collection of trials that are observed, compared and evaluated as a group. A trial is a set of steps, called trial components, that produce a machine learning model.

The goal of an experiment is to determine the components that produce the best model. Multiple trials are performed, each one isolating and measuring the impact of a change to one or more inputs, while keeping the remaining inputs constant.

When you use SageMaker Studio or the SageMaker Python SDK, all experiments, trials, and trial components are automatically tracked, logged, and indexed. When you use the Amazon Web Services SDK for Python (Boto), you must use the logging APIs provided by the SDK.

You can add tags to experiments, trials, trial components and then use the Search API to search for the tags.

To add a description to an experiment, specify the optional Description parameter. To add a description later, or to change the description, call the UpdateExperiment API.

To get a list of all your experiments, call the ListExperiments API. To view an experiment's properties, call the DescribeExperiment API. To get a list of all the trials associated with an experiment, call the ListTrials API. To create a trial call the CreateTrial API.

Examples:

Request syntax with placeholder values


resp = client.create_experiment({
  experiment_name: "ExperimentEntityName", # required
  display_name: "ExperimentEntityName",
  description: "ExperimentDescription",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.experiment_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :experiment_name (required, String)

    The name of the experiment. The name must be unique in your Amazon Web Services account and is not case-sensitive.

  • :display_name (String)

    The name of the experiment as displayed. The name doesn't need to be unique. If you don't specify DisplayName, the value in ExperimentName is displayed.

  • :description (String)

    The description of the experiment.

  • :tags (Array<Types::Tag>)

    A list of tags to associate with the experiment. You can use Search API to search on the tags.

Returns:

See Also:



2305
2306
2307
2308
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 2305

def create_experiment(params = {}, options = {})
  req = build_request(:create_experiment, params)
  req.send_request(options)
end

#create_feature_group(params = {}) ⇒ Types::CreateFeatureGroupResponse

Create a new FeatureGroup. A FeatureGroup is a group of Features defined in the FeatureStore to describe a Record.

The FeatureGroup defines the schema and features contained in the FeatureGroup. A FeatureGroup definition is composed of a list of Features, a RecordIdentifierFeatureName, an EventTimeFeatureName and configurations for its OnlineStore and OfflineStore. Check Amazon Web Services service quotas to see the FeatureGroups quota for your Amazon Web Services account.

You must include at least one of OnlineStoreConfig and OfflineStoreConfig to create a FeatureGroup.

Examples:

Request syntax with placeholder values


resp = client.create_feature_group({
  feature_group_name: "FeatureGroupName", # required
  record_identifier_feature_name: "FeatureName", # required
  event_time_feature_name: "FeatureName", # required
  feature_definitions: [ # required
    {
      feature_name: "FeatureName",
      feature_type: "Integral", # accepts Integral, Fractional, String
    },
  ],
  online_store_config: {
    security_config: {
      kms_key_id: "KmsKeyId",
    },
    enable_online_store: false,
  },
  offline_store_config: {
    s3_storage_config: { # required
      s3_uri: "S3Uri", # required
      kms_key_id: "KmsKeyId",
      resolved_output_s3_uri: "S3Uri",
    },
    disable_glue_table_creation: false,
    data_catalog_config: {
      table_name: "TableName", # required
      catalog: "Catalog", # required
      database: "Database", # required
    },
  },
  role_arn: "RoleArn",
  description: "Description",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.feature_group_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :feature_group_name (required, String)

    The name of the FeatureGroup. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account. The name:

    • Must start and end with an alphanumeric character.

    • Can only contain alphanumeric character and hyphens. Spaces are not allowed.

  • :record_identifier_feature_name (required, String)

    The name of the Feature whose value uniquely identifies a Record defined in the FeatureStore. Only the latest record per identifier value will be stored in the OnlineStore. RecordIdentifierFeatureName must be one of feature definitions' names.

    You use the RecordIdentifierFeatureName to access data in a FeatureStore.

    This name:

    • Must start and end with an alphanumeric character.

    • Can only contains alphanumeric characters, hyphens, underscores. Spaces are not allowed.

  • :event_time_feature_name (required, String)

    The name of the feature that stores the EventTime of a Record in a FeatureGroup.

    An EventTime is a point in time when a new event occurs that corresponds to the creation or update of a Record in a FeatureGroup. All Records in the FeatureGroup must have a corresponding EventTime.

    An EventTime can be a String or Fractional.

    • Fractional: EventTime feature values must be a Unix timestamp in seconds.

    • String: EventTime feature values must be an ISO-8601 string in the format. The following formats are supported yyyy-MM-dd'T'HH:mm:ssZ and yyyy-MM-dd'T'HH:mm:ss.SSSZ where yyyy, MM, and dd represent the year, month, and day respectively and HH, mm, ss, and if applicable, SSS represent the hour, month, second and milliseconds respsectively. 'T' and Z are constants.

  • :feature_definitions (required, Array<Types::FeatureDefinition>)

    A list of Feature names and types. Name and Type is compulsory per Feature.

    Valid feature FeatureTypes are Integral, Fractional and String.

    FeatureNames cannot be any of the following: is_deleted, write_time, api_invocation_time

    You can create up to 2,500 FeatureDefinitions per FeatureGroup.

  • :online_store_config (Types::OnlineStoreConfig)

    You can turn the OnlineStore on or off by specifying True for the EnableOnlineStore flag in OnlineStoreConfig; the default value is False.

    You can also include an Amazon Web Services KMS key ID (KMSKeyId) for at-rest encryption of the OnlineStore.

  • :offline_store_config (Types::OfflineStoreConfig)

    Use this to configure an OfflineFeatureStore. This parameter allows you to specify:

    • The Amazon Simple Storage Service (Amazon S3) location of an OfflineStore.

    • A configuration for an Amazon Web Services Glue or Amazon Web Services Hive data catalog.

    • An KMS encryption key to encrypt the Amazon S3 location used for OfflineStore. If KMS encryption key is not specified, by default we encrypt all data at rest using Amazon Web Services KMS key. By defining your bucket-level key for SSE, you can reduce Amazon Web Services KMS requests costs by up to 99 percent.

    To learn more about this parameter, see OfflineStoreConfig.

  • :role_arn (String)

    The Amazon Resource Name (ARN) of the IAM execution role used to persist data into the OfflineStore if an OfflineStoreConfig is provided.

  • :description (String)

    A free-form description of a FeatureGroup.

  • :tags (Array<Types::Tag>)

    Tags used to identify Features in each FeatureGroup.

Returns:

See Also:



2482
2483
2484
2485
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 2482

def create_feature_group(params = {}, options = {})
  req = build_request(:create_feature_group, params)
  req.send_request(options)
end

#create_flow_definition(params = {}) ⇒ Types::CreateFlowDefinitionResponse

Creates a flow definition.

Examples:

Request syntax with placeholder values


resp = client.create_flow_definition({
  flow_definition_name: "FlowDefinitionName", # required
  human_loop_request_source: {
    aws_managed_human_loop_request_source: "AWS/Rekognition/DetectModerationLabels/Image/V3", # required, accepts AWS/Rekognition/DetectModerationLabels/Image/V3, AWS/Textract/AnalyzeDocument/Forms/V1
  },
  human_loop_activation_config: {
    human_loop_activation_conditions_config: { # required
      human_loop_activation_conditions: "HumanLoopActivationConditions", # required
    },
  },
  human_loop_config: { # required
    workteam_arn: "WorkteamArn", # required
    human_task_ui_arn: "HumanTaskUiArn", # required
    task_title: "FlowDefinitionTaskTitle", # required
    task_description: "FlowDefinitionTaskDescription", # required
    task_count: 1, # required
    task_availability_lifetime_in_seconds: 1,
    task_time_limit_in_seconds: 1,
    task_keywords: ["FlowDefinitionTaskKeyword"],
    public_workforce_task_price: {
      amount_in_usd: {
        dollars: 1,
        cents: 1,
        tenth_fractions_of_a_cent: 1,
      },
    },
  },
  output_config: { # required
    s3_output_path: "S3Uri", # required
    kms_key_id: "KmsKeyId",
  },
  role_arn: "RoleArn", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.flow_definition_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :flow_definition_name (required, String)

    The name of your flow definition.

  • :human_loop_request_source (Types::HumanLoopRequestSource)

    Container for configuring the source of human task requests. Use to specify if Amazon Rekognition or Amazon Textract is used as an integration source.

  • :human_loop_activation_config (Types::HumanLoopActivationConfig)

    An object containing information about the events that trigger a human workflow.

  • :human_loop_config (required, Types::HumanLoopConfig)

    An object containing information about the tasks the human reviewers will perform.

  • :output_config (required, Types::FlowDefinitionOutputConfig)

    An object containing information about where the human review results will be uploaded.

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of the role needed to call other services on your behalf. For example, arn:aws:iam::1234567890:role/service-role/AmazonSageMaker-ExecutionRole-20180111T151298.

  • :tags (Array<Types::Tag>)

    An array of key-value pairs that contain metadata to help you categorize and organize a flow definition. Each tag consists of a key and a value, both of which you define.

Returns:

See Also:



2573
2574
2575
2576
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 2573

def create_flow_definition(params = {}, options = {})
  req = build_request(:create_flow_definition, params)
  req.send_request(options)
end

#create_human_task_ui(params = {}) ⇒ Types::CreateHumanTaskUiResponse

Defines the settings you will use for the human review workflow user interface. Reviewers will see a three-panel interface with an instruction area, the item to review, and an input area.

Examples:

Request syntax with placeholder values


resp = client.create_human_task_ui({
  human_task_ui_name: "HumanTaskUiName", # required
  ui_template: { # required
    content: "TemplateContent", # required
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.human_task_ui_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :human_task_ui_name (required, String)

    The name of the user interface you are creating.

  • :ui_template (required, Types::UiTemplate)

    The Liquid template for the worker user interface.

  • :tags (Array<Types::Tag>)

    An array of key-value pairs that contain metadata to help you categorize and organize a human review workflow user interface. Each tag consists of a key and a value, both of which you define.

Returns:

See Also:



2620
2621
2622
2623
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 2620

def create_human_task_ui(params = {}, options = {})
  req = build_request(:create_human_task_ui, params)
  req.send_request(options)
end

#create_hyper_parameter_tuning_job(params = {}) ⇒ Types::CreateHyperParameterTuningJobResponse

Starts a hyperparameter tuning job. A hyperparameter tuning job finds the best version of a model by running many training jobs on your dataset using the algorithm you choose and values for hyperparameters within ranges that you specify. It then chooses the hyperparameter values that result in a model that performs the best, as measured by an objective metric that you choose.

Examples:

Request syntax with placeholder values


resp = client.create_hyper_parameter_tuning_job({
  hyper_parameter_tuning_job_name: "HyperParameterTuningJobName", # required
  hyper_parameter_tuning_job_config: { # required
    strategy: "Bayesian", # required, accepts Bayesian, Random
    hyper_parameter_tuning_job_objective: {
      type: "Maximize", # required, accepts Maximize, Minimize
      metric_name: "MetricName", # required
    },
    resource_limits: { # required
      max_number_of_training_jobs: 1, # required
      max_parallel_training_jobs: 1, # required
    },
    parameter_ranges: {
      integer_parameter_ranges: [
        {
          name: "ParameterKey", # required
          min_value: "ParameterValue", # required
          max_value: "ParameterValue", # required
          scaling_type: "Auto", # accepts Auto, Linear, Logarithmic, ReverseLogarithmic
        },
      ],
      continuous_parameter_ranges: [
        {
          name: "ParameterKey", # required
          min_value: "ParameterValue", # required
          max_value: "ParameterValue", # required
          scaling_type: "Auto", # accepts Auto, Linear, Logarithmic, ReverseLogarithmic
        },
      ],
      categorical_parameter_ranges: [
        {
          name: "ParameterKey", # required
          values: ["ParameterValue"], # required
        },
      ],
    },
    training_job_early_stopping_type: "Off", # accepts Off, Auto
    tuning_job_completion_criteria: {
      target_objective_metric_value: 1.0, # required
    },
  },
  training_job_definition: {
    definition_name: "HyperParameterTrainingJobDefinitionName",
    tuning_objective: {
      type: "Maximize", # required, accepts Maximize, Minimize
      metric_name: "MetricName", # required
    },
    hyper_parameter_ranges: {
      integer_parameter_ranges: [
        {
          name: "ParameterKey", # required
          min_value: "ParameterValue", # required
          max_value: "ParameterValue", # required
          scaling_type: "Auto", # accepts Auto, Linear, Logarithmic, ReverseLogarithmic
        },
      ],
      continuous_parameter_ranges: [
        {
          name: "ParameterKey", # required
          min_value: "ParameterValue", # required
          max_value: "ParameterValue", # required
          scaling_type: "Auto", # accepts Auto, Linear, Logarithmic, ReverseLogarithmic
        },
      ],
      categorical_parameter_ranges: [
        {
          name: "ParameterKey", # required
          values: ["ParameterValue"], # required
        },
      ],
    },
    static_hyper_parameters: {
      "HyperParameterKey" => "HyperParameterValue",
    },
    algorithm_specification: { # required
      training_image: "AlgorithmImage",
      training_input_mode: "Pipe", # required, accepts Pipe, File, FastFile
      algorithm_name: "ArnOrName",
      metric_definitions: [
        {
          name: "MetricName", # required
          regex: "MetricRegex", # required
        },
      ],
    },
    role_arn: "RoleArn", # required
    input_data_config: [
      {
        channel_name: "ChannelName", # required
        data_source: { # required
          s3_data_source: {
            s3_data_type: "ManifestFile", # required, accepts ManifestFile, S3Prefix, AugmentedManifestFile
            s3_uri: "S3Uri", # required
            s3_data_distribution_type: "FullyReplicated", # accepts FullyReplicated, ShardedByS3Key
            attribute_names: ["AttributeName"],
          },
          file_system_data_source: {
            file_system_id: "FileSystemId", # required
            file_system_access_mode: "rw", # required, accepts rw, ro
            file_system_type: "EFS", # required, accepts EFS, FSxLustre
            directory_path: "DirectoryPath", # required
          },
        },
        content_type: "ContentType",
        compression_type: "None", # accepts None, Gzip
        record_wrapper_type: "None", # accepts None, RecordIO
        input_mode: "Pipe", # accepts Pipe, File, FastFile
        shuffle_config: {
          seed: 1, # required
        },
      },
    ],
    vpc_config: {
      security_group_ids: ["SecurityGroupId"], # required
      subnets: ["SubnetId"], # required
    },
    output_data_config: { # required
      kms_key_id: "KmsKeyId",
      s3_output_path: "S3Uri", # required
    },
    resource_config: { # required
      instance_type: "ml.m4.xlarge", # required, accepts ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.p3dn.24xlarge, ml.p4d.24xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.c5n.xlarge, ml.c5n.2xlarge, ml.c5n.4xlarge, ml.c5n.9xlarge, ml.c5n.18xlarge
      instance_count: 1, # required
      volume_size_in_gb: 1, # required
      volume_kms_key_id: "KmsKeyId",
    },
    stopping_condition: { # required
      max_runtime_in_seconds: 1,
      max_wait_time_in_seconds: 1,
    },
    enable_network_isolation: false,
    enable_inter_container_traffic_encryption: false,
    enable_managed_spot_training: false,
    checkpoint_config: {
      s3_uri: "S3Uri", # required
      local_path: "DirectoryPath",
    },
    retry_strategy: {
      maximum_retry_attempts: 1, # required
    },
  },
  training_job_definitions: [
    {
      definition_name: "HyperParameterTrainingJobDefinitionName",
      tuning_objective: {
        type: "Maximize", # required, accepts Maximize, Minimize
        metric_name: "MetricName", # required
      },
      hyper_parameter_ranges: {
        integer_parameter_ranges: [
          {
            name: "ParameterKey", # required
            min_value: "ParameterValue", # required
            max_value: "ParameterValue", # required
            scaling_type: "Auto", # accepts Auto, Linear, Logarithmic, ReverseLogarithmic
          },
        ],
        continuous_parameter_ranges: [
          {
            name: "ParameterKey", # required
            min_value: "ParameterValue", # required
            max_value: "ParameterValue", # required
            scaling_type: "Auto", # accepts Auto, Linear, Logarithmic, ReverseLogarithmic
          },
        ],
        categorical_parameter_ranges: [
          {
            name: "ParameterKey", # required
            values: ["ParameterValue"], # required
          },
        ],
      },
      static_hyper_parameters: {
        "HyperParameterKey" => "HyperParameterValue",
      },
      algorithm_specification: { # required
        training_image: "AlgorithmImage",
        training_input_mode: "Pipe", # required, accepts Pipe, File, FastFile
        algorithm_name: "ArnOrName",
        metric_definitions: [
          {
            name: "MetricName", # required
            regex: "MetricRegex", # required
          },
        ],
      },
      role_arn: "RoleArn", # required
      input_data_config: [
        {
          channel_name: "ChannelName", # required
          data_source: { # required
            s3_data_source: {
              s3_data_type: "ManifestFile", # required, accepts ManifestFile, S3Prefix, AugmentedManifestFile
              s3_uri: "S3Uri", # required
              s3_data_distribution_type: "FullyReplicated", # accepts FullyReplicated, ShardedByS3Key
              attribute_names: ["AttributeName"],
            },
            file_system_data_source: {
              file_system_id: "FileSystemId", # required
              file_system_access_mode: "rw", # required, accepts rw, ro
              file_system_type: "EFS", # required, accepts EFS, FSxLustre
              directory_path: "DirectoryPath", # required
            },
          },
          content_type: "ContentType",
          compression_type: "None", # accepts None, Gzip
          record_wrapper_type: "None", # accepts None, RecordIO
          input_mode: "Pipe", # accepts Pipe, File, FastFile
          shuffle_config: {
            seed: 1, # required
          },
        },
      ],
      vpc_config: {
        security_group_ids: ["SecurityGroupId"], # required
        subnets: ["SubnetId"], # required
      },
      output_data_config: { # required
        kms_key_id: "KmsKeyId",
        s3_output_path: "S3Uri", # required
      },
      resource_config: { # required
        instance_type: "ml.m4.xlarge", # required, accepts ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.p3dn.24xlarge, ml.p4d.24xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.c5n.xlarge, ml.c5n.2xlarge, ml.c5n.4xlarge, ml.c5n.9xlarge, ml.c5n.18xlarge
        instance_count: 1, # required
        volume_size_in_gb: 1, # required
        volume_kms_key_id: "KmsKeyId",
      },
      stopping_condition: { # required
        max_runtime_in_seconds: 1,
        max_wait_time_in_seconds: 1,
      },
      enable_network_isolation: false,
      enable_inter_container_traffic_encryption: false,
      enable_managed_spot_training: false,
      checkpoint_config: {
        s3_uri: "S3Uri", # required
        local_path: "DirectoryPath",
      },
      retry_strategy: {
        maximum_retry_attempts: 1, # required
      },
    },
  ],
  warm_start_config: {
    parent_hyper_parameter_tuning_jobs: [ # required
      {
        hyper_parameter_tuning_job_name: "HyperParameterTuningJobName",
      },
    ],
    warm_start_type: "IdenticalDataAndAlgorithm", # required, accepts IdenticalDataAndAlgorithm, TransferLearning
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.hyper_parameter_tuning_job_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :hyper_parameter_tuning_job_name (required, String)

    The name of the tuning job. This name is the prefix for the names of all training jobs that this tuning job launches. The name must be unique within the same Amazon Web Services account and Amazon Web Services Region. The name must have 1 to 32 characters. Valid characters are a-z, A-Z, 0-9, and : + = @ _ % - (hyphen). The name is not case sensitive.

  • :hyper_parameter_tuning_job_config (required, Types::HyperParameterTuningJobConfig)

    The HyperParameterTuningJobConfig object that describes the tuning job, including the search strategy, the objective metric used to evaluate training jobs, ranges of parameters to search, and resource limits for the tuning job. For more information, see How Hyperparameter Tuning Works.

  • :training_job_definition (Types::HyperParameterTrainingJobDefinition)

    The HyperParameterTrainingJobDefinition object that describes the training jobs that this tuning job launches, including static hyperparameters, input data configuration, output data configuration, resource configuration, and stopping condition.

  • :training_job_definitions (Array<Types::HyperParameterTrainingJobDefinition>)

    A list of the HyperParameterTrainingJobDefinition objects launched for this tuning job.

  • :warm_start_config (Types::HyperParameterTuningJobWarmStartConfig)

    Specifies the configuration for starting the hyperparameter tuning job using one or more previous tuning jobs as a starting point. The results of previous tuning jobs are used to inform which combinations of hyperparameters to search over in the new tuning job.

    All training jobs launched by the new hyperparameter tuning job are evaluated by using the objective metric. If you specify IDENTICAL_DATA_AND_ALGORITHM as the WarmStartType value for the warm start configuration, the training job that performs the best in the new tuning job is compared to the best training jobs from the parent tuning jobs. From these, the training job that performs the best as measured by the objective metric is returned as the overall best training job.

    All training jobs launched by parent hyperparameter tuning jobs and the new hyperparameter tuning jobs count against the limit of training jobs for the tuning job.

  • :tags (Array<Types::Tag>)

    An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

    Tags that you specify for the tuning job are also added to all training jobs that the tuning job launches.

Returns:

See Also:



2968
2969
2970
2971
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 2968

def create_hyper_parameter_tuning_job(params = {}, options = {})
  req = build_request(:create_hyper_parameter_tuning_job, params)
  req.send_request(options)
end

#create_image(params = {}) ⇒ Types::CreateImageResponse

Creates a custom SageMaker image. A SageMaker image is a set of image versions. Each image version represents a container image stored in Amazon Container Registry (ECR). For more information, see Bring your own SageMaker image.

Examples:

Request syntax with placeholder values


resp = client.create_image({
  description: "ImageDescription",
  display_name: "ImageDisplayName",
  image_name: "ImageName", # required
  role_arn: "RoleArn", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.image_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :description (String)

    The description of the image.

  • :display_name (String)

    The display name of the image. If not provided, ImageName is displayed.

  • :image_name (required, String)

    The name of the image. Must be unique to your account.

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.

  • :tags (Array<Types::Tag>)

    A list of tags to apply to the image.

Returns:

See Also:



3026
3027
3028
3029
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 3026

def create_image(params = {}, options = {})
  req = build_request(:create_image, params)
  req.send_request(options)
end

#create_image_version(params = {}) ⇒ Types::CreateImageVersionResponse

Creates a version of the SageMaker image specified by ImageName. The version represents the Amazon Container Registry (ECR) container image specified by BaseImage.

Examples:

Request syntax with placeholder values


resp = client.create_image_version({
  base_image: "ImageBaseImage", # required
  client_token: "ClientToken", # required
  image_name: "ImageName", # required
})

Response structure


resp.image_version_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :base_image (required, String)

    The registry path of the container image to use as the starting point for this version. The path is an Amazon Container Registry (ECR) URI in the following format:

    <acct-id>.dkr.ecr.<region>.amazonaws.com/<repo-name[:tag] or [@digest]>

  • :client_token (required, String)

    A unique ID. If not specified, the Amazon Web Services CLI and Amazon Web Services SDKs, such as the SDK for Python (Boto3), add a unique value to the call.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :image_name (required, String)

    The ImageName of the Image to create a version of.

Returns:

See Also:



3074
3075
3076
3077
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 3074

def create_image_version(params = {}, options = {})
  req = build_request(:create_image_version, params)
  req.send_request(options)
end

#create_labeling_job(params = {}) ⇒ Types::CreateLabelingJobResponse

Creates a job that uses workers to label the data objects in your input dataset. You can use the labeled data to train machine learning models.

You can select your workforce from one of three providers:

  • A private workforce that you create. It can include employees, contractors, and outside experts. Use a private workforce when want the data to stay within your organization or when a specific set of skills is required.

  • One or more vendors that you select from the Amazon Web Services Marketplace. Vendors provide expertise in specific areas.

  • The Amazon Mechanical Turk workforce. This is the largest workforce, but it should only be used for public data or data that has been stripped of any personally identifiable information.

You can also use automated data labeling to reduce the number of data objects that need to be labeled by a human. Automated data labeling uses active learning to determine if a data object can be labeled by machine or if it needs to be sent to a human worker. For more information, see Using Automated Data Labeling.

The data objects to be labeled are contained in an Amazon S3 bucket. You create a manifest file that describes the location of each object. For more information, see Using Input and Output Data.

The output can be used as the manifest file for another labeling job or as training data for your machine learning models.

You can use this operation to create a static labeling job or a streaming labeling job. A static labeling job stops if all data objects in the input manifest file identified in ManifestS3Uri have been labeled. A streaming labeling job runs perpetually until it is manually stopped, or remains idle for 10 days. You can send new data objects to an active (InProgress) streaming labeling job in real time. To learn how to create a static labeling job, see Create a Labeling Job (API) in the Amazon SageMaker Developer Guide. To learn how to create a streaming labeling job, see Create a Streaming Labeling Job.

Examples:

Request syntax with placeholder values


resp = client.create_labeling_job({
  labeling_job_name: "LabelingJobName", # required
  label_attribute_name: "LabelAttributeName", # required
  input_config: { # required
    data_source: { # required
      s3_data_source: {
        manifest_s3_uri: "S3Uri", # required
      },
      sns_data_source: {
        sns_topic_arn: "SnsTopicArn", # required
      },
    },
    data_attributes: {
      content_classifiers: ["FreeOfPersonallyIdentifiableInformation"], # accepts FreeOfPersonallyIdentifiableInformation, FreeOfAdultContent
    },
  },
  output_config: { # required
    s3_output_path: "S3Uri", # required
    kms_key_id: "KmsKeyId",
    sns_topic_arn: "SnsTopicArn",
  },
  role_arn: "RoleArn", # required
  label_category_config_s3_uri: "S3Uri",
  stopping_conditions: {
    max_human_labeled_object_count: 1,
    max_percentage_of_input_dataset_labeled: 1,
  },
  labeling_job_algorithms_config: {
    labeling_job_algorithm_specification_arn: "LabelingJobAlgorithmSpecificationArn", # required
    initial_active_learning_model_arn: "ModelArn",
    labeling_job_resource_config: {
      volume_kms_key_id: "KmsKeyId",
    },
  },
  human_task_config: { # required
    workteam_arn: "WorkteamArn", # required
    ui_config: { # required
      ui_template_s3_uri: "S3Uri",
      human_task_ui_arn: "HumanTaskUiArn",
    },
    pre_human_task_lambda_arn: "LambdaFunctionArn", # required
    task_keywords: ["TaskKeyword"],
    task_title: "TaskTitle", # required
    task_description: "TaskDescription", # required
    number_of_human_workers_per_data_object: 1, # required
    task_time_limit_in_seconds: 1, # required
    task_availability_lifetime_in_seconds: 1,
    max_concurrent_task_count: 1,
    annotation_consolidation_config: { # required
      annotation_consolidation_lambda_arn: "LambdaFunctionArn", # required
    },
    public_workforce_task_price: {
      amount_in_usd: {
        dollars: 1,
        cents: 1,
        tenth_fractions_of_a_cent: 1,
      },
    },
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.labeling_job_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :labeling_job_name (required, String)

    The name of the labeling job. This name is used to identify the job in a list of labeling jobs. Labeling job names must be unique within an Amazon Web Services account and region. LabelingJobName is not case sensitive. For example, Example-job and example-job are considered the same labeling job name by Ground Truth.

  • :label_attribute_name (required, String)

    The attribute name to use for the label in the output manifest file. This is the key for the key/value pair formed with the label that a worker assigns to the object. The LabelAttributeName must meet the following requirements.

    • The name can't end with "-metadata".

    • If you are using one of the following built-in task types, the attribute name must end with "-ref". If the task type you are using is not listed below, the attribute name must not end with "-ref".

      • Image semantic segmentation (SemanticSegmentation), and adjustment (AdjustmentSemanticSegmentation) and verification (VerificationSemanticSegmentation) labeling jobs for this task type.

      • Video frame object detection (VideoObjectDetection), and adjustment and verification (AdjustmentVideoObjectDetection) labeling jobs for this task type.

      • Video frame object tracking (VideoObjectTracking), and adjustment and verification (AdjustmentVideoObjectTracking) labeling jobs for this task type.

      • 3D point cloud semantic segmentation (3DPointCloudSemanticSegmentation), and adjustment and verification (Adjustment3DPointCloudSemanticSegmentation) labeling jobs for this task type.

      • 3D point cloud object tracking (3DPointCloudObjectTracking), and adjustment and verification (Adjustment3DPointCloudObjectTracking) labeling jobs for this task type.

    If you are creating an adjustment or verification labeling job, you must use a different LabelAttributeName than the one used in the original labeling job. The original labeling job is the Ground Truth labeling job that produced the labels that you want verified or adjusted. To learn more about adjustment and verification labeling jobs, see Verify and Adjust Labels.

  • :input_config (required, Types::LabelingJobInputConfig)

    Input data for the labeling job, such as the Amazon S3 location of the data objects and the location of the manifest file that describes the data objects.

    You must specify at least one of the following: S3DataSource or SnsDataSource.

    • Use SnsDataSource to specify an SNS input topic for a streaming labeling job. If you do not specify and SNS input topic ARN, Ground Truth will create a one-time labeling job that stops after all data objects in the input manifest file have been labeled.

    • Use S3DataSource to specify an input manifest file for both streaming and one-time labeling jobs. Adding an S3DataSource is optional if you use SnsDataSource to create a streaming labeling job.

    If you use the Amazon Mechanical Turk workforce, your input data should not include confidential information, personal information or protected health information. Use ContentClassifiers to specify that your data is free of personally identifiable information and adult content.

  • :output_config (required, Types::LabelingJobOutputConfig)

    The location of the output data and the Amazon Web Services Key Management Service key ID for the key used to encrypt the output data, if any.

  • :role_arn (required, String)

    The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform tasks on your behalf during data labeling. You must grant this role the necessary permissions so that Amazon SageMaker can successfully complete data labeling.

  • :label_category_config_s3_uri (String)

    The S3 URI of the file, referred to as a label category configuration file, that defines the categories used to label the data objects.

    For 3D point cloud and video frame task types, you can add label category attributes and frame attributes to your label category configuration file. To learn how, see Create a Labeling Category Configuration File for 3D Point Cloud Labeling Jobs.

    For named entity recognition jobs, in addition to "labels", you must provide worker instructions in the label category configuration file using the "instructions" parameter: "instructions": \{"shortInstruction":"<h1>Add header</h1><p>Add Instructions</p>", "fullInstruction":"<p>Add additional instructions.</p>"\}. For details and an example, see Create a Named Entity Recognition Labeling Job (API) .

    For all other built-in task types and custom tasks, your label category configuration file must be a JSON file in the following format. Identify the labels you want to use by replacing label_1, label_2,...,label_n with your label categories.

    \{

    "document-version": "2018-11-28",

    "labels": [\{"label": "label_1"\},\{"label": "label_2"\},...\{"label": "label_n"\}]

    \}

    Note the following about the label category configuration file:

    • For image classification and text classification (single and multi-label) you must specify at least two label categories. For all other task types, the minimum number of label categories required is one.

    • Each label category must be unique, you cannot specify duplicate label categories.

    • If you create a 3D point cloud or video frame adjustment or verification labeling job, you must include auditLabelAttributeName in the label category configuration. Use this parameter to enter the LabelAttributeName of the labeling job you want to adjust or verify annotations of.

  • :stopping_conditions (Types::LabelingJobStoppingConditions)

    A set of conditions for stopping the labeling job. If any of the conditions are met, the job is automatically stopped. You can use these conditions to control the cost of data labeling.

  • :labeling_job_algorithms_config (Types::LabelingJobAlgorithmsConfig)

    Configures the information required to perform automated data labeling.

  • :human_task_config (required, Types::HumanTaskConfig)

    Configures the labeling task and how it is presented to workers; including, but not limited to price, keywords, and batch size (task count).

  • :tags (Array<Types::Tag>)

    An array of key/value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

Returns:

See Also:



3379
3380
3381
3382
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 3379

def create_labeling_job(params = {}, options = {})
  req = build_request(:create_labeling_job, params)
  req.send_request(options)
end

#create_model(params = {}) ⇒ Types::CreateModelOutput

Creates a model in Amazon SageMaker. In the request, you name the model and describe a primary container. For the primary container, you specify the Docker image that contains inference code, artifacts (from prior training), and a custom environment map that the inference code uses when you deploy the model for predictions.

Use this API to create a model if you want to use Amazon SageMaker hosting services or run a batch transform job.

To host your model, you create an endpoint configuration with the CreateEndpointConfig API, and then create an endpoint with the CreateEndpoint API. Amazon SageMaker then deploys all of the containers that you defined for the model in the hosting environment.

For an example that calls this method when deploying a model to Amazon SageMaker hosting services, see Deploy the Model to Amazon SageMaker Hosting Services (Amazon Web Services SDK for Python (Boto 3)).

To run a batch transform using your model, you start a job with the CreateTransformJob API. Amazon SageMaker uses your model and your dataset to get inferences which are then saved to a specified S3 location.

In the CreateModel request, you must define a container with the PrimaryContainer parameter.

In the request, you also provide an IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on ML compute hosting instances or for batch transform jobs. In addition, you also use the IAM role to manage permissions the inference code needs. For example, if the inference code access any other Amazon Web Services resources, you grant necessary permissions via this role.

Examples:

Request syntax with placeholder values


resp = client.create_model({
  model_name: "ModelName", # required
  primary_container: {
    container_hostname: "ContainerHostname",
    image: "ContainerImage",
    image_config: {
      repository_access_mode: "Platform", # required, accepts Platform, Vpc
      repository_auth_config: {
        repository_credentials_provider_arn: "RepositoryCredentialsProviderArn", # required
      },
    },
    mode: "SingleModel", # accepts SingleModel, MultiModel
    model_data_url: "Url",
    environment: {
      "EnvironmentKey" => "EnvironmentValue",
    },
    model_package_name: "VersionedArnOrName",
    multi_model_config: {
      model_cache_setting: "Enabled", # accepts Enabled, Disabled
    },
  },
  containers: [
    {
      container_hostname: "ContainerHostname",
      image: "ContainerImage",
      image_config: {
        repository_access_mode: "Platform", # required, accepts Platform, Vpc
        repository_auth_config: {
          repository_credentials_provider_arn: "RepositoryCredentialsProviderArn", # required
        },
      },
      mode: "SingleModel", # accepts SingleModel, MultiModel
      model_data_url: "Url",
      environment: {
        "EnvironmentKey" => "EnvironmentValue",
      },
      model_package_name: "VersionedArnOrName",
      multi_model_config: {
        model_cache_setting: "Enabled", # accepts Enabled, Disabled
      },
    },
  ],
  inference_execution_config: {
    mode: "Serial", # required, accepts Serial, Direct
  },
  execution_role_arn: "RoleArn", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  vpc_config: {
    security_group_ids: ["SecurityGroupId"], # required
    subnets: ["SubnetId"], # required
  },
  enable_network_isolation: false,
})

Response structure


resp.model_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :model_name (required, String)

    The name of the new model.

  • :primary_container (Types::ContainerDefinition)

    The location of the primary docker image containing inference code, associated artifacts, and custom environment map that the inference code uses when the model is deployed for predictions.

  • :containers (Array<Types::ContainerDefinition>)

    Specifies the containers in the inference pipeline.

  • :inference_execution_config (Types::InferenceExecutionConfig)

    Specifies details of how containers in a multi-container endpoint are called.

  • :execution_role_arn (required, String)

    The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on ML compute instances or for batch transform jobs. Deploying on ML compute instances is part of model hosting. For more information, see Amazon SageMaker Roles.

    To be able to pass this role to Amazon SageMaker, the caller of this API must have the iam:PassRole permission.

  • :tags (Array<Types::Tag>)

    An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

  • :vpc_config (Types::VpcConfig)

    A VpcConfig object that specifies the VPC that you want your model to connect to. Control access to and from your model container by configuring the VPC. VpcConfig is used in hosting services and in batch transform. For more information, see Protect Endpoints by Using an Amazon Virtual Private Cloud and Protect Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud.

  • :enable_network_isolation (Boolean)

    Isolates the model container. No inbound or outbound network calls can be made to or from the model container.

Returns:

See Also:



3552
3553
3554
3555
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 3552

def create_model(params = {}, options = {})
  req = build_request(:create_model, params)
  req.send_request(options)
end

#create_model_bias_job_definition(params = {}) ⇒ Types::CreateModelBiasJobDefinitionResponse

Creates the definition for a model bias job.

Examples:

Request syntax with placeholder values


resp = client.create_model_bias_job_definition({
  job_definition_name: "MonitoringJobDefinitionName", # required
  model_bias_baseline_config: {
    baselining_job_name: "ProcessingJobName",
    constraints_resource: {
      s3_uri: "S3Uri",
    },
  },
  model_bias_app_specification: { # required
    image_uri: "ImageUri", # required
    config_uri: "S3Uri", # required
    environment: {
      "ProcessingEnvironmentKey" => "ProcessingEnvironmentValue",
    },
  },
  model_bias_job_input: { # required
    endpoint_input: { # required
      endpoint_name: "EndpointName", # required
      local_path: "ProcessingLocalPath", # required
      s3_input_mode: "Pipe", # accepts Pipe, File
      s3_data_distribution_type: "FullyReplicated", # accepts FullyReplicated, ShardedByS3Key
      features_attribute: "String",
      inference_attribute: "String",
      probability_attribute: "String",
      probability_threshold_attribute: 1.0,
      start_time_offset: "MonitoringTimeOffsetString",
      end_time_offset: "MonitoringTimeOffsetString",
    },
    ground_truth_s3_input: { # required
      s3_uri: "MonitoringS3Uri",
    },
  },
  model_bias_job_output_config: { # required
    monitoring_outputs: [ # required
      {
        s3_output: { # required
          s3_uri: "MonitoringS3Uri", # required
          local_path: "ProcessingLocalPath", # required
          s3_upload_mode: "Continuous", # accepts Continuous, EndOfJob
        },
      },
    ],
    kms_key_id: "KmsKeyId",
  },
  job_resources: { # required
    cluster_config: { # required
      instance_count: 1, # required
      instance_type: "ml.t3.medium", # required, accepts ml.t3.medium, ml.t3.large, ml.t3.xlarge, ml.t3.2xlarge, ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.8xlarge, ml.r5.12xlarge, ml.r5.16xlarge, ml.r5.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge
      volume_size_in_gb: 1, # required
      volume_kms_key_id: "KmsKeyId",
    },
  },
  network_config: {
    enable_inter_container_traffic_encryption: false,
    enable_network_isolation: false,
    vpc_config: {
      security_group_ids: ["SecurityGroupId"], # required
      subnets: ["SubnetId"], # required
    },
  },
  role_arn: "RoleArn", # required
  stopping_condition: {
    max_runtime_in_seconds: 1, # required
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.job_definition_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :job_definition_name (required, String)

    The name of the bias job definition. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account.

  • :model_bias_baseline_config (Types::ModelBiasBaselineConfig)

    The baseline configuration for a model bias job.

  • :model_bias_app_specification (required, Types::ModelBiasAppSpecification)

    Configures the model bias job to run a specified Docker container image.

  • :model_bias_job_input (required, Types::ModelBiasJobInput)

    Inputs for the model bias job.

  • :model_bias_job_output_config (required, Types::MonitoringOutputConfig)

    The output configuration for monitoring jobs.

  • :job_resources (required, Types::MonitoringResources)

    Identifies the resources to deploy for a monitoring job.

  • :network_config (Types::MonitoringNetworkConfig)

    Networking options for a model bias job.

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf.

  • :stopping_condition (Types::MonitoringStoppingCondition)

    A time limit for how long the monitoring job is allowed to run before stopping.

  • :tags (Array<Types::Tag>) — default: Optional

    An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

Returns:

See Also:



3685
3686
3687
3688
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 3685

def create_model_bias_job_definition(params = {}, options = {})
  req = build_request(:create_model_bias_job_definition, params)
  req.send_request(options)
end

#create_model_explainability_job_definition(params = {}) ⇒ Types::CreateModelExplainabilityJobDefinitionResponse

Creates the definition for a model explainability job.

Examples:

Request syntax with placeholder values


resp = client.create_model_explainability_job_definition({
  job_definition_name: "MonitoringJobDefinitionName", # required
  model_explainability_baseline_config: {
    baselining_job_name: "ProcessingJobName",
    constraints_resource: {
      s3_uri: "S3Uri",
    },
  },
  model_explainability_app_specification: { # required
    image_uri: "ImageUri", # required
    config_uri: "S3Uri", # required
    environment: {
      "ProcessingEnvironmentKey" => "ProcessingEnvironmentValue",
    },
  },
  model_explainability_job_input: { # required
    endpoint_input: { # required
      endpoint_name: "EndpointName", # required
      local_path: "ProcessingLocalPath", # required
      s3_input_mode: "Pipe", # accepts Pipe, File
      s3_data_distribution_type: "FullyReplicated", # accepts FullyReplicated, ShardedByS3Key
      features_attribute: "String",
      inference_attribute: "String",
      probability_attribute: "String",
      probability_threshold_attribute: 1.0,
      start_time_offset: "MonitoringTimeOffsetString",
      end_time_offset: "MonitoringTimeOffsetString",
    },
  },
  model_explainability_job_output_config: { # required
    monitoring_outputs: [ # required
      {
        s3_output: { # required
          s3_uri: "MonitoringS3Uri", # required
          local_path: "ProcessingLocalPath", # required
          s3_upload_mode: "Continuous", # accepts Continuous, EndOfJob
        },
      },
    ],
    kms_key_id: "KmsKeyId",
  },
  job_resources: { # required
    cluster_config: { # required
      instance_count: 1, # required
      instance_type: "ml.t3.medium", # required, accepts ml.t3.medium, ml.t3.large, ml.t3.xlarge, ml.t3.2xlarge, ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.8xlarge, ml.r5.12xlarge, ml.r5.16xlarge, ml.r5.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge
      volume_size_in_gb: 1, # required
      volume_kms_key_id: "KmsKeyId",
    },
  },
  network_config: {
    enable_inter_container_traffic_encryption: false,
    enable_network_isolation: false,
    vpc_config: {
      security_group_ids: ["SecurityGroupId"], # required
      subnets: ["SubnetId"], # required
    },
  },
  role_arn: "RoleArn", # required
  stopping_condition: {
    max_runtime_in_seconds: 1, # required
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.job_definition_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :job_definition_name (required, String)

    The name of the model explainability job definition. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account.

  • :model_explainability_baseline_config (Types::ModelExplainabilityBaselineConfig)

    The baseline configuration for a model explainability job.

  • :model_explainability_app_specification (required, Types::ModelExplainabilityAppSpecification)

    Configures the model explainability job to run a specified Docker container image.

  • :model_explainability_job_input (required, Types::ModelExplainabilityJobInput)

    Inputs for the model explainability job.

  • :model_explainability_job_output_config (required, Types::MonitoringOutputConfig)

    The output configuration for monitoring jobs.

  • :job_resources (required, Types::MonitoringResources)

    Identifies the resources to deploy for a monitoring job.

  • :network_config (Types::MonitoringNetworkConfig)

    Networking options for a model explainability job.

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf.

  • :stopping_condition (Types::MonitoringStoppingCondition)

    A time limit for how long the monitoring job is allowed to run before stopping.

  • :tags (Array<Types::Tag>) — default: Optional

    An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

Returns:

See Also:



3816
3817
3818
3819
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 3816

def create_model_explainability_job_definition(params = {}, options = {})
  req = build_request(:create_model_explainability_job_definition, params)
  req.send_request(options)
end

#create_model_package(params = {}) ⇒ Types::CreateModelPackageOutput

Creates a model package that you can use to create Amazon SageMaker models or list on Amazon Web Services Marketplace, or a versioned model that is part of a model group. Buyers can subscribe to model packages listed on Amazon Web Services Marketplace to create models in Amazon SageMaker.

To create a model package by specifying a Docker container that contains your inference code and the Amazon S3 location of your model artifacts, provide values for InferenceSpecification. To create a model from an algorithm resource that you created or subscribed to in Amazon Web Services Marketplace, provide a value for SourceAlgorithmSpecification.

There are two types of model packages:

  • Versioned - a model that is part of a model group in the model registry.

  • Unversioned - a model package that is not part of a model group.

Examples:

Request syntax with placeholder values


resp = client.create_model_package({
  model_package_name: "EntityName",
  model_package_group_name: "EntityName",
  model_package_description: "EntityDescription",
  inference_specification: {
    containers: [ # required
      {
        container_hostname: "ContainerHostname",
        image: "ContainerImage", # required
        image_digest: "ImageDigest",
        model_data_url: "Url",
        product_id: "ProductId",
        environment: {
          "EnvironmentKey" => "EnvironmentValue",
        },
      },
    ],
    supported_transform_instance_types: ["ml.m4.xlarge"], # accepts ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge
    supported_realtime_inference_instance_types: ["ml.t2.medium"], # accepts ml.t2.medium, ml.t2.large, ml.t2.xlarge, ml.t2.2xlarge, ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.m5d.large, ml.m5d.xlarge, ml.m5d.2xlarge, ml.m5d.4xlarge, ml.m5d.12xlarge, ml.m5d.24xlarge, ml.c4.large, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.large, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.c5d.large, ml.c5d.xlarge, ml.c5d.2xlarge, ml.c5d.4xlarge, ml.c5d.9xlarge, ml.c5d.18xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.12xlarge, ml.r5.24xlarge, ml.r5d.large, ml.r5d.xlarge, ml.r5d.2xlarge, ml.r5d.4xlarge, ml.r5d.12xlarge, ml.r5d.24xlarge, ml.inf1.xlarge, ml.inf1.2xlarge, ml.inf1.6xlarge, ml.inf1.24xlarge
    supported_content_types: ["ContentType"], # required
    supported_response_mime_types: ["ResponseMIMEType"], # required
  },
  validation_specification: {
    validation_role: "RoleArn", # required
    validation_profiles: [ # required
      {
        profile_name: "EntityName", # required
        transform_job_definition: { # required
          max_concurrent_transforms: 1,
          max_payload_in_mb: 1,
          batch_strategy: "MultiRecord", # accepts MultiRecord, SingleRecord
          environment: {
            "TransformEnvironmentKey" => "TransformEnvironmentValue",
          },
          transform_input: { # required
            data_source: { # required
              s3_data_source: { # required
                s3_data_type: "ManifestFile", # required, accepts ManifestFile, S3Prefix, AugmentedManifestFile
                s3_uri: "S3Uri", # required
              },
            },
            content_type: "ContentType",
            compression_type: "None", # accepts None, Gzip
            split_type: "None", # accepts None, Line, RecordIO, TFRecord
          },
          transform_output: { # required
            s3_output_path: "S3Uri", # required
            accept: "Accept",
            assemble_with: "None", # accepts None, Line
            kms_key_id: "KmsKeyId",
          },
          transform_resources: { # required
            instance_type: "ml.m4.xlarge", # required, accepts ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge
            instance_count: 1, # required
            volume_kms_key_id: "KmsKeyId",
          },
        },
      },
    ],
  },
  source_algorithm_specification: {
    source_algorithms: [ # required
      {
        model_data_url: "Url",
        algorithm_name: "ArnOrName", # required
      },
    ],
  },
  certify_for_marketplace: false,
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  model_approval_status: "Approved", # accepts Approved, Rejected, PendingManualApproval
  metadata_properties: {
    commit_id: "MetadataPropertyValue",
    repository: "MetadataPropertyValue",
    generated_by: "MetadataPropertyValue",
    project_id: "MetadataPropertyValue",
  },
  model_metrics: {
    model_quality: {
      statistics: {
        content_type: "ContentType", # required
        content_digest: "ContentDigest",
        s3_uri: "S3Uri", # required
      },
      constraints: {
        content_type: "ContentType", # required
        content_digest: "ContentDigest",
        s3_uri: "S3Uri", # required
      },
    },
    model_data_quality: {
      statistics: {
        content_type: "ContentType", # required
        content_digest: "ContentDigest",
        s3_uri: "S3Uri", # required
      },
      constraints: {
        content_type: "ContentType", # required
        content_digest: "ContentDigest",
        s3_uri: "S3Uri", # required
      },
    },
    bias: {
      report: {
        content_type: "ContentType", # required
        content_digest: "ContentDigest",
        s3_uri: "S3Uri", # required
      },
    },
    explainability: {
      report: {
        content_type: "ContentType", # required
        content_digest: "ContentDigest",
        s3_uri: "S3Uri", # required
      },
    },
  },
  client_token: "ClientToken",
})

Response structure


resp.model_package_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :model_package_name (String)

    The name of the model package. The name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).

    This parameter is required for unversioned models. It is not applicable to versioned models.

  • :model_package_group_name (String)

    The name of the model group that this model version belongs to.

    This parameter is required for versioned models, and does not apply to unversioned models.

  • :model_package_description (String)

    A description of the model package.

  • :inference_specification (Types::InferenceSpecification)

    Specifies details about inference jobs that can be run with models based on this model package, including the following:

    • The Amazon ECR paths of containers that contain the inference code and model artifacts.

    • The instance types that the model package supports for transform jobs and real-time endpoints used for inference.

    • The input and output content formats that the model package supports for inference.

  • :validation_specification (Types::ModelPackageValidationSpecification)

    Specifies configurations for one or more transform jobs that Amazon SageMaker runs to test the model package.

  • :source_algorithm_specification (Types::SourceAlgorithmSpecification)

    Details about the algorithm that was used to create the model package.

  • :certify_for_marketplace (Boolean)

    Whether to certify the model package for listing on Amazon Web Services Marketplace.

    This parameter is optional for unversioned models, and does not apply to versioned models.

  • :tags (Array<Types::Tag>)

    A list of key value pairs associated with the model. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide.

  • :model_approval_status (String)

    Whether the model is approved for deployment.

    This parameter is optional for versioned models, and does not apply to unversioned models.

    For versioned models, the value of this parameter must be set to Approved to deploy the model.

  • :metadata_properties (Types::MetadataProperties)

    Metadata properties of the tracking entity, trial, or trial component.

  • :model_metrics (Types::ModelMetrics)

    A structure that contains model metrics reports.

  • :client_token (String)

    A unique token that guarantees that the call to this API is idempotent.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



4056
4057
4058
4059
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 4056

def create_model_package(params = {}, options = {})
  req = build_request(:create_model_package, params)
  req.send_request(options)
end

#create_model_package_group(params = {}) ⇒ Types::CreateModelPackageGroupOutput

Creates a model group. A model group contains a group of model versions.

Examples:

Request syntax with placeholder values


resp = client.create_model_package_group({
  model_package_group_name: "EntityName", # required
  model_package_group_description: "EntityDescription",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.model_package_group_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :model_package_group_name (required, String)

    The name of the model group.

  • :model_package_group_description (String)

    A description for the model group.

  • :tags (Array<Types::Tag>)

    A list of key value pairs associated with the model group. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide.

Returns:

See Also:



4104
4105
4106
4107
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 4104

def create_model_package_group(params = {}, options = {})
  req = build_request(:create_model_package_group, params)
  req.send_request(options)
end

#create_model_quality_job_definition(params = {}) ⇒ Types::CreateModelQualityJobDefinitionResponse

Creates a definition for a job that monitors model quality and drift. For information about model monitor, see Amazon SageMaker Model Monitor.

Examples:

Request syntax with placeholder values


resp = client.create_model_quality_job_definition({
  job_definition_name: "MonitoringJobDefinitionName", # required
  model_quality_baseline_config: {
    baselining_job_name: "ProcessingJobName",
    constraints_resource: {
      s3_uri: "S3Uri",
    },
  },
  model_quality_app_specification: { # required
    image_uri: "ImageUri", # required
    container_entrypoint: ["ContainerEntrypointString"],
    container_arguments: ["ContainerArgument"],
    record_preprocessor_source_uri: "S3Uri",
    post_analytics_processor_source_uri: "S3Uri",
    problem_type: "BinaryClassification", # accepts BinaryClassification, MulticlassClassification, Regression
    environment: {
      "ProcessingEnvironmentKey" => "ProcessingEnvironmentValue",
    },
  },
  model_quality_job_input: { # required
    endpoint_input: { # required
      endpoint_name: "EndpointName", # required
      local_path: "ProcessingLocalPath", # required
      s3_input_mode: "Pipe", # accepts Pipe, File
      s3_data_distribution_type: "FullyReplicated", # accepts FullyReplicated, ShardedByS3Key
      features_attribute: "String",
      inference_attribute: "String",
      probability_attribute: "String",
      probability_threshold_attribute: 1.0,
      start_time_offset: "MonitoringTimeOffsetString",
      end_time_offset: "MonitoringTimeOffsetString",
    },
    ground_truth_s3_input: { # required
      s3_uri: "MonitoringS3Uri",
    },
  },
  model_quality_job_output_config: { # required
    monitoring_outputs: [ # required
      {
        s3_output: { # required
          s3_uri: "MonitoringS3Uri", # required
          local_path: "ProcessingLocalPath", # required
          s3_upload_mode: "Continuous", # accepts Continuous, EndOfJob
        },
      },
    ],
    kms_key_id: "KmsKeyId",
  },
  job_resources: { # required
    cluster_config: { # required
      instance_count: 1, # required
      instance_type: "ml.t3.medium", # required, accepts ml.t3.medium, ml.t3.large, ml.t3.xlarge, ml.t3.2xlarge, ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.8xlarge, ml.r5.12xlarge, ml.r5.16xlarge, ml.r5.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge
      volume_size_in_gb: 1, # required
      volume_kms_key_id: "KmsKeyId",
    },
  },
  network_config: {
    enable_inter_container_traffic_encryption: false,
    enable_network_isolation: false,
    vpc_config: {
      security_group_ids: ["SecurityGroupId"], # required
      subnets: ["SubnetId"], # required
    },
  },
  role_arn: "RoleArn", # required
  stopping_condition: {
    max_runtime_in_seconds: 1, # required
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.job_definition_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :job_definition_name (required, String)

    The name of the monitoring job definition.

  • :model_quality_baseline_config (Types::ModelQualityBaselineConfig)

    Specifies the constraints and baselines for the monitoring job.

  • :model_quality_app_specification (required, Types::ModelQualityAppSpecification)

    The container that runs the monitoring job.

  • :model_quality_job_input (required, Types::ModelQualityJobInput)

    A list of the inputs that are monitored. Currently endpoints are supported.

  • :model_quality_job_output_config (required, Types::MonitoringOutputConfig)

    The output configuration for monitoring jobs.

  • :job_resources (required, Types::MonitoringResources)

    Identifies the resources to deploy for a monitoring job.

  • :network_config (Types::MonitoringNetworkConfig)

    Specifies the network configuration for the monitoring job.

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf.

  • :stopping_condition (Types::MonitoringStoppingCondition)

    A time limit for how long the monitoring job is allowed to run before stopping.

  • :tags (Array<Types::Tag>) — default: Optional

    An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

Returns:

See Also:



4246
4247
4248
4249
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 4246

def create_model_quality_job_definition(params = {}, options = {})
  req = build_request(:create_model_quality_job_definition, params)
  req.send_request(options)
end

#create_monitoring_schedule(params = {}) ⇒ Types::CreateMonitoringScheduleResponse

Creates a schedule that regularly starts Amazon SageMaker Processing Jobs to monitor the data captured for an Amazon SageMaker Endoint.

Examples:

Request syntax with placeholder values


resp = client.create_monitoring_schedule({
  monitoring_schedule_name: "MonitoringScheduleName", # required
  monitoring_schedule_config: { # required
    schedule_config: {
      schedule_expression: "ScheduleExpression", # required
    },
    monitoring_job_definition: {
      baseline_config: {
        baselining_job_name: "ProcessingJobName",
        constraints_resource: {
          s3_uri: "S3Uri",
        },
        statistics_resource: {
          s3_uri: "S3Uri",
        },
      },
      monitoring_inputs: [ # required
        {
          endpoint_input: { # required
            endpoint_name: "EndpointName", # required
            local_path: "ProcessingLocalPath", # required
            s3_input_mode: "Pipe", # accepts Pipe, File
            s3_data_distribution_type: "FullyReplicated", # accepts FullyReplicated, ShardedByS3Key
            features_attribute: "String",
            inference_attribute: "String",
            probability_attribute: "String",
            probability_threshold_attribute: 1.0,
            start_time_offset: "MonitoringTimeOffsetString",
            end_time_offset: "MonitoringTimeOffsetString",
          },
        },
      ],
      monitoring_output_config: { # required
        monitoring_outputs: [ # required
          {
            s3_output: { # required
              s3_uri: "MonitoringS3Uri", # required
              local_path: "ProcessingLocalPath", # required
              s3_upload_mode: "Continuous", # accepts Continuous, EndOfJob
            },
          },
        ],
        kms_key_id: "KmsKeyId",
      },
      monitoring_resources: { # required
        cluster_config: { # required
          instance_count: 1, # required
          instance_type: "ml.t3.medium", # required, accepts ml.t3.medium, ml.t3.large, ml.t3.xlarge, ml.t3.2xlarge, ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.8xlarge, ml.r5.12xlarge, ml.r5.16xlarge, ml.r5.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge
          volume_size_in_gb: 1, # required
          volume_kms_key_id: "KmsKeyId",
        },
      },
      monitoring_app_specification: { # required
        image_uri: "ImageUri", # required
        container_entrypoint: ["ContainerEntrypointString"],
        container_arguments: ["ContainerArgument"],
        record_preprocessor_source_uri: "S3Uri",
        post_analytics_processor_source_uri: "S3Uri",
      },
      stopping_condition: {
        max_runtime_in_seconds: 1, # required
      },
      environment: {
        "ProcessingEnvironmentKey" => "ProcessingEnvironmentValue",
      },
      network_config: {
        enable_inter_container_traffic_encryption: false,
        enable_network_isolation: false,
        vpc_config: {
          security_group_ids: ["SecurityGroupId"], # required
          subnets: ["SubnetId"], # required
        },
      },
      role_arn: "RoleArn", # required
    },
    monitoring_job_definition_name: "MonitoringJobDefinitionName",
    monitoring_type: "DataQuality", # accepts DataQuality, ModelQuality, ModelBias, ModelExplainability
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.monitoring_schedule_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :monitoring_schedule_name (required, String)

    The name of the monitoring schedule. The name must be unique within an Amazon Web Services Region within an Amazon Web Services account.

  • :monitoring_schedule_config (required, Types::MonitoringScheduleConfig)

    The configuration object that specifies the monitoring schedule and defines the monitoring job.

  • :tags (Array<Types::Tag>) — default: Optional

    An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

Returns:

See Also:



4368
4369
4370
4371
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 4368

def create_monitoring_schedule(params = {}, options = {})
  req = build_request(:create_monitoring_schedule, params)
  req.send_request(options)
end

#create_notebook_instance(params = {}) ⇒ Types::CreateNotebookInstanceOutput

Creates an Amazon SageMaker notebook instance. A notebook instance is a machine learning (ML) compute instance running on a Jupyter notebook.

In a CreateNotebookInstance request, specify the type of ML compute instance that you want to run. Amazon SageMaker launches the instance, installs common libraries that you can use to explore datasets for model training, and attaches an ML storage volume to the notebook instance.

Amazon SageMaker also provides a set of example notebooks. Each notebook demonstrates how to use Amazon SageMaker with a specific algorithm or with a machine learning framework.

After receiving the request, Amazon SageMaker does the following:

  1. Creates a network interface in the Amazon SageMaker VPC.

  2. (Option) If you specified SubnetId, Amazon SageMaker creates a network interface in your own VPC, which is inferred from the subnet ID that you provide in the input. When creating this network interface, Amazon SageMaker attaches the security group that you specified in the request to the network interface that it creates in your VPC.

  3. Launches an EC2 instance of the type specified in the request in the Amazon SageMaker VPC. If you specified SubnetId of your VPC, Amazon SageMaker specifies both network interfaces when launching this instance. This enables inbound traffic from your own VPC to the notebook instance, assuming that the security groups allow it.

After creating the notebook instance, Amazon SageMaker returns its Amazon Resource Name (ARN). You can't change the name of a notebook instance after you create it.

After Amazon SageMaker creates the notebook instance, you can connect to the Jupyter server and work in Jupyter notebooks. For example, you can write code to explore a dataset that you can use for model training, train a model, host models by creating Amazon SageMaker endpoints, and validate hosted models.

For more information, see How It Works.

Examples:

Request syntax with placeholder values


resp = client.create_notebook_instance({
  notebook_instance_name: "NotebookInstanceName", # required
  instance_type: "ml.t2.medium", # required, accepts ml.t2.medium, ml.t2.large, ml.t2.xlarge, ml.t2.2xlarge, ml.t3.medium, ml.t3.large, ml.t3.xlarge, ml.t3.2xlarge, ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.m5d.large, ml.m5d.xlarge, ml.m5d.2xlarge, ml.m5d.4xlarge, ml.m5d.8xlarge, ml.m5d.12xlarge, ml.m5d.16xlarge, ml.m5d.24xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.c5d.xlarge, ml.c5d.2xlarge, ml.c5d.4xlarge, ml.c5d.9xlarge, ml.c5d.18xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.p3dn.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.8xlarge, ml.r5.12xlarge, ml.r5.16xlarge, ml.r5.24xlarge
  subnet_id: "SubnetId",
  security_group_ids: ["SecurityGroupId"],
  role_arn: "RoleArn", # required
  kms_key_id: "KmsKeyId",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  lifecycle_config_name: "NotebookInstanceLifecycleConfigName",
  direct_internet_access: "Enabled", # accepts Enabled, Disabled
  volume_size_in_gb: 1,
  accelerator_types: ["ml.eia1.medium"], # accepts ml.eia1.medium, ml.eia1.large, ml.eia1.xlarge, ml.eia2.medium, ml.eia2.large, ml.eia2.xlarge
  default_code_repository: "CodeRepositoryNameOrUrl",
  additional_code_repositories: ["CodeRepositoryNameOrUrl"],
  root_access: "Enabled", # accepts Enabled, Disabled
  platform_identifier: "PlatformIdentifier",
})

Response structure


resp.notebook_instance_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :notebook_instance_name (required, String)

    The name of the new notebook instance.

  • :instance_type (required, String)

    The type of ML compute instance to launch for the notebook instance.

  • :subnet_id (String)

    The ID of the subnet in a VPC to which you would like to have a connectivity from your ML compute instance.

  • :security_group_ids (Array<String>)

    The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be for the same VPC as specified in the subnet.

  • :role_arn (required, String)

    When you send any requests to Amazon Web Services resources from the notebook instance, Amazon SageMaker assumes this role to perform tasks on your behalf. You must grant this role necessary permissions so Amazon SageMaker can perform these tasks. The policy must allow the Amazon SageMaker service principal (sagemaker.amazonaws.com) permissions to assume this role. For more information, see Amazon SageMaker Roles.

    To be able to pass this role to Amazon SageMaker, the caller of this API must have the iam:PassRole permission.

  • :kms_key_id (String)

    The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that Amazon SageMaker uses to encrypt data on the storage volume attached to your notebook instance. The KMS key you provide must be enabled. For information, see Enabling and Disabling Keys in the Amazon Web Services Key Management Service Developer Guide.

  • :tags (Array<Types::Tag>)

    An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

  • :lifecycle_config_name (String)

    The name of a lifecycle configuration to associate with the notebook instance. For information about lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance.

  • :direct_internet_access (String)

    Sets whether Amazon SageMaker provides internet access to the notebook instance. If you set this to Disabled this notebook instance is able to access resources only in your VPC, and is not be able to connect to Amazon SageMaker training and endpoint services unless you configure a NAT Gateway in your VPC.

    For more information, see Notebook Instances Are Internet-Enabled by Default. You can set the value of this parameter to Disabled only if you set a value for the SubnetId parameter.

  • :volume_size_in_gb (Integer)

    The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB.

  • :accelerator_types (Array<String>)

    A list of Elastic Inference (EI) instance types to associate with this notebook instance. Currently, only one instance type can be associated with a notebook instance. For more information, see Using Elastic Inference in Amazon SageMaker.

  • :default_code_repository (String)

    A Git repository to associate with the notebook instance as its default code repository. This can be either the name of a Git repository stored as a resource in your account, or the URL of a Git repository in Amazon Web Services CodeCommit or in any other Git repository. When you open a notebook instance, it opens in the directory that contains this repository. For more information, see Associating Git Repositories with Amazon SageMaker Notebook Instances.

  • :additional_code_repositories (Array<String>)

    An array of up to three Git repositories to associate with the notebook instance. These can be either the names of Git repositories stored as resources in your account, or the URL of Git repositories in Amazon Web Services CodeCommit or in any other Git repository. These repositories are cloned at the same level as the default repository of your notebook instance. For more information, see Associating Git Repositories with Amazon SageMaker Notebook Instances.

  • :root_access (String)

    Whether root access is enabled or disabled for users of the notebook instance. The default value is Enabled.

    Lifecycle configurations need root access to be able to set up a notebook instance. Because of this, lifecycle configurations associated with a notebook instance always run with root access even if you disable root access for users.

  • :platform_identifier (String)

    The platform identifier of the notebook instance runtime environment.

Returns:

See Also:



4592
4593
4594
4595
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 4592

def create_notebook_instance(params = {}, options = {})
  req = build_request(:create_notebook_instance, params)
  req.send_request(options)
end

#create_notebook_instance_lifecycle_config(params = {}) ⇒ Types::CreateNotebookInstanceLifecycleConfigOutput

Creates a lifecycle configuration that you can associate with a notebook instance. A lifecycle configuration is a collection of shell scripts that run when you create or start a notebook instance.

Each lifecycle configuration script has a limit of 16384 characters.

The value of the $PATH environment variable that is available to both scripts is /sbin:bin:/usr/sbin:/usr/bin.

View CloudWatch Logs for notebook instance lifecycle configurations in log group /aws/sagemaker/NotebookInstances in log stream [notebook-instance-name]/[LifecycleConfigHook].

Lifecycle configuration scripts cannot run for longer than 5 minutes. If a script runs for longer than 5 minutes, it fails and the notebook instance is not created or started.

For information about notebook instance lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance.

Examples:

Request syntax with placeholder values


resp = client.create_notebook_instance_lifecycle_config({
  notebook_instance_lifecycle_config_name: "NotebookInstanceLifecycleConfigName", # required
  on_create: [
    {
      content: "NotebookInstanceLifecycleConfigContent",
    },
  ],
  on_start: [
    {
      content: "NotebookInstanceLifecycleConfigContent",
    },
  ],
})

Response structure


resp.notebook_instance_lifecycle_config_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :notebook_instance_lifecycle_config_name (required, String)

    The name of the lifecycle configuration.

  • :on_create (Array<Types::NotebookInstanceLifecycleHook>)

    A shell script that runs only once, when you create a notebook instance. The shell script must be a base64-encoded string.

  • :on_start (Array<Types::NotebookInstanceLifecycleHook>)

    A shell script that runs every time you start a notebook instance, including when you create the notebook instance. The shell script must be a base64-encoded string.

Returns:

See Also:



4661
4662
4663
4664
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 4661

def create_notebook_instance_lifecycle_config(params = {}, options = {})
  req = build_request(:create_notebook_instance_lifecycle_config, params)
  req.send_request(options)
end

#create_pipeline(params = {}) ⇒ Types::CreatePipelineResponse

Creates a pipeline using a JSON pipeline definition.

Examples:

Request syntax with placeholder values


resp = client.create_pipeline({
  pipeline_name: "PipelineName", # required
  pipeline_display_name: "PipelineName",
  pipeline_definition: "PipelineDefinition", # required
  pipeline_description: "PipelineDescription",
  client_request_token: "IdempotencyToken", # required
  role_arn: "RoleArn", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.pipeline_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pipeline_name (required, String)

    The name of the pipeline.

  • :pipeline_display_name (String)

    The display name of the pipeline.

  • :pipeline_definition (required, String)

    The JSON pipeline definition of the pipeline.

  • :pipeline_description (String)

    A description of the pipeline.

  • :client_request_token (required, String)

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of the role used by the pipeline to access and create resources.

  • :tags (Array<Types::Tag>)

    A list of tags to apply to the created pipeline.

Returns:

See Also:



4724
4725
4726
4727
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 4724

def create_pipeline(params = {}, options = {})
  req = build_request(:create_pipeline, params)
  req.send_request(options)
end

#create_presigned_domain_url(params = {}) ⇒ Types::CreatePresignedDomainUrlResponse

Creates a URL for a specified UserProfile in a Domain. When accessed in a web browser, the user will be automatically signed in to Amazon SageMaker Studio, and granted access to all of the Apps and files associated with the Domain's Amazon Elastic File System (EFS) volume. This operation can only be called when the authentication mode equals IAM.

The IAM role or user used to call this API defines the permissions to access the app. Once the presigned URL is created, no additional permission is required to access this URL. IAM authorization policies for this API are also enforced for every HTTP request and WebSocket frame that attempts to connect to the app.

You can restrict access to this API and to the URL that it returns to a list of IP addresses, Amazon VPCs or Amazon VPC Endpoints that you specify. For more information, see Connect to SageMaker Studio Through an Interface VPC Endpoint .

The URL that you get from a call to CreatePresignedDomainUrl has a default timeout of 5 minutes. You can configure this value using ExpiresInSeconds. If you try to use the URL after the timeout limit expires, you are directed to the Amazon Web Services console sign-in page.

Examples:

Request syntax with placeholder values


resp = client.create_presigned_domain_url({
  domain_id: "DomainId", # required
  user_profile_name: "UserProfileName", # required
  session_expiration_duration_in_seconds: 1,
  expires_in_seconds: 1,
})

Response structure


resp.authorized_url #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The domain ID.

  • :user_profile_name (required, String)

    The name of the UserProfile to sign-in as.

  • :session_expiration_duration_in_seconds (Integer)

    The session expiration duration in seconds. This value defaults to 43200.

  • :expires_in_seconds (Integer)

    The number of seconds until the pre-signed URL expires. This value defaults to 300.

Returns:

See Also:



4794
4795
4796
4797
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 4794

def create_presigned_domain_url(params = {}, options = {})
  req = build_request(:create_presigned_domain_url, params)
  req.send_request(options)
end

#create_presigned_notebook_instance_url(params = {}) ⇒ Types::CreatePresignedNotebookInstanceUrlOutput

Returns a URL that you can use to connect to the Jupyter server from a notebook instance. In the Amazon SageMaker console, when you choose Open next to a notebook instance, Amazon SageMaker opens a new tab showing the Jupyter server home page from the notebook instance. The console uses this API to get the URL and show the page.

The IAM role or user used to call this API defines the permissions to access the notebook instance. Once the presigned URL is created, no additional permission is required to access this URL. IAM authorization policies for this API are also enforced for every HTTP request and WebSocket frame that attempts to connect to the notebook instance.

You can restrict access to this API and to the URL that it returns to a list of IP addresses that you specify. Use the NotIpAddress condition operator and the aws:SourceIP condition context key to specify the list of IP addresses that you want to have access to the notebook instance. For more information, see Limit Access to a Notebook Instance by IP Address.

The URL that you get from a call to CreatePresignedNotebookInstanceUrl is valid only for 5 minutes. If you try to use the URL after the 5-minute limit expires, you are directed to the Amazon Web Services console sign-in page.

Examples:

Request syntax with placeholder values


resp = client.create_presigned_notebook_instance_url({
  notebook_instance_name: "NotebookInstanceName", # required
  session_expiration_duration_in_seconds: 1,
})

Response structure


resp.authorized_url #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :notebook_instance_name (required, String)

    The name of the notebook instance.

  • :session_expiration_duration_in_seconds (Integer)

    The duration of the session, in seconds. The default is 12 hours.

Returns:

See Also:



4855
4856
4857
4858
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 4855

def create_presigned_notebook_instance_url(params = {}, options = {})
  req = build_request(:create_presigned_notebook_instance_url, params)
  req.send_request(options)
end

#create_processing_job(params = {}) ⇒ Types::CreateProcessingJobResponse

Creates a processing job.

Examples:

Request syntax with placeholder values


resp = client.create_processing_job({
  processing_inputs: [
    {
      input_name: "String", # required
      app_managed: false,
      s3_input: {
        s3_uri: "S3Uri", # required
        local_path: "ProcessingLocalPath",
        s3_data_type: "ManifestFile", # required, accepts ManifestFile, S3Prefix
        s3_input_mode: "Pipe", # accepts Pipe, File
        s3_data_distribution_type: "FullyReplicated", # accepts FullyReplicated, ShardedByS3Key
        s3_compression_type: "None", # accepts None, Gzip
      },
      dataset_definition: {
        athena_dataset_definition: {
          catalog: "AthenaCatalog", # required
          database: "AthenaDatabase", # required
          query_string: "AthenaQueryString", # required
          work_group: "AthenaWorkGroup",
          output_s3_uri: "S3Uri", # required
          kms_key_id: "KmsKeyId",
          output_format: "PARQUET", # required, accepts PARQUET, ORC, AVRO, JSON, TEXTFILE
          output_compression: "GZIP", # accepts GZIP, SNAPPY, ZLIB
        },
        redshift_dataset_definition: {
          cluster_id: "RedshiftClusterId", # required
          database: "RedshiftDatabase", # required
          db_user: "RedshiftUserName", # required
          query_string: "RedshiftQueryString", # required
          cluster_role_arn: "RoleArn", # required
          output_s3_uri: "S3Uri", # required
          kms_key_id: "KmsKeyId",
          output_format: "PARQUET", # required, accepts PARQUET, CSV
          output_compression: "None", # accepts None, GZIP, BZIP2, ZSTD, SNAPPY
        },
        local_path: "ProcessingLocalPath",
        data_distribution_type: "FullyReplicated", # accepts FullyReplicated, ShardedByS3Key
        input_mode: "Pipe", # accepts Pipe, File
      },
    },
  ],
  processing_output_config: {
    outputs: [ # required
      {
        output_name: "String", # required
        s3_output: {
          s3_uri: "S3Uri", # required
          local_path: "ProcessingLocalPath", # required
          s3_upload_mode: "Continuous", # required, accepts Continuous, EndOfJob
        },
        feature_store_output: {
          feature_group_name: "FeatureGroupName", # required
        },
        app_managed: false,
      },
    ],
    kms_key_id: "KmsKeyId",
  },
  processing_job_name: "ProcessingJobName", # required
  processing_resources: { # required
    cluster_config: { # required
      instance_count: 1, # required
      instance_type: "ml.t3.medium", # required, accepts ml.t3.medium, ml.t3.large, ml.t3.xlarge, ml.t3.2xlarge, ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.8xlarge, ml.r5.12xlarge, ml.r5.16xlarge, ml.r5.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge
      volume_size_in_gb: 1, # required
      volume_kms_key_id: "KmsKeyId",
    },
  },
  stopping_condition: {
    max_runtime_in_seconds: 1, # required
  },
  app_specification: { # required
    image_uri: "ImageUri", # required
    container_entrypoint: ["ContainerEntrypointString"],
    container_arguments: ["ContainerArgument"],
  },
  environment: {
    "ProcessingEnvironmentKey" => "ProcessingEnvironmentValue",
  },
  network_config: {
    enable_inter_container_traffic_encryption: false,
    enable_network_isolation: false,
    vpc_config: {
      security_group_ids: ["SecurityGroupId"], # required
      subnets: ["SubnetId"], # required
    },
  },
  role_arn: "RoleArn", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  experiment_config: {
    experiment_name: "ExperimentEntityName",
    trial_name: "ExperimentEntityName",
    trial_component_display_name: "ExperimentEntityName",
  },
})

Response structure


resp.processing_job_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :processing_inputs (Array<Types::ProcessingInput>)

    An array of inputs configuring the data to download into the processing container.

  • :processing_output_config (Types::ProcessingOutputConfig)

    Output configuration for the processing job.

  • :processing_job_name (required, String)

    The name of the processing job. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account.

  • :processing_resources (required, Types::ProcessingResources)

    Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. In distributed training, you specify more than one instance.

  • :stopping_condition (Types::ProcessingStoppingCondition)

    The time limit for how long the processing job is allowed to run.

  • :app_specification (required, Types::AppSpecification)

    Configures the processing job to run a specified Docker container image.

  • :environment (Hash<String,String>)

    The environment variables to set in the Docker container. Up to 100 key and values entries in the map are supported.

  • :network_config (Types::NetworkConfig)

    Networking options for a processing job, such as whether to allow inbound and outbound network calls to and from processing containers, and the VPC subnets and security groups to use for VPC-enabled processing jobs.

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf.

  • :tags (Array<Types::Tag>) — default: Optional

    An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

  • :experiment_config (Types::ExperimentConfig)

    Associates a SageMaker job as a trial component with an experiment and trial. Specified when you call the following APIs:

    • CreateProcessingJob

    • CreateTrainingJob

    • CreateTransformJob

Returns:

See Also:



5032
5033
5034
5035
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 5032

def create_processing_job(params = {}, options = {})
  req = build_request(:create_processing_job, params)
  req.send_request(options)
end

#create_project(params = {}) ⇒ Types::CreateProjectOutput

Creates a machine learning (ML) project that can contain one or more templates that set up an ML pipeline from training to deploying an approved model.

Examples:

Request syntax with placeholder values


resp = client.create_project({
  project_name: "ProjectEntityName", # required
  project_description: "EntityDescription",
  service_catalog_provisioning_details: { # required
    product_id: "ServiceCatalogEntityId", # required
    provisioning_artifact_id: "ServiceCatalogEntityId",
    path_id: "ServiceCatalogEntityId",
    provisioning_parameters: [
      {
        key: "ProvisioningParameterKey",
        value: "ProvisioningParameterValue",
      },
    ],
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.project_arn #=> String
resp.project_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :project_name (required, String)

    The name of the project.

  • :project_description (String)

    A description for the project.

  • :service_catalog_provisioning_details (required, Types::ServiceCatalogProvisioningDetails)

    The product ID and provisioning artifact ID to provision a service catalog. The provisioning artifact ID will default to the latest provisioning artifact ID of the product, if you don't provide the provisioning artifact ID. For more information, see What is Amazon Web Services Service Catalog.

  • :tags (Array<Types::Tag>)

    An array of key-value pairs that you want to use to organize and track your Amazon Web Services resource costs. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide.

Returns:

See Also:



5106
5107
5108
5109
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 5106

def create_project(params = {}, options = {})
  req = build_request(:create_project, params)
  req.send_request(options)
end

#create_studio_lifecycle_config(params = {}) ⇒ Types::CreateStudioLifecycleConfigResponse

Creates a new Studio Lifecycle Configuration.

Examples:

Request syntax with placeholder values


resp = client.create_studio_lifecycle_config({
  studio_lifecycle_config_name: "StudioLifecycleConfigName", # required
  studio_lifecycle_config_content: "StudioLifecycleConfigContent", # required
  studio_lifecycle_config_app_type: "JupyterServer", # required, accepts JupyterServer, KernelGateway
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.studio_lifecycle_config_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :studio_lifecycle_config_name (required, String)

    The name of the Studio Lifecycle Configuration to create.

  • :studio_lifecycle_config_content (required, String)

    The content of your Studio Lifecycle Configuration script. This content must be base64 encoded.

  • :studio_lifecycle_config_app_type (required, String)

    The App type that the Lifecycle Configuration is attached to.

  • :tags (Array<Types::Tag>)

    Tags to be associated with the Lifecycle Configuration. Each tag consists of a key and an optional value. Tag keys must be unique per resource. Tags are searchable using the Search API.

Returns:

See Also:



5154
5155
5156
5157
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 5154

def create_studio_lifecycle_config(params = {}, options = {})
  req = build_request(:create_studio_lifecycle_config, params)
  req.send_request(options)
end

#create_training_job(params = {}) ⇒ Types::CreateTrainingJobResponse

Starts a model training job. After training completes, Amazon SageMaker saves the resulting model artifacts to an Amazon S3 location that you specify.

If you choose to host your model using Amazon SageMaker hosting services, you can use the resulting model artifacts as part of the model. You can also use the artifacts in a machine learning service other than Amazon SageMaker, provided that you know how to use them for inference.

In the request body, you provide the following:

  • AlgorithmSpecification - Identifies the training algorithm to use.

  • HyperParameters - Specify these algorithm-specific parameters to enable the estimation of model parameters during training. Hyperparameters can be tuned to optimize this learning process. For a list of hyperparameters for each training algorithm provided by Amazon SageMaker, see Algorithms.

  • InputDataConfig - Describes the training dataset and the Amazon S3, EFS, or FSx location where it is stored.

  • OutputDataConfig - Identifies the Amazon S3 bucket where you want Amazon SageMaker to save the results of model training.

  • ResourceConfig - Identifies the resources, ML compute instances, and ML storage volumes to deploy for model training. In distributed training, you specify more than one instance.

  • EnableManagedSpotTraining - Optimize the cost of training machine learning models by up to 80% by using Amazon EC2 Spot instances. For more information, see Managed Spot Training.

  • RoleArn - The Amazon Resource Name (ARN) that Amazon SageMaker assumes to perform tasks on your behalf during model training. You must grant this role the necessary permissions so that Amazon SageMaker can successfully complete model training.

  • StoppingCondition - To help cap training costs, use MaxRuntimeInSeconds to set a time limit for training. Use MaxWaitTimeInSeconds to specify how long a managed spot training job has to complete.

  • Environment - The environment variables to set in the Docker container.

  • RetryStrategy - The number of times to retry the job when the job fails due to an InternalServerError.

For more information about Amazon SageMaker, see How It Works.

Examples:

Request syntax with placeholder values


resp = client.create_training_job({
  training_job_name: "TrainingJobName", # required
  hyper_parameters: {
    "HyperParameterKey" => "HyperParameterValue",
  },
  algorithm_specification: { # required
    training_image: "AlgorithmImage",
    algorithm_name: "ArnOrName",
    training_input_mode: "Pipe", # required, accepts Pipe, File, FastFile
    metric_definitions: [
      {
        name: "MetricName", # required
        regex: "MetricRegex", # required
      },
    ],
    enable_sage_maker_metrics_time_series: false,
  },
  role_arn: "RoleArn", # required
  input_data_config: [
    {
      channel_name: "ChannelName", # required
      data_source: { # required
        s3_data_source: {
          s3_data_type: "ManifestFile", # required, accepts ManifestFile, S3Prefix, AugmentedManifestFile
          s3_uri: "S3Uri", # required
          s3_data_distribution_type: "FullyReplicated", # accepts FullyReplicated, ShardedByS3Key
          attribute_names: ["AttributeName"],
        },
        file_system_data_source: {
          file_system_id: "FileSystemId", # required
          file_system_access_mode: "rw", # required, accepts rw, ro
          file_system_type: "EFS", # required, accepts EFS, FSxLustre
          directory_path: "DirectoryPath", # required
        },
      },
      content_type: "ContentType",
      compression_type: "None", # accepts None, Gzip
      record_wrapper_type: "None", # accepts None, RecordIO
      input_mode: "Pipe", # accepts Pipe, File, FastFile
      shuffle_config: {
        seed: 1, # required
      },
    },
  ],
  output_data_config: { # required
    kms_key_id: "KmsKeyId",
    s3_output_path: "S3Uri", # required
  },
  resource_config: { # required
    instance_type: "ml.m4.xlarge", # required, accepts ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.p3dn.24xlarge, ml.p4d.24xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.c5n.xlarge, ml.c5n.2xlarge, ml.c5n.4xlarge, ml.c5n.9xlarge, ml.c5n.18xlarge
    instance_count: 1, # required
    volume_size_in_gb: 1, # required
    volume_kms_key_id: "KmsKeyId",
  },
  vpc_config: {
    security_group_ids: ["SecurityGroupId"], # required
    subnets: ["SubnetId"], # required
  },
  stopping_condition: { # required
    max_runtime_in_seconds: 1,
    max_wait_time_in_seconds: 1,
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  enable_network_isolation: false,
  enable_inter_container_traffic_encryption: false,
  enable_managed_spot_training: false,
  checkpoint_config: {
    s3_uri: "S3Uri", # required
    local_path: "DirectoryPath",
  },
  debug_hook_config: {
    local_path: "DirectoryPath",
    s3_output_path: "S3Uri", # required
    hook_parameters: {
      "ConfigKey" => "ConfigValue",
    },
    collection_configurations: [
      {
        collection_name: "CollectionName",
        collection_parameters: {
          "ConfigKey" => "ConfigValue",
        },
      },
    ],
  },
  debug_rule_configurations: [
    {
      rule_configuration_name: "RuleConfigurationName", # required
      local_path: "DirectoryPath",
      s3_output_path: "S3Uri",
      rule_evaluator_image: "AlgorithmImage", # required
      instance_type: "ml.t3.medium", # accepts ml.t3.medium, ml.t3.large, ml.t3.xlarge, ml.t3.2xlarge, ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.8xlarge, ml.r5.12xlarge, ml.r5.16xlarge, ml.r5.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge
      volume_size_in_gb: 1,
      rule_parameters: {
        "ConfigKey" => "ConfigValue",
      },
    },
  ],
  tensor_board_output_config: {
    local_path: "DirectoryPath",
    s3_output_path: "S3Uri", # required
  },
  experiment_config: {
    experiment_name: "ExperimentEntityName",
    trial_name: "ExperimentEntityName",
    trial_component_display_name: "ExperimentEntityName",
  },
  profiler_config: {
    s3_output_path: "S3Uri", # required
    profiling_interval_in_milliseconds: 1,
    profiling_parameters: {
      "ConfigKey" => "ConfigValue",
    },
  },
  profiler_rule_configurations: [
    {
      rule_configuration_name: "RuleConfigurationName", # required
      local_path: "DirectoryPath",
      s3_output_path: "S3Uri",
      rule_evaluator_image: "AlgorithmImage", # required
      instance_type: "ml.t3.medium", # accepts ml.t3.medium, ml.t3.large, ml.t3.xlarge, ml.t3.2xlarge, ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.8xlarge, ml.r5.12xlarge, ml.r5.16xlarge, ml.r5.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge
      volume_size_in_gb: 1,
      rule_parameters: {
        "ConfigKey" => "ConfigValue",
      },
    },
  ],
  environment: {
    "TrainingEnvironmentKey" => "TrainingEnvironmentValue",
  },
  retry_strategy: {
    maximum_retry_attempts: 1, # required
  },
})

Response structure


resp.training_job_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :training_job_name (required, String)

    The name of the training job. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account.

  • :hyper_parameters (Hash<String,String>)

    Algorithm-specific parameters that influence the quality of the model. You set hyperparameters before you start the learning process. For a list of hyperparameters for each training algorithm provided by Amazon SageMaker, see Algorithms.

    You can specify a maximum of 100 hyperparameters. Each hyperparameter is a key-value pair. Each key and value is limited to 256 characters, as specified by the Length Constraint.

  • :algorithm_specification (required, Types::AlgorithmSpecification)

    The registry path of the Docker image that contains the training algorithm and algorithm-specific metadata, including the input mode. For more information about algorithms provided by Amazon SageMaker, see Algorithms. For information about providing your own algorithms, see Using Your Own Algorithms with Amazon SageMaker.

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf.

    During model training, Amazon SageMaker needs your permission to read input data from an S3 bucket, download a Docker image that contains training code, write model artifacts to an S3 bucket, write logs to Amazon CloudWatch Logs, and publish metrics to Amazon CloudWatch. You grant permissions for all of these tasks to an IAM role. For more information, see Amazon SageMaker Roles.

    To be able to pass this role to Amazon SageMaker, the caller of this API must have the iam:PassRole permission.

  • :input_data_config (Array<Types::Channel>)

    An array of Channel objects. Each channel is a named input source. InputDataConfig describes the input data and its location.

    Algorithms can accept input data from one or more channels. For example, an algorithm might have two channels of input data, training_data and validation_data. The configuration for each channel provides the S3, EFS, or FSx location where the input data is stored. It also provides information about the stored data: the MIME type, compression method, and whether the data is wrapped in RecordIO format.

    Depending on the input mode that the algorithm supports, Amazon SageMaker either copies input data files from an S3 bucket to a local directory in the Docker container, or makes it available as input streams. For example, if you specify an EFS location, input data files will be made available as input streams. They do not need to be downloaded.

  • :output_data_config (required, Types::OutputDataConfig)

    Specifies the path to the S3 location where you want to store model artifacts. Amazon SageMaker creates subfolders for the artifacts.

  • :resource_config (required, Types::ResourceConfig)

    The resources, including the ML compute instances and ML storage volumes, to use for model training.

    ML storage volumes store model artifacts and incremental states. Training algorithms might also use ML storage volumes for scratch space. If you want Amazon SageMaker to use the ML storage volume to store the training data, choose File as the TrainingInputMode in the algorithm specification. For distributed training algorithms, specify an instance count greater than 1.

  • :vpc_config (Types::VpcConfig)

    A VpcConfig object that specifies the VPC that you want your training job to connect to. Control access to and from your training container by configuring the VPC. For more information, see Protect Training Jobs by Using an Amazon Virtual Private Cloud.

  • :stopping_condition (required, Types::StoppingCondition)

    Specifies a limit to how long a model training job can run. It also specifies how long a managed Spot training job has to complete. When the job reaches the time limit, Amazon SageMaker ends the training job. Use this API to cap model training costs.

    To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal, which delays job termination for 120 seconds. Algorithms can use this 120-second window to save the model artifacts, so the results of training are not lost.

  • :tags (Array<Types::Tag>)

    An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

  • :enable_network_isolation (Boolean)

    Isolates the training container. No inbound or outbound network calls can be made, except for calls between peers within a training cluster for distributed training. If you enable network isolation for training jobs that are configured to use a VPC, Amazon SageMaker downloads and uploads customer data and model artifacts through the specified VPC, but the training container does not have network access.

  • :enable_inter_container_traffic_encryption (Boolean)

    To encrypt all communications between ML compute instances in distributed training, choose True. Encryption provides greater security for distributed training, but training might take longer. How long it takes depends on the amount of communication between compute instances, especially if you use a deep learning algorithm in distributed training. For more information, see Protect Communications Between ML Compute Instances in a Distributed Training Job.

  • :enable_managed_spot_training (Boolean)

    To train models using managed spot training, choose True. Managed spot training provides a fully managed and scalable infrastructure for training machine learning models. this option is useful when training jobs can be interrupted and when there is flexibility when the training job is run.

    The complete and intermediate results of jobs are stored in an Amazon S3 bucket, and can be used as a starting point to train models incrementally. Amazon SageMaker provides metrics and logs in CloudWatch. They can be used to see when managed spot training jobs are running, interrupted, resumed, or completed.

  • :checkpoint_config (Types::CheckpointConfig)

    Contains information about the output location for managed spot training checkpoint data.

  • :debug_hook_config (Types::DebugHookConfig)

    Configuration information for the Debugger hook parameters, metric and tensor collections, and storage paths. To learn more about how to configure the DebugHookConfig parameter, see Use the SageMaker and Debugger Configuration API Operations to Create, Update, and Debug Your Training Job.

  • :debug_rule_configurations (Array<Types::DebugRuleConfiguration>)

    Configuration information for Debugger rules for debugging output tensors.

  • :tensor_board_output_config (Types::TensorBoardOutputConfig)

    Configuration of storage locations for the Debugger TensorBoard output data.

  • :experiment_config (Types::ExperimentConfig)

    Associates a SageMaker job as a trial component with an experiment and trial. Specified when you call the following APIs:

    • CreateProcessingJob

    • CreateTrainingJob

    • CreateTransformJob

  • :profiler_config (Types::ProfilerConfig)

    Configuration information for Debugger system monitoring, framework profiling, and storage paths.

  • :profiler_rule_configurations (Array<Types::ProfilerRuleConfiguration>)

    Configuration information for Debugger rules for profiling system and framework metrics.

  • :environment (Hash<String,String>)

    The environment variables to set in the Docker container.

  • :retry_strategy (Types::RetryStrategy)

    The number of times to retry the job when the job fails due to an InternalServerError.

Returns:

See Also:



5569
5570
5571
5572
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 5569

def create_training_job(params = {}, options = {})
  req = build_request(:create_training_job, params)
  req.send_request(options)
end

#create_transform_job(params = {}) ⇒ Types::CreateTransformJobResponse

Starts a transform job. A transform job uses a trained model to get inferences on a dataset and saves these results to an Amazon S3 location that you specify.

To perform batch transformations, you create a transform job and use the data that you have readily available.

In the request body, you provide the following:

  • TransformJobName - Identifies the transform job. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account.

  • ModelName - Identifies the model to use. ModelName must be the name of an existing Amazon SageMaker model in the same Amazon Web Services Region and Amazon Web Services account. For information on creating a model, see CreateModel.

  • TransformInput - Describes the dataset to be transformed and the Amazon S3 location where it is stored.

  • TransformOutput - Identifies the Amazon S3 location where you want Amazon SageMaker to save the results from the transform job.

  • TransformResources - Identifies the ML compute instances for the transform job.

For more information about how batch transformation works, see Batch Transform.

Examples:

Request syntax with placeholder values


resp = client.create_transform_job({
  transform_job_name: "TransformJobName", # required
  model_name: "ModelName", # required
  max_concurrent_transforms: 1,
  model_client_config: {
    invocations_timeout_in_seconds: 1,
    invocations_max_retries: 1,
  },
  max_payload_in_mb: 1,
  batch_strategy: "MultiRecord", # accepts MultiRecord, SingleRecord
  environment: {
    "TransformEnvironmentKey" => "TransformEnvironmentValue",
  },
  transform_input: { # required
    data_source: { # required
      s3_data_source: { # required
        s3_data_type: "ManifestFile", # required, accepts ManifestFile, S3Prefix, AugmentedManifestFile
        s3_uri: "S3Uri", # required
      },
    },
    content_type: "ContentType",
    compression_type: "None", # accepts None, Gzip
    split_type: "None", # accepts None, Line, RecordIO, TFRecord
  },
  transform_output: { # required
    s3_output_path: "S3Uri", # required
    accept: "Accept",
    assemble_with: "None", # accepts None, Line
    kms_key_id: "KmsKeyId",
  },
  transform_resources: { # required
    instance_type: "ml.m4.xlarge", # required, accepts ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge
    instance_count: 1, # required
    volume_kms_key_id: "KmsKeyId",
  },
  data_processing: {
    input_filter: "JsonPath",
    output_filter: "JsonPath",
    join_source: "Input", # accepts Input, None
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  experiment_config: {
    experiment_name: "ExperimentEntityName",
    trial_name: "ExperimentEntityName",
    trial_component_display_name: "ExperimentEntityName",
  },
})

Response structure


resp.transform_job_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :transform_job_name (required, String)

    The name of the transform job. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account.

  • :model_name (required, String)

    The name of the model that you want to use for the transform job. ModelName must be the name of an existing Amazon SageMaker model within an Amazon Web Services Region in an Amazon Web Services account.

  • :max_concurrent_transforms (Integer)

    The maximum number of parallel requests that can be sent to each instance in a transform job. If MaxConcurrentTransforms is set to 0 or left unset, Amazon SageMaker checks the optional execution-parameters to determine the settings for your chosen algorithm. If the execution-parameters endpoint is not enabled, the default value is 1. For more information on execution-parameters, see How Containers Serve Requests. For built-in algorithms, you don't need to set a value for MaxConcurrentTransforms.

  • :model_client_config (Types::ModelClientConfig)

    Configures the timeout and maximum number of retries for processing a transform job invocation.

  • :max_payload_in_mb (Integer)

    The maximum allowed size of the payload, in MB. A payload is the data portion of a record (without metadata). The value in MaxPayloadInMB must be greater than, or equal to, the size of a single record. To estimate the size of a record in MB, divide the size of your dataset by the number of records. To ensure that the records fit within the maximum payload size, we recommend using a slightly larger value. The default value is 6 MB.

    For cases where the payload might be arbitrarily large and is transmitted using HTTP chunked encoding, set the value to 0. This feature works only in supported algorithms. Currently, Amazon SageMaker built-in algorithms do not support HTTP chunked encoding.

  • :batch_strategy (String)

    Specifies the number of records to include in a mini-batch for an HTTP inference request. A record ** is a single unit of input data that inference can be made on. For example, a single line in a CSV file is a record.

    To enable the batch strategy, you must set the SplitType property to Line, RecordIO, or TFRecord.

    To use only one record when making an HTTP invocation request to a container, set BatchStrategy to SingleRecord and SplitType to Line.

    To fit as many records in a mini-batch as can fit within the MaxPayloadInMB limit, set BatchStrategy to MultiRecord and SplitType to Line.

  • :environment (Hash<String,String>)

    The environment variables to set in the Docker container. We support up to 16 key and values entries in the map.

  • :transform_input (required, Types::TransformInput)

    Describes the input source and the way the transform job consumes it.

  • :transform_output (required, Types::TransformOutput)

    Describes the results of the transform job.

  • :transform_resources (required, Types::TransformResources)

    Describes the resources, including ML instance types and ML instance count, to use for the transform job.

  • :data_processing (Types::DataProcessing)

    The data structure used to specify the data to be used for inference in a batch transform job and to associate the data that is relevant to the prediction results in the output. The input filter provided allows you to exclude input data that is not needed for inference in a batch transform job. The output filter provided allows you to include input data relevant to interpreting the predictions in the output from the job. For more information, see Associate Prediction Results with their Corresponding Input Records.

  • :tags (Array<Types::Tag>) — default: Optional

    An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

  • :experiment_config (Types::ExperimentConfig)

    Associates a SageMaker job as a trial component with an experiment and trial. Specified when you call the following APIs:

    • CreateProcessingJob

    • CreateTrainingJob

    • CreateTransformJob

Returns:

See Also:



5781
5782
5783
5784
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 5781

def create_transform_job(params = {}, options = {})
  req = build_request(:create_transform_job, params)
  req.send_request(options)
end

#create_trial(params = {}) ⇒ Types::CreateTrialResponse

Creates an SageMaker trial. A trial is a set of steps called trial components that produce a machine learning model. A trial is part of a single SageMaker experiment.

When you use SageMaker Studio or the SageMaker Python SDK, all experiments, trials, and trial components are automatically tracked, logged, and indexed. When you use the Amazon Web Services SDK for Python (Boto), you must use the logging APIs provided by the SDK.

You can add tags to a trial and then use the Search API to search for the tags.

To get a list of all your trials, call the ListTrials API. To view a trial's properties, call the DescribeTrial API. To create a trial component, call the CreateTrialComponent API.

Examples:

Request syntax with placeholder values


resp = client.create_trial({
  trial_name: "ExperimentEntityName", # required
  display_name: "ExperimentEntityName",
  experiment_name: "ExperimentEntityName", # required
  metadata_properties: {
    commit_id: "MetadataPropertyValue",
    repository: "MetadataPropertyValue",
    generated_by: "MetadataPropertyValue",
    project_id: "MetadataPropertyValue",
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.trial_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :trial_name (required, String)

    The name of the trial. The name must be unique in your Amazon Web Services account and is not case-sensitive.

  • :display_name (String)

    The name of the trial as displayed. The name doesn't need to be unique. If DisplayName isn't specified, TrialName is displayed.

  • :experiment_name (required, String)

    The name of the experiment to associate the trial with.

  • :metadata_properties (Types::MetadataProperties)

    Metadata properties of the tracking entity, trial, or trial component.

  • :tags (Array<Types::Tag>)

    A list of tags to associate with the trial. You can use Search API to search on the tags.

Returns:

See Also:



5852
5853
5854
5855
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 5852

def create_trial(params = {}, options = {})
  req = build_request(:create_trial, params)
  req.send_request(options)
end

#create_trial_component(params = {}) ⇒ Types::CreateTrialComponentResponse

Creates a trial component, which is a stage of a machine learning trial. A trial is composed of one or more trial components. A trial component can be used in multiple trials.

Trial components include pre-processing jobs, training jobs, and batch transform jobs.

When you use SageMaker Studio or the SageMaker Python SDK, all experiments, trials, and trial components are automatically tracked, logged, and indexed. When you use the Amazon Web Services SDK for Python (Boto), you must use the logging APIs provided by the SDK.

You can add tags to a trial component and then use the Search API to search for the tags.

Examples:

Request syntax with placeholder values


resp = client.create_trial_component({
  trial_component_name: "ExperimentEntityName", # required
  display_name: "ExperimentEntityName",
  status: {
    primary_status: "InProgress", # accepts InProgress, Completed, Failed, Stopping, Stopped
    message: "TrialComponentStatusMessage",
  },
  start_time: Time.now,
  end_time: Time.now,
  parameters: {
    "TrialComponentKey256" => {
      string_value: "StringParameterValue",
      number_value: 1.0,
    },
  },
  input_artifacts: {
    "TrialComponentKey64" => {
      media_type: "MediaType",
      value: "TrialComponentArtifactValue", # required
    },
  },
  output_artifacts: {
    "TrialComponentKey64" => {
      media_type: "MediaType",
      value: "TrialComponentArtifactValue", # required
    },
  },
  metadata_properties: {
    commit_id: "MetadataPropertyValue",
    repository: "MetadataPropertyValue",
    generated_by: "MetadataPropertyValue",
    project_id: "MetadataPropertyValue",
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.trial_component_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :trial_component_name (required, String)

    The name of the component. The name must be unique in your Amazon Web Services account and is not case-sensitive.

  • :display_name (String)

    The name of the component as displayed. The name doesn't need to be unique. If DisplayName isn't specified, TrialComponentName is displayed.

  • :status (Types::TrialComponentStatus)

    The status of the component. States include:

    • InProgress

    • Completed

    • Failed

  • :start_time (Time, DateTime, Date, Integer, String)

    When the component started.

  • :end_time (Time, DateTime, Date, Integer, String)

    When the component ended.

  • :parameters (Hash<String,Types::TrialComponentParameterValue>)

    The hyperparameters for the component.

  • :input_artifacts (Hash<String,Types::TrialComponentArtifact>)

    The input artifacts for the component. Examples of input artifacts are datasets, algorithms, hyperparameters, source code, and instance types.

  • :output_artifacts (Hash<String,Types::TrialComponentArtifact>)

    The output artifacts for the component. Examples of output artifacts are metrics, snapshots, logs, and images.

  • :metadata_properties (Types::MetadataProperties)

    Metadata properties of the tracking entity, trial, or trial component.

  • :tags (Array<Types::Tag>)

    A list of tags to associate with the component. You can use Search API to search on the tags.

Returns:

See Also:



5970
5971
5972
5973
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 5970

def create_trial_component(params = {}, options = {})
  req = build_request(:create_trial_component, params)
  req.send_request(options)
end

#create_user_profile(params = {}) ⇒ Types::CreateUserProfileResponse

Creates a user profile. A user profile represents a single user within a domain, and is the main way to reference a "person" for the purposes of sharing, reporting, and other user-oriented features. This entity is created when a user onboards to Amazon SageMaker Studio. If an administrator invites a person by email or imports them from SSO, a user profile is automatically created. A user profile is the primary holder of settings for an individual user and has a reference to the user's private Amazon Elastic File System (EFS) home directory.

Examples:

Request syntax with placeholder values


resp = client.({
  domain_id: "DomainId", # required
  user_profile_name: "UserProfileName", # required
  single_sign_on_user_identifier: "SingleSignOnUserIdentifier",
  single_sign_on_user_value: "String256",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  user_settings: {
    execution_role: "RoleArn",
    security_groups: ["SecurityGroupId"],
    sharing_settings: {
      notebook_output_option: "Allowed", # accepts Allowed, Disabled
      s3_output_path: "S3Uri",
      s3_kms_key_id: "KmsKeyId",
    },
    jupyter_server_app_settings: {
      default_resource_spec: {
        sage_maker_image_arn: "ImageArn",
        sage_maker_image_version_arn: "ImageVersionArn",
        instance_type: "system", # accepts system, ml.t3.micro, ml.t3.small, ml.t3.medium, ml.t3.large, ml.t3.xlarge, ml.t3.2xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.8xlarge, ml.m5.12xlarge, ml.m5.16xlarge, ml.m5.24xlarge, ml.m5d.large, ml.m5d.xlarge, ml.m5d.2xlarge, ml.m5d.4xlarge, ml.m5d.8xlarge, ml.m5d.12xlarge, ml.m5d.16xlarge, ml.m5d.24xlarge, ml.c5.large, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.12xlarge, ml.c5.18xlarge, ml.c5.24xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.p3dn.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.8xlarge, ml.r5.12xlarge, ml.r5.16xlarge, ml.r5.24xlarge
        lifecycle_config_arn: "StudioLifecycleConfigArn",
      },
      lifecycle_config_arns: ["StudioLifecycleConfigArn"],
    },
    kernel_gateway_app_settings: {
      default_resource_spec: {
        sage_maker_image_arn: "ImageArn",
        sage_maker_image_version_arn: "ImageVersionArn",
        instance_type: "system", # accepts system, ml.t3.micro, ml.t3.small, ml.t3.medium, ml.t3.large, ml.t3.xlarge, ml.t3.2xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.8xlarge, ml.m5.12xlarge, ml.m5.16xlarge, ml.m5.24xlarge, ml.m5d.large, ml.m5d.xlarge, ml.m5d.2xlarge, ml.m5d.4xlarge, ml.m5d.8xlarge, ml.m5d.12xlarge, ml.m5d.16xlarge, ml.m5d.24xlarge, ml.c5.large, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.12xlarge, ml.c5.18xlarge, ml.c5.24xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.p3dn.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.8xlarge, ml.r5.12xlarge, ml.r5.16xlarge, ml.r5.24xlarge
        lifecycle_config_arn: "StudioLifecycleConfigArn",
      },
      custom_images: [
        {
          image_name: "ImageName", # required
          image_version_number: 1,
          app_image_config_name: "AppImageConfigName", # required
        },
      ],
      lifecycle_config_arns: ["StudioLifecycleConfigArn"],
    },
    tensor_board_app_settings: {
      default_resource_spec: {
        sage_maker_image_arn: "ImageArn",
        sage_maker_image_version_arn: "ImageVersionArn",
        instance_type: "system", # accepts system, ml.t3.micro, ml.t3.small, ml.t3.medium, ml.t3.large, ml.t3.xlarge, ml.t3.2xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.8xlarge, ml.m5.12xlarge, ml.m5.16xlarge, ml.m5.24xlarge, ml.m5d.large, ml.m5d.xlarge, ml.m5d.2xlarge, ml.m5d.4xlarge, ml.m5d.8xlarge, ml.m5d.12xlarge, ml.m5d.16xlarge, ml.m5d.24xlarge, ml.c5.large, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.12xlarge, ml.c5.18xlarge, ml.c5.24xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.p3dn.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.8xlarge, ml.r5.12xlarge, ml.r5.16xlarge, ml.r5.24xlarge
        lifecycle_config_arn: "StudioLifecycleConfigArn",
      },
    },
  },
})

Response structure


resp. #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The ID of the associated Domain.

  • :user_profile_name (required, String)

    A name for the UserProfile. This value is not case sensitive.

  • :single_sign_on_user_identifier (String)

    A specifier for the type of value specified in SingleSignOnUserValue. Currently, the only supported value is "UserName". If the Domain's AuthMode is SSO, this field is required. If the Domain's AuthMode is not SSO, this field cannot be specified.

  • :single_sign_on_user_value (String)

    The username of the associated Amazon Web Services Single Sign-On User for this UserProfile. If the Domain's AuthMode is SSO, this field is required, and must match a valid username of a user in your directory. If the Domain's AuthMode is not SSO, this field cannot be specified.

  • :tags (Array<Types::Tag>)

    Each tag consists of a key and an optional value. Tag keys must be unique per resource.

    Tags that you specify for the User Profile are also added to all Apps that the User Profile launches.

  • :user_settings (Types::UserSettings)

    A collection of settings.

Returns:

See Also:



6081
6082
6083
6084
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6081

def (params = {}, options = {})
  req = build_request(:create_user_profile, params)
  req.send_request(options)
end

#create_workforce(params = {}) ⇒ Types::CreateWorkforceResponse

Use this operation to create a workforce. This operation will return an error if a workforce already exists in the Amazon Web Services Region that you specify. You can only create one workforce in each Amazon Web Services Region per Amazon Web Services account.

If you want to create a new workforce in an Amazon Web Services Region where a workforce already exists, use the API operation to delete the existing workforce and then use CreateWorkforce to create a new workforce.

To create a private workforce using Amazon Cognito, you must specify a Cognito user pool in CognitoConfig. You can also create an Amazon Cognito workforce using the Amazon SageMaker console. For more information, see Create a Private Workforce (Amazon Cognito).

To create a private workforce using your own OIDC Identity Provider (IdP), specify your IdP configuration in OidcConfig. Your OIDC IdP must support groups because groups are used by Ground Truth and Amazon A2I to create work teams. For more information, see Create a Private Workforce (OIDC IdP).

Examples:

Request syntax with placeholder values


resp = client.create_workforce({
  cognito_config: {
    user_pool: "CognitoUserPool", # required
    client_id: "ClientId", # required
  },
  oidc_config: {
    client_id: "ClientId", # required
    client_secret: "ClientSecret", # required
    issuer: "OidcEndpoint", # required
    authorization_endpoint: "OidcEndpoint", # required
    token_endpoint: "OidcEndpoint", # required
    user_info_endpoint: "OidcEndpoint", # required
    logout_endpoint: "OidcEndpoint", # required
    jwks_uri: "OidcEndpoint", # required
  },
  source_ip_config: {
    cidrs: ["Cidr"], # required
  },
  workforce_name: "WorkforceName", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.workforce_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cognito_config (Types::CognitoConfig)

    Use this parameter to configure an Amazon Cognito private workforce. A single Cognito workforce is created using and corresponds to a single Amazon Cognito user pool.

    Do not use OidcConfig if you specify values for CognitoConfig.

  • :oidc_config (Types::OidcConfig)

    Use this parameter to configure a private workforce using your own OIDC Identity Provider.

    Do not use CognitoConfig if you specify values for OidcConfig.

  • :source_ip_config (Types::SourceIpConfig)

    A list of IP address ranges (CIDRs). Used to create an allow list of IP addresses for a private workforce. Workers will only be able to login to their worker portal from an IP address within this range. By default, a workforce isn't restricted to specific IP addresses.

  • :workforce_name (required, String)

    The name of the private workforce.

  • :tags (Array<Types::Tag>)

    An array of key-value pairs that contain metadata to help you categorize and organize our workforce. Each tag consists of a key and a value, both of which you define.

Returns:

See Also:



6188
6189
6190
6191
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6188

def create_workforce(params = {}, options = {})
  req = build_request(:create_workforce, params)
  req.send_request(options)
end

#create_workteam(params = {}) ⇒ Types::CreateWorkteamResponse

Creates a new work team for labeling your data. A work team is defined by one or more Amazon Cognito user pools. You must first create the user pools before you can create a work team.

You cannot create more than 25 work teams in an account and region.

Examples:

Request syntax with placeholder values


resp = client.create_workteam({
  workteam_name: "WorkteamName", # required
  workforce_name: "WorkforceName",
  member_definitions: [ # required
    {
      cognito_member_definition: {
        user_pool: "CognitoUserPool", # required
        user_group: "CognitoUserGroup", # required
        client_id: "ClientId", # required
      },
      oidc_member_definition: {
        groups: ["Group"], # required
      },
    },
  ],
  description: "String200", # required
  notification_configuration: {
    notification_topic_arn: "NotificationTopicArn",
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.workteam_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :workteam_name (required, String)

    The name of the work team. Use this name to identify the work team.

  • :workforce_name (String)

    The name of the workforce.

  • :member_definitions (required, Array<Types::MemberDefinition>)

    A list of MemberDefinition objects that contains objects that identify the workers that make up the work team.

    Workforces can be created using Amazon Cognito or your own OIDC Identity Provider (IdP). For private workforces created using Amazon Cognito use CognitoMemberDefinition. For workforces created using your own OIDC identity provider (IdP) use OidcMemberDefinition. Do not provide input for both of these parameters in a single request.

    For workforces created using Amazon Cognito, private work teams correspond to Amazon Cognito user groups within the user pool used to create a workforce. All of the CognitoMemberDefinition objects that make up the member definition must have the same ClientId and UserPool values. To add a Amazon Cognito user group to an existing worker pool, see Adding groups to a User Pool. For more information about user pools, see Amazon Cognito User Pools.

    For workforces created using your own OIDC IdP, specify the user groups that you want to include in your private work team in OidcMemberDefinition by listing those groups in Groups.

  • :description (required, String)

    A description of the work team.

  • :notification_configuration (Types::NotificationConfiguration)

    Configures notification of workers regarding available or expiring work items.

  • :tags (Array<Types::Tag>)

    An array of key-value pairs.

    For more information, see Resource Tag and Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

Returns:

See Also:



6291
6292
6293
6294
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6291

def create_workteam(params = {}, options = {})
  req = build_request(:create_workteam, params)
  req.send_request(options)
end

#delete_action(params = {}) ⇒ Types::DeleteActionResponse

Deletes an action.

Examples:

Request syntax with placeholder values


resp = client.delete_action({
  action_name: "ExperimentEntityName", # required
})

Response structure


resp.action_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :action_name (required, String)

    The name of the action to delete.

Returns:

See Also:



6319
6320
6321
6322
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6319

def delete_action(params = {}, options = {})
  req = build_request(:delete_action, params)
  req.send_request(options)
end

#delete_algorithm(params = {}) ⇒ Struct

Removes the specified algorithm from your account.

Examples:

Request syntax with placeholder values


resp = client.delete_algorithm({
  algorithm_name: "EntityName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :algorithm_name (required, String)

    The name of the algorithm to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6341
6342
6343
6344
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6341

def delete_algorithm(params = {}, options = {})
  req = build_request(:delete_algorithm, params)
  req.send_request(options)
end

#delete_app(params = {}) ⇒ Struct

Used to stop and delete an app.

Examples:

Request syntax with placeholder values


resp = client.delete_app({
  domain_id: "DomainId", # required
  user_profile_name: "UserProfileName", # required
  app_type: "JupyterServer", # required, accepts JupyterServer, KernelGateway, TensorBoard
  app_name: "AppName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The domain ID.

  • :user_profile_name (required, String)

    The user profile name.

  • :app_type (required, String)

    The type of app.

  • :app_name (required, String)

    The name of the app.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6375
6376
6377
6378
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6375

def delete_app(params = {}, options = {})
  req = build_request(:delete_app, params)
  req.send_request(options)
end

#delete_app_image_config(params = {}) ⇒ Struct

Deletes an AppImageConfig.

Examples:

Request syntax with placeholder values


resp = client.delete_app_image_config({
  app_image_config_name: "AppImageConfigName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :app_image_config_name (required, String)

    The name of the AppImageConfig to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6397
6398
6399
6400
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6397

def delete_app_image_config(params = {}, options = {})
  req = build_request(:delete_app_image_config, params)
  req.send_request(options)
end

#delete_artifact(params = {}) ⇒ Types::DeleteArtifactResponse

Deletes an artifact. Either ArtifactArn or Source must be specified.

Examples:

Request syntax with placeholder values


resp = client.delete_artifact({
  artifact_arn: "ArtifactArn",
  source: {
    source_uri: "String2048", # required
    source_types: [
      {
        source_id_type: "MD5Hash", # required, accepts MD5Hash, S3ETag, S3Version, Custom
        value: "String256", # required
      },
    ],
  },
})

Response structure


resp.artifact_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :artifact_arn (String)

    The Amazon Resource Name (ARN) of the artifact to delete.

  • :source (Types::ArtifactSource)

    The URI of the source.

Returns:

See Also:



6438
6439
6440
6441
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6438

def delete_artifact(params = {}, options = {})
  req = build_request(:delete_artifact, params)
  req.send_request(options)
end

#delete_association(params = {}) ⇒ Types::DeleteAssociationResponse

Deletes an association.

Examples:

Request syntax with placeholder values


resp = client.delete_association({
  source_arn: "AssociationEntityArn", # required
  destination_arn: "AssociationEntityArn", # required
})

Response structure


resp.source_arn #=> String
resp.destination_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :source_arn (required, String)

    The ARN of the source.

  • :destination_arn (required, String)

    The Amazon Resource Name (ARN) of the destination.

Returns:

See Also:



6472
6473
6474
6475
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6472

def delete_association(params = {}, options = {})
  req = build_request(:delete_association, params)
  req.send_request(options)
end

#delete_code_repository(params = {}) ⇒ Struct

Deletes the specified Git repository from your account.

Examples:

Request syntax with placeholder values


resp = client.delete_code_repository({
  code_repository_name: "EntityName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :code_repository_name (required, String)

    The name of the Git repository to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6494
6495
6496
6497
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6494

def delete_code_repository(params = {}, options = {})
  req = build_request(:delete_code_repository, params)
  req.send_request(options)
end

#delete_context(params = {}) ⇒ Types::DeleteContextResponse

Deletes an context.

Examples:

Request syntax with placeholder values


resp = client.delete_context({
  context_name: "ExperimentEntityName", # required
})

Response structure


resp.context_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :context_name (required, String)

    The name of the context to delete.

Returns:

See Also:



6522
6523
6524
6525
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6522

def delete_context(params = {}, options = {})
  req = build_request(:delete_context, params)
  req.send_request(options)
end

#delete_data_quality_job_definition(params = {}) ⇒ Struct

Deletes a data quality monitoring job definition.

Examples:

Request syntax with placeholder values


resp = client.delete_data_quality_job_definition({
  job_definition_name: "MonitoringJobDefinitionName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :job_definition_name (required, String)

    The name of the data quality monitoring job definition to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6544
6545
6546
6547
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6544

def delete_data_quality_job_definition(params = {}, options = {})
  req = build_request(:delete_data_quality_job_definition, params)
  req.send_request(options)
end

#delete_device_fleet(params = {}) ⇒ Struct

Deletes a fleet.

Examples:

Request syntax with placeholder values


resp = client.delete_device_fleet({
  device_fleet_name: "EntityName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :device_fleet_name (required, String)

    The name of the fleet to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6566
6567
6568
6569
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6566

def delete_device_fleet(params = {}, options = {})
  req = build_request(:delete_device_fleet, params)
  req.send_request(options)
end

#delete_domain(params = {}) ⇒ Struct

Used to delete a domain. If you onboarded with IAM mode, you will need to delete your domain to onboard again using SSO. Use with caution. All of the members of the domain will lose access to their EFS volume, including data, notebooks, and other artifacts.

Examples:

Request syntax with placeholder values


resp = client.delete_domain({
  domain_id: "DomainId", # required
  retention_policy: {
    home_efs_file_system: "Retain", # accepts Retain, Delete
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The domain ID.

  • :retention_policy (Types::RetentionPolicy)

    The retention policy for this domain, which specifies whether resources will be retained after the Domain is deleted. By default, all resources are retained (not automatically deleted).

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6599
6600
6601
6602
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6599

def delete_domain(params = {}, options = {})
  req = build_request(:delete_domain, params)
  req.send_request(options)
end

#delete_endpoint(params = {}) ⇒ Struct

Deletes an endpoint. Amazon SageMaker frees up all of the resources that were deployed when the endpoint was created.

Amazon SageMaker retires any custom KMS key grants associated with the endpoint, meaning you don't need to use the RevokeGrant API call.

Examples:

Request syntax with placeholder values


resp = client.delete_endpoint({
  endpoint_name: "EndpointName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :endpoint_name (required, String)

    The name of the endpoint that you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6630
6631
6632
6633
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6630

def delete_endpoint(params = {}, options = {})
  req = build_request(:delete_endpoint, params)
  req.send_request(options)
end

#delete_endpoint_config(params = {}) ⇒ Struct

Deletes an endpoint configuration. The DeleteEndpointConfig API deletes only the specified configuration. It does not delete endpoints created using the configuration.

You must not delete an EndpointConfig in use by an endpoint that is live or while the UpdateEndpoint or CreateEndpoint operations are being performed on the endpoint. If you delete the EndpointConfig of an endpoint that is active or being created or updated you may lose visibility into the instance type the endpoint is using. The endpoint must be deleted in order to stop incurring charges.

Examples:

Request syntax with placeholder values


resp = client.delete_endpoint_config({
  endpoint_config_name: "EndpointConfigName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :endpoint_config_name (required, String)

    The name of the endpoint configuration that you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6661
6662
6663
6664
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6661

def delete_endpoint_config(params = {}, options = {})
  req = build_request(:delete_endpoint_config, params)
  req.send_request(options)
end

#delete_experiment(params = {}) ⇒ Types::DeleteExperimentResponse

Deletes an SageMaker experiment. All trials associated with the experiment must be deleted first. Use the ListTrials API to get a list of the trials associated with the experiment.

Examples:

Request syntax with placeholder values


resp = client.delete_experiment({
  experiment_name: "ExperimentEntityName", # required
})

Response structure


resp.experiment_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :experiment_name (required, String)

    The name of the experiment to delete.

Returns:

See Also:



6691
6692
6693
6694
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6691

def delete_experiment(params = {}, options = {})
  req = build_request(:delete_experiment, params)
  req.send_request(options)
end

#delete_feature_group(params = {}) ⇒ Struct

Delete the FeatureGroup and any data that was written to the OnlineStore of the FeatureGroup. Data cannot be accessed from the OnlineStore immediately after DeleteFeatureGroup is called.

Data written into the OfflineStore will not be deleted. The Amazon Web Services Glue database and tables that are automatically created for your OfflineStore are not deleted.

Examples:

Request syntax with placeholder values


resp = client.delete_feature_group({
  feature_group_name: "FeatureGroupName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :feature_group_name (required, String)

    The name of the FeatureGroup you want to delete. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6721
6722
6723
6724
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6721

def delete_feature_group(params = {}, options = {})
  req = build_request(:delete_feature_group, params)
  req.send_request(options)
end

#delete_flow_definition(params = {}) ⇒ Struct

Deletes the specified flow definition.

Examples:

Request syntax with placeholder values


resp = client.delete_flow_definition({
  flow_definition_name: "FlowDefinitionName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :flow_definition_name (required, String)

    The name of the flow definition you are deleting.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6743
6744
6745
6746
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6743

def delete_flow_definition(params = {}, options = {})
  req = build_request(:delete_flow_definition, params)
  req.send_request(options)
end

#delete_human_task_ui(params = {}) ⇒ Struct

Use this operation to delete a human task user interface (worker task template).

To see a list of human task user interfaces (work task templates) in your account, use . When you delete a worker task template, it no longer appears when you call ListHumanTaskUis.

Examples:

Request syntax with placeholder values


resp = client.delete_human_task_ui({
  human_task_ui_name: "HumanTaskUiName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :human_task_ui_name (required, String)

    The name of the human task user interface (work task template) you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6771
6772
6773
6774
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6771

def delete_human_task_ui(params = {}, options = {})
  req = build_request(:delete_human_task_ui, params)
  req.send_request(options)
end

#delete_image(params = {}) ⇒ Struct

Deletes a SageMaker image and all versions of the image. The container images aren't deleted.

Examples:

Request syntax with placeholder values


resp = client.delete_image({
  image_name: "ImageName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :image_name (required, String)

    The name of the image to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6794
6795
6796
6797
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6794

def delete_image(params = {}, options = {})
  req = build_request(:delete_image, params)
  req.send_request(options)
end

#delete_image_version(params = {}) ⇒ Struct

Deletes a version of a SageMaker image. The container image the version represents isn't deleted.

Examples:

Request syntax with placeholder values


resp = client.delete_image_version({
  image_name: "ImageName", # required
  version: 1, # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :image_name (required, String)

    The name of the image.

  • :version (required, Integer)

    The version to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6821
6822
6823
6824
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6821

def delete_image_version(params = {}, options = {})
  req = build_request(:delete_image_version, params)
  req.send_request(options)
end

#delete_model(params = {}) ⇒ Struct

Deletes a model. The DeleteModel API deletes only the model entry that was created in Amazon SageMaker when you called the CreateModel API. It does not delete model artifacts, inference code, or the IAM role that you specified when creating the model.

Examples:

Request syntax with placeholder values


resp = client.delete_model({
  model_name: "ModelName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :model_name (required, String)

    The name of the model to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6846
6847
6848
6849
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6846

def delete_model(params = {}, options = {})
  req = build_request(:delete_model, params)
  req.send_request(options)
end

#delete_model_bias_job_definition(params = {}) ⇒ Struct

Deletes an Amazon SageMaker model bias job definition.

Examples:

Request syntax with placeholder values


resp = client.delete_model_bias_job_definition({
  job_definition_name: "MonitoringJobDefinitionName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :job_definition_name (required, String)

    The name of the model bias job definition to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6868
6869
6870
6871
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6868

def delete_model_bias_job_definition(params = {}, options = {})
  req = build_request(:delete_model_bias_job_definition, params)
  req.send_request(options)
end

#delete_model_explainability_job_definition(params = {}) ⇒ Struct

Deletes an Amazon SageMaker model explainability job definition.

Examples:

Request syntax with placeholder values


resp = client.delete_model_explainability_job_definition({
  job_definition_name: "MonitoringJobDefinitionName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :job_definition_name (required, String)

    The name of the model explainability job definition to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6890
6891
6892
6893
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6890

def delete_model_explainability_job_definition(params = {}, options = {})
  req = build_request(:delete_model_explainability_job_definition, params)
  req.send_request(options)
end

#delete_model_package(params = {}) ⇒ Struct

Deletes a model package.

A model package is used to create Amazon SageMaker models or list on Amazon Web Services Marketplace. Buyers can subscribe to model packages listed on Amazon Web Services Marketplace to create models in Amazon SageMaker.

Examples:

Request syntax with placeholder values


resp = client.delete_model_package({
  model_package_name: "VersionedArnOrName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :model_package_name (required, String)

    The name or Amazon Resource Name (ARN) of the model package to delete.

    When you specify a name, the name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).

Returns:

  • (Struct)

    Returns an empty response.

See Also:



6920
6921
6922
6923
# File 'gems/aws-sdk-sagemaker/lib/aws-sdk-sagemaker/client.rb', line 6920

def delete_model_package(params = {}, options = {})
  req = build_request(:delete_model_package, params)
  req.send_request(options)
end

#delete_model_package_group(params = {}) ⇒ Struct

Deletes the specified model group.

Examples:

Request syntax with placeholder values


resp = client.delete_model_package_group({
  model_package_group_name: "ArnOrName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

<