/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.sagemaker.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Describes the resources, including machine learning (ML) compute instances and ML storage volumes, to use for model * training. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ResourceConfig implements Serializable, Cloneable, StructuredPojo { /** *

* The ML compute instance type. *

* *

* SageMaker Training on Amazon Elastic Compute Cloud (EC2) P4de instances is in preview release starting December * 9th, 2022. *

*

* Amazon EC2 P4de instances (currently in preview) are * powered by 8 NVIDIA A100 GPUs with 80GB high-performance HBM2e GPU memory, which accelerate the speed of training * ML models that need to be trained on large datasets of high-resolution data. In this preview release, Amazon * SageMaker supports ML training jobs on P4de instances (ml.p4de.24xlarge) to reduce model training * time. The ml.p4de.24xlarge instances are available in the following Amazon Web Services Regions. *

* *

* To request quota limit increase and start using P4de instances, contact the SageMaker Training service team * through your account team. *

*
*/ private String instanceType; /** *

* The number of ML compute instances to use. For distributed training, provide a value greater than 1. *

*/ private Integer instanceCount; /** *

* The size of the ML storage volume that you want to provision. *

*

* ML storage volumes store model artifacts and incremental states. Training algorithms might also use the ML * storage volume for scratch space. If you want to store the training data in the ML storage volume, choose * File as the TrainingInputMode in the algorithm specification. *

*

* When using an ML instance with NVMe SSD * volumes, SageMaker doesn't provision Amazon EBS General Purpose SSD (gp2) storage. Available storage is fixed * to the NVMe-type instance's storage capacity. SageMaker configures storage paths for training datasets, * checkpoints, model artifacts, and outputs to use the entire capacity of the instance storage. For example, ML * instance families with the NVMe-type instance storage include ml.p4d, ml.g4dn, and * ml.g5. *

*

* When using an ML instance with the EBS-only storage option and without instance storage, you must define the size * of EBS volume through VolumeSizeInGB in the ResourceConfig API. For example, ML * instance families that use EBS volumes include ml.c5 and ml.p2. *

*

* To look up instance types and their instance storage types and volumes, see Amazon EC2 Instance Types. *

*

* To find the default local paths defined by the SageMaker training platform, see Amazon SageMaker Training Storage * Folders for Training Datasets, Checkpoints, Model Artifacts, and Outputs. *

*/ private Integer volumeSizeInGB; /** *

* The Amazon Web Services KMS key that SageMaker uses to encrypt data on the storage volume attached to the ML * compute instance(s) that run the training job. *

* *

* 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 VolumeKmsKeyId when using an * instance type with local storage. *

*

* 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. *

*
*

* The VolumeKmsKeyId can be in any of the following formats: *

* */ private String volumeKmsKeyId; /** *

* The configuration of a heterogeneous cluster in JSON format. *

*/ private java.util.List instanceGroups; /** *

* The duration of time in seconds to retain configured resources in a warm pool for subsequent training jobs. *

*/ private Integer keepAlivePeriodInSeconds; /** *

* The ML compute instance type. *

* *

* SageMaker Training on Amazon Elastic Compute Cloud (EC2) P4de instances is in preview release starting December * 9th, 2022. *

*

* Amazon EC2 P4de instances (currently in preview) are * powered by 8 NVIDIA A100 GPUs with 80GB high-performance HBM2e GPU memory, which accelerate the speed of training * ML models that need to be trained on large datasets of high-resolution data. In this preview release, Amazon * SageMaker supports ML training jobs on P4de instances (ml.p4de.24xlarge) to reduce model training * time. The ml.p4de.24xlarge instances are available in the following Amazon Web Services Regions. *

* *

* To request quota limit increase and start using P4de instances, contact the SageMaker Training service team * through your account team. *

*
* * @param instanceType * The ML compute instance type.

*

* SageMaker Training on Amazon Elastic Compute Cloud (EC2) P4de instances is in preview release starting * December 9th, 2022. *

*

* Amazon EC2 P4de instances (currently in * preview) are powered by 8 NVIDIA A100 GPUs with 80GB high-performance HBM2e GPU memory, which accelerate * the speed of training ML models that need to be trained on large datasets of high-resolution data. In this * preview release, Amazon SageMaker supports ML training jobs on P4de instances ( * ml.p4de.24xlarge) to reduce model training time. The ml.p4de.24xlarge instances * are available in the following Amazon Web Services Regions. *

* *

* To request quota limit increase and start using P4de instances, contact the SageMaker Training service * team through your account team. *

* @see TrainingInstanceType */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** *

* The ML compute instance type. *

* *

* SageMaker Training on Amazon Elastic Compute Cloud (EC2) P4de instances is in preview release starting December * 9th, 2022. *

*

* Amazon EC2 P4de instances (currently in preview) are * powered by 8 NVIDIA A100 GPUs with 80GB high-performance HBM2e GPU memory, which accelerate the speed of training * ML models that need to be trained on large datasets of high-resolution data. In this preview release, Amazon * SageMaker supports ML training jobs on P4de instances (ml.p4de.24xlarge) to reduce model training * time. The ml.p4de.24xlarge instances are available in the following Amazon Web Services Regions. *

*
    *
  • *

    * US East (N. Virginia) (us-east-1) *

    *
  • *
  • *

    * US West (Oregon) (us-west-2) *

    *
  • *
*

* To request quota limit increase and start using P4de instances, contact the SageMaker Training service team * through your account team. *

*
* * @return The ML compute instance type.

*

* SageMaker Training on Amazon Elastic Compute Cloud (EC2) P4de instances is in preview release starting * December 9th, 2022. *

*

* Amazon EC2 P4de instances (currently in * preview) are powered by 8 NVIDIA A100 GPUs with 80GB high-performance HBM2e GPU memory, which accelerate * the speed of training ML models that need to be trained on large datasets of high-resolution data. In * this preview release, Amazon SageMaker supports ML training jobs on P4de instances ( * ml.p4de.24xlarge) to reduce model training time. The ml.p4de.24xlarge instances * are available in the following Amazon Web Services Regions. *

*
    *
  • *

    * US East (N. Virginia) (us-east-1) *

    *
  • *
  • *

    * US West (Oregon) (us-west-2) *

    *
  • *
*

* To request quota limit increase and start using P4de instances, contact the SageMaker Training service * team through your account team. *

* @see TrainingInstanceType */ public String getInstanceType() { return this.instanceType; } /** *

* The ML compute instance type. *

* *

* SageMaker Training on Amazon Elastic Compute Cloud (EC2) P4de instances is in preview release starting December * 9th, 2022. *

*

* Amazon EC2 P4de instances (currently in preview) are * powered by 8 NVIDIA A100 GPUs with 80GB high-performance HBM2e GPU memory, which accelerate the speed of training * ML models that need to be trained on large datasets of high-resolution data. In this preview release, Amazon * SageMaker supports ML training jobs on P4de instances (ml.p4de.24xlarge) to reduce model training * time. The ml.p4de.24xlarge instances are available in the following Amazon Web Services Regions. *

*
    *
  • *

    * US East (N. Virginia) (us-east-1) *

    *
  • *
  • *

    * US West (Oregon) (us-west-2) *

    *
  • *
*

* To request quota limit increase and start using P4de instances, contact the SageMaker Training service team * through your account team. *

*
* * @param instanceType * The ML compute instance type.

*

* SageMaker Training on Amazon Elastic Compute Cloud (EC2) P4de instances is in preview release starting * December 9th, 2022. *

*

* Amazon EC2 P4de instances (currently in * preview) are powered by 8 NVIDIA A100 GPUs with 80GB high-performance HBM2e GPU memory, which accelerate * the speed of training ML models that need to be trained on large datasets of high-resolution data. In this * preview release, Amazon SageMaker supports ML training jobs on P4de instances ( * ml.p4de.24xlarge) to reduce model training time. The ml.p4de.24xlarge instances * are available in the following Amazon Web Services Regions. *

*
    *
  • *

    * US East (N. Virginia) (us-east-1) *

    *
  • *
  • *

    * US West (Oregon) (us-west-2) *

    *
  • *
*

* To request quota limit increase and start using P4de instances, contact the SageMaker Training service * team through your account team. *

* @return Returns a reference to this object so that method calls can be chained together. * @see TrainingInstanceType */ public ResourceConfig withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** *

* The ML compute instance type. *

* *

* SageMaker Training on Amazon Elastic Compute Cloud (EC2) P4de instances is in preview release starting December * 9th, 2022. *

*

* Amazon EC2 P4de instances (currently in preview) are * powered by 8 NVIDIA A100 GPUs with 80GB high-performance HBM2e GPU memory, which accelerate the speed of training * ML models that need to be trained on large datasets of high-resolution data. In this preview release, Amazon * SageMaker supports ML training jobs on P4de instances (ml.p4de.24xlarge) to reduce model training * time. The ml.p4de.24xlarge instances are available in the following Amazon Web Services Regions. *

*
    *
  • *

    * US East (N. Virginia) (us-east-1) *

    *
  • *
  • *

    * US West (Oregon) (us-west-2) *

    *
  • *
*

* To request quota limit increase and start using P4de instances, contact the SageMaker Training service team * through your account team. *

*
* * @param instanceType * The ML compute instance type.

*

* SageMaker Training on Amazon Elastic Compute Cloud (EC2) P4de instances is in preview release starting * December 9th, 2022. *

*

* Amazon EC2 P4de instances (currently in * preview) are powered by 8 NVIDIA A100 GPUs with 80GB high-performance HBM2e GPU memory, which accelerate * the speed of training ML models that need to be trained on large datasets of high-resolution data. In this * preview release, Amazon SageMaker supports ML training jobs on P4de instances ( * ml.p4de.24xlarge) to reduce model training time. The ml.p4de.24xlarge instances * are available in the following Amazon Web Services Regions. *

*
    *
  • *

    * US East (N. Virginia) (us-east-1) *

    *
  • *
  • *

    * US West (Oregon) (us-west-2) *

    *
  • *
*

* To request quota limit increase and start using P4de instances, contact the SageMaker Training service * team through your account team. *

* @return Returns a reference to this object so that method calls can be chained together. * @see TrainingInstanceType */ public ResourceConfig withInstanceType(TrainingInstanceType instanceType) { this.instanceType = instanceType.toString(); return this; } /** *

* The number of ML compute instances to use. For distributed training, provide a value greater than 1. *

* * @param instanceCount * The number of ML compute instances to use. For distributed training, provide a value greater than 1. */ public void setInstanceCount(Integer instanceCount) { this.instanceCount = instanceCount; } /** *

* The number of ML compute instances to use. For distributed training, provide a value greater than 1. *

* * @return The number of ML compute instances to use. For distributed training, provide a value greater than 1. */ public Integer getInstanceCount() { return this.instanceCount; } /** *

* The number of ML compute instances to use. For distributed training, provide a value greater than 1. *

* * @param instanceCount * The number of ML compute instances to use. For distributed training, provide a value greater than 1. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceConfig withInstanceCount(Integer instanceCount) { setInstanceCount(instanceCount); return this; } /** *

* The size of the ML storage volume that you want to provision. *

*

* ML storage volumes store model artifacts and incremental states. Training algorithms might also use the ML * storage volume for scratch space. If you want to store the training data in the ML storage volume, choose * File as the TrainingInputMode in the algorithm specification. *

*

* When using an ML instance with NVMe SSD * volumes, SageMaker doesn't provision Amazon EBS General Purpose SSD (gp2) storage. Available storage is fixed * to the NVMe-type instance's storage capacity. SageMaker configures storage paths for training datasets, * checkpoints, model artifacts, and outputs to use the entire capacity of the instance storage. For example, ML * instance families with the NVMe-type instance storage include ml.p4d, ml.g4dn, and * ml.g5. *

*

* When using an ML instance with the EBS-only storage option and without instance storage, you must define the size * of EBS volume through VolumeSizeInGB in the ResourceConfig API. For example, ML * instance families that use EBS volumes include ml.c5 and ml.p2. *

*

* To look up instance types and their instance storage types and volumes, see Amazon EC2 Instance Types. *

*

* To find the default local paths defined by the SageMaker training platform, see Amazon SageMaker Training Storage * Folders for Training Datasets, Checkpoints, Model Artifacts, and Outputs. *

* * @param volumeSizeInGB * The size of the ML storage volume that you want to provision.

*

* ML storage volumes store model artifacts and incremental states. Training algorithms might also use the ML * storage volume for scratch space. If you want to store the training data in the ML storage volume, choose * File as the TrainingInputMode in the algorithm specification. *

*

* When using an ML instance with NVMe * SSD volumes, SageMaker doesn't provision Amazon EBS General Purpose SSD (gp2) storage. Available * storage is fixed to the NVMe-type instance's storage capacity. SageMaker configures storage paths for * training datasets, checkpoints, model artifacts, and outputs to use the entire capacity of the instance * storage. For example, ML instance families with the NVMe-type instance storage include ml.p4d, ml.g4dn, and ml.g5. *

*

* When using an ML instance with the EBS-only storage option and without instance storage, you must define * the size of EBS volume through VolumeSizeInGB in the ResourceConfig API. For * example, ML instance families that use EBS volumes include ml.c5 and ml.p2. *

*

* To look up instance types and their instance storage types and volumes, see Amazon EC2 Instance Types. *

*

* To find the default local paths defined by the SageMaker training platform, see Amazon SageMaker Training * Storage Folders for Training Datasets, Checkpoints, Model Artifacts, and Outputs. */ public void setVolumeSizeInGB(Integer volumeSizeInGB) { this.volumeSizeInGB = volumeSizeInGB; } /** *

* The size of the ML storage volume that you want to provision. *

*

* ML storage volumes store model artifacts and incremental states. Training algorithms might also use the ML * storage volume for scratch space. If you want to store the training data in the ML storage volume, choose * File as the TrainingInputMode in the algorithm specification. *

*

* When using an ML instance with NVMe SSD * volumes, SageMaker doesn't provision Amazon EBS General Purpose SSD (gp2) storage. Available storage is fixed * to the NVMe-type instance's storage capacity. SageMaker configures storage paths for training datasets, * checkpoints, model artifacts, and outputs to use the entire capacity of the instance storage. For example, ML * instance families with the NVMe-type instance storage include ml.p4d, ml.g4dn, and * ml.g5. *

*

* When using an ML instance with the EBS-only storage option and without instance storage, you must define the size * of EBS volume through VolumeSizeInGB in the ResourceConfig API. For example, ML * instance families that use EBS volumes include ml.c5 and ml.p2. *

*

* To look up instance types and their instance storage types and volumes, see Amazon EC2 Instance Types. *

*

* To find the default local paths defined by the SageMaker training platform, see Amazon SageMaker Training Storage * Folders for Training Datasets, Checkpoints, Model Artifacts, and Outputs. *

* * @return The size of the ML storage volume that you want to provision.

*

* ML storage volumes store model artifacts and incremental states. Training algorithms might also use the * ML storage volume for scratch space. If you want to store the training data in the ML storage volume, * choose File as the TrainingInputMode in the algorithm specification. *

*

* When using an ML instance with NVMe * SSD volumes, SageMaker doesn't provision Amazon EBS General Purpose SSD (gp2) storage. Available * storage is fixed to the NVMe-type instance's storage capacity. SageMaker configures storage paths for * training datasets, checkpoints, model artifacts, and outputs to use the entire capacity of the instance * storage. For example, ML instance families with the NVMe-type instance storage include * ml.p4d, ml.g4dn, and ml.g5. *

*

* When using an ML instance with the EBS-only storage option and without instance storage, you must define * the size of EBS volume through VolumeSizeInGB in the ResourceConfig API. For * example, ML instance families that use EBS volumes include ml.c5 and ml.p2. *

*

* To look up instance types and their instance storage types and volumes, see Amazon EC2 Instance Types. *

*

* To find the default local paths defined by the SageMaker training platform, see Amazon SageMaker Training * Storage Folders for Training Datasets, Checkpoints, Model Artifacts, and Outputs. */ public Integer getVolumeSizeInGB() { return this.volumeSizeInGB; } /** *

* The size of the ML storage volume that you want to provision. *

*

* ML storage volumes store model artifacts and incremental states. Training algorithms might also use the ML * storage volume for scratch space. If you want to store the training data in the ML storage volume, choose * File as the TrainingInputMode in the algorithm specification. *

*

* When using an ML instance with NVMe SSD * volumes, SageMaker doesn't provision Amazon EBS General Purpose SSD (gp2) storage. Available storage is fixed * to the NVMe-type instance's storage capacity. SageMaker configures storage paths for training datasets, * checkpoints, model artifacts, and outputs to use the entire capacity of the instance storage. For example, ML * instance families with the NVMe-type instance storage include ml.p4d, ml.g4dn, and * ml.g5. *

*

* When using an ML instance with the EBS-only storage option and without instance storage, you must define the size * of EBS volume through VolumeSizeInGB in the ResourceConfig API. For example, ML * instance families that use EBS volumes include ml.c5 and ml.p2. *

*

* To look up instance types and their instance storage types and volumes, see Amazon EC2 Instance Types. *

*

* To find the default local paths defined by the SageMaker training platform, see Amazon SageMaker Training Storage * Folders for Training Datasets, Checkpoints, Model Artifacts, and Outputs. *

* * @param volumeSizeInGB * The size of the ML storage volume that you want to provision.

*

* ML storage volumes store model artifacts and incremental states. Training algorithms might also use the ML * storage volume for scratch space. If you want to store the training data in the ML storage volume, choose * File as the TrainingInputMode in the algorithm specification. *

*

* When using an ML instance with NVMe * SSD volumes, SageMaker doesn't provision Amazon EBS General Purpose SSD (gp2) storage. Available * storage is fixed to the NVMe-type instance's storage capacity. SageMaker configures storage paths for * training datasets, checkpoints, model artifacts, and outputs to use the entire capacity of the instance * storage. For example, ML instance families with the NVMe-type instance storage include ml.p4d, ml.g4dn, and ml.g5. *

*

* When using an ML instance with the EBS-only storage option and without instance storage, you must define * the size of EBS volume through VolumeSizeInGB in the ResourceConfig API. For * example, ML instance families that use EBS volumes include ml.c5 and ml.p2. *

*

* To look up instance types and their instance storage types and volumes, see Amazon EC2 Instance Types. *

*

* To find the default local paths defined by the SageMaker training platform, see Amazon SageMaker Training * Storage Folders for Training Datasets, Checkpoints, Model Artifacts, and Outputs. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceConfig withVolumeSizeInGB(Integer volumeSizeInGB) { setVolumeSizeInGB(volumeSizeInGB); return this; } /** *

* The Amazon Web Services KMS key that SageMaker uses to encrypt data on the storage volume attached to the ML * compute instance(s) that run the training job. *

* *

* 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 VolumeKmsKeyId when using an * instance type with local storage. *

*

* 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. *

*
*

* The VolumeKmsKeyId can be in any of the following formats: *

*
    *
  • *

    * // KMS Key ID *

    *

    * "1234abcd-12ab-34cd-56ef-1234567890ab" *

    *
  • *
  • *

    * // Amazon Resource Name (ARN) of a KMS Key *

    *

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

    *
  • *
* * @param volumeKmsKeyId * The Amazon Web Services KMS key that SageMaker uses to encrypt data on the storage volume attached to the * ML compute instance(s) that run the training job.

*

* 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 VolumeKmsKeyId * when using an instance type with local storage. *

*

* 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. *

*
*

* The VolumeKmsKeyId can be in any of the following formats: *

*
    *
  • *

    * // KMS Key ID *

    *

    * "1234abcd-12ab-34cd-56ef-1234567890ab" *

    *
  • *
  • *

    * // Amazon Resource Name (ARN) of a KMS Key *

    *

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

    *
  • */ public void setVolumeKmsKeyId(String volumeKmsKeyId) { this.volumeKmsKeyId = volumeKmsKeyId; } /** *

    * The Amazon Web Services KMS key that SageMaker uses to encrypt data on the storage volume attached to the ML * compute instance(s) that run the training job. *

    * *

    * 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 VolumeKmsKeyId when using an * instance type with local storage. *

    *

    * 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. *

    *
    *

    * The VolumeKmsKeyId can be in any of the following formats: *

    *
      *
    • *

      * // KMS Key ID *

      *

      * "1234abcd-12ab-34cd-56ef-1234567890ab" *

      *
    • *
    • *

      * // Amazon Resource Name (ARN) of a KMS Key *

      *

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

      *
    • *
    * * @return The Amazon Web Services KMS key that SageMaker uses to encrypt data on the storage volume attached to the * ML compute instance(s) that run the training job.

    *

    * 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 * VolumeKmsKeyId when using an instance type with local storage. *

    *

    * 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. *

    *
    *

    * The VolumeKmsKeyId can be in any of the following formats: *

    *
      *
    • *

      * // KMS Key ID *

      *

      * "1234abcd-12ab-34cd-56ef-1234567890ab" *

      *
    • *
    • *

      * // Amazon Resource Name (ARN) of a KMS Key *

      *

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

      *
    • */ public String getVolumeKmsKeyId() { return this.volumeKmsKeyId; } /** *

      * The Amazon Web Services KMS key that SageMaker uses to encrypt data on the storage volume attached to the ML * compute instance(s) that run the training job. *

      * *

      * 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 VolumeKmsKeyId when using an * instance type with local storage. *

      *

      * 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. *

      *
      *

      * The VolumeKmsKeyId can be in any of the following formats: *

      *
        *
      • *

        * // KMS Key ID *

        *

        * "1234abcd-12ab-34cd-56ef-1234567890ab" *

        *
      • *
      • *

        * // Amazon Resource Name (ARN) of a KMS Key *

        *

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

        *
      • *
      * * @param volumeKmsKeyId * The Amazon Web Services KMS key that SageMaker uses to encrypt data on the storage volume attached to the * ML compute instance(s) that run the training job.

      *

      * 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 VolumeKmsKeyId * when using an instance type with local storage. *

      *

      * 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. *

      *
      *

      * The VolumeKmsKeyId can be in any of the following formats: *

      *
        *
      • *

        * // KMS Key ID *

        *

        * "1234abcd-12ab-34cd-56ef-1234567890ab" *

        *
      • *
      • *

        * // Amazon Resource Name (ARN) of a KMS Key *

        *

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

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceConfig withVolumeKmsKeyId(String volumeKmsKeyId) { setVolumeKmsKeyId(volumeKmsKeyId); return this; } /** *

        * The configuration of a heterogeneous cluster in JSON format. *

        * * @return The configuration of a heterogeneous cluster in JSON format. */ public java.util.List getInstanceGroups() { return instanceGroups; } /** *

        * The configuration of a heterogeneous cluster in JSON format. *

        * * @param instanceGroups * The configuration of a heterogeneous cluster in JSON format. */ public void setInstanceGroups(java.util.Collection instanceGroups) { if (instanceGroups == null) { this.instanceGroups = null; return; } this.instanceGroups = new java.util.ArrayList(instanceGroups); } /** *

        * The configuration of a heterogeneous cluster in JSON format. *

        *

        * NOTE: This method appends the values to the existing list (if any). Use * {@link #setInstanceGroups(java.util.Collection)} or {@link #withInstanceGroups(java.util.Collection)} if you want * to override the existing values. *

        * * @param instanceGroups * The configuration of a heterogeneous cluster in JSON format. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceConfig withInstanceGroups(InstanceGroup... instanceGroups) { if (this.instanceGroups == null) { setInstanceGroups(new java.util.ArrayList(instanceGroups.length)); } for (InstanceGroup ele : instanceGroups) { this.instanceGroups.add(ele); } return this; } /** *

        * The configuration of a heterogeneous cluster in JSON format. *

        * * @param instanceGroups * The configuration of a heterogeneous cluster in JSON format. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceConfig withInstanceGroups(java.util.Collection instanceGroups) { setInstanceGroups(instanceGroups); return this; } /** *

        * The duration of time in seconds to retain configured resources in a warm pool for subsequent training jobs. *

        * * @param keepAlivePeriodInSeconds * The duration of time in seconds to retain configured resources in a warm pool for subsequent training * jobs. */ public void setKeepAlivePeriodInSeconds(Integer keepAlivePeriodInSeconds) { this.keepAlivePeriodInSeconds = keepAlivePeriodInSeconds; } /** *

        * The duration of time in seconds to retain configured resources in a warm pool for subsequent training jobs. *

        * * @return The duration of time in seconds to retain configured resources in a warm pool for subsequent training * jobs. */ public Integer getKeepAlivePeriodInSeconds() { return this.keepAlivePeriodInSeconds; } /** *

        * The duration of time in seconds to retain configured resources in a warm pool for subsequent training jobs. *

        * * @param keepAlivePeriodInSeconds * The duration of time in seconds to retain configured resources in a warm pool for subsequent training * jobs. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceConfig withKeepAlivePeriodInSeconds(Integer keepAlivePeriodInSeconds) { setKeepAlivePeriodInSeconds(keepAlivePeriodInSeconds); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getInstanceType() != null) sb.append("InstanceType: ").append(getInstanceType()).append(","); if (getInstanceCount() != null) sb.append("InstanceCount: ").append(getInstanceCount()).append(","); if (getVolumeSizeInGB() != null) sb.append("VolumeSizeInGB: ").append(getVolumeSizeInGB()).append(","); if (getVolumeKmsKeyId() != null) sb.append("VolumeKmsKeyId: ").append(getVolumeKmsKeyId()).append(","); if (getInstanceGroups() != null) sb.append("InstanceGroups: ").append(getInstanceGroups()).append(","); if (getKeepAlivePeriodInSeconds() != null) sb.append("KeepAlivePeriodInSeconds: ").append(getKeepAlivePeriodInSeconds()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ResourceConfig == false) return false; ResourceConfig other = (ResourceConfig) obj; if (other.getInstanceType() == null ^ this.getInstanceType() == null) return false; if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == false) return false; if (other.getInstanceCount() == null ^ this.getInstanceCount() == null) return false; if (other.getInstanceCount() != null && other.getInstanceCount().equals(this.getInstanceCount()) == false) return false; if (other.getVolumeSizeInGB() == null ^ this.getVolumeSizeInGB() == null) return false; if (other.getVolumeSizeInGB() != null && other.getVolumeSizeInGB().equals(this.getVolumeSizeInGB()) == false) return false; if (other.getVolumeKmsKeyId() == null ^ this.getVolumeKmsKeyId() == null) return false; if (other.getVolumeKmsKeyId() != null && other.getVolumeKmsKeyId().equals(this.getVolumeKmsKeyId()) == false) return false; if (other.getInstanceGroups() == null ^ this.getInstanceGroups() == null) return false; if (other.getInstanceGroups() != null && other.getInstanceGroups().equals(this.getInstanceGroups()) == false) return false; if (other.getKeepAlivePeriodInSeconds() == null ^ this.getKeepAlivePeriodInSeconds() == null) return false; if (other.getKeepAlivePeriodInSeconds() != null && other.getKeepAlivePeriodInSeconds().equals(this.getKeepAlivePeriodInSeconds()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getInstanceCount() == null) ? 0 : getInstanceCount().hashCode()); hashCode = prime * hashCode + ((getVolumeSizeInGB() == null) ? 0 : getVolumeSizeInGB().hashCode()); hashCode = prime * hashCode + ((getVolumeKmsKeyId() == null) ? 0 : getVolumeKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getInstanceGroups() == null) ? 0 : getInstanceGroups().hashCode()); hashCode = prime * hashCode + ((getKeepAlivePeriodInSeconds() == null) ? 0 : getKeepAlivePeriodInSeconds().hashCode()); return hashCode; } @Override public ResourceConfig clone() { try { return (ResourceConfig) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.sagemaker.model.transform.ResourceConfigMarshaller.getInstance().marshall(this, protocolMarshaller); } }