All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.sagemaker.model.OutputDataConfig Maven / Gradle / Ivy

/*
 * Copyright 2015-2020 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;

/**
 * 

* Provides information about how to store model training results (model artifacts). *

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

* The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest * using Amazon S3 server-side encryption. The KmsKeyId can be 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" *

    *
  • *
  • *

    * // KMS Key Alias *

    *

    * "alias/ExampleAlias" *

    *
  • *
  • *

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

    *

    * "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" *

    *
  • *
*

* If you use a KMS key ID or an alias of your master key, the Amazon SageMaker execution role must include * permissions to call kms:Encrypt. If you don't provide a KMS key ID, Amazon SageMaker uses the * default KMS key for Amazon S3 for your role's account. Amazon SageMaker uses server-side encryption with * KMS-managed keys for OutputDataConfig. If you use a bucket policy with an s3:PutObject * permission that only allows objects with server-side encryption, set the condition key of * s3:x-amz-server-side-encryption to "aws:kms". For more information, see KMS-Managed Encryption Keys in * the Amazon Simple Storage Service Developer Guide. *

*

* The KMS key policy must grant permission to the IAM role that you specify in your CreateTrainingJob, * CreateTransformJob, or CreateHyperParameterTuningJob requests. For more information, * see Using Key Policies in AWS * KMS in the AWS Key Management Service Developer Guide. *

*/ private String kmsKeyId; /** *

* Identifies the S3 path where you want Amazon SageMaker to store the model artifacts. For example, * s3://bucket-name/key-name-prefix. *

*/ private String s3OutputPath; /** *

* The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest * using Amazon S3 server-side encryption. The KmsKeyId can be 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" *

    *
  • *
  • *

    * // KMS Key Alias *

    *

    * "alias/ExampleAlias" *

    *
  • *
  • *

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

    *

    * "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" *

    *
  • *
*

* If you use a KMS key ID or an alias of your master key, the Amazon SageMaker execution role must include * permissions to call kms:Encrypt. If you don't provide a KMS key ID, Amazon SageMaker uses the * default KMS key for Amazon S3 for your role's account. Amazon SageMaker uses server-side encryption with * KMS-managed keys for OutputDataConfig. If you use a bucket policy with an s3:PutObject * permission that only allows objects with server-side encryption, set the condition key of * s3:x-amz-server-side-encryption to "aws:kms". For more information, see KMS-Managed Encryption Keys in * the Amazon Simple Storage Service Developer Guide. *

*

* The KMS key policy must grant permission to the IAM role that you specify in your CreateTrainingJob, * CreateTransformJob, or CreateHyperParameterTuningJob requests. For more information, * see Using Key Policies in AWS * KMS in the AWS Key Management Service Developer Guide. *

* * @param kmsKeyId * The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at * rest using Amazon S3 server-side encryption. The KmsKeyId can be 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" *

    *
  • *
  • *

    * // KMS Key Alias *

    *

    * "alias/ExampleAlias" *

    *
  • *
  • *

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

    *

    * "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" *

    *
  • *
*

* If you use a KMS key ID or an alias of your master key, the Amazon SageMaker execution role must include * permissions to call kms:Encrypt. If you don't provide a KMS key ID, Amazon SageMaker uses the * default KMS key for Amazon S3 for your role's account. Amazon SageMaker uses server-side encryption with * KMS-managed keys for OutputDataConfig. If you use a bucket policy with an * s3:PutObject permission that only allows objects with server-side encryption, set the * condition key of s3:x-amz-server-side-encryption to "aws:kms". For more * information, see KMS-Managed Encryption * Keys in the Amazon Simple Storage Service Developer Guide. *

*

* The KMS key policy must grant permission to the IAM role that you specify in your * CreateTrainingJob, CreateTransformJob, or * CreateHyperParameterTuningJob requests. For more information, see Using Key Policies in AWS * KMS in the AWS Key Management Service Developer Guide. */ public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } /** *

* The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest * using Amazon S3 server-side encryption. The KmsKeyId can be 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" *

    *
  • *
  • *

    * // KMS Key Alias *

    *

    * "alias/ExampleAlias" *

    *
  • *
  • *

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

    *

    * "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" *

    *
  • *
*

* If you use a KMS key ID or an alias of your master key, the Amazon SageMaker execution role must include * permissions to call kms:Encrypt. If you don't provide a KMS key ID, Amazon SageMaker uses the * default KMS key for Amazon S3 for your role's account. Amazon SageMaker uses server-side encryption with * KMS-managed keys for OutputDataConfig. If you use a bucket policy with an s3:PutObject * permission that only allows objects with server-side encryption, set the condition key of * s3:x-amz-server-side-encryption to "aws:kms". For more information, see KMS-Managed Encryption Keys in * the Amazon Simple Storage Service Developer Guide. *

*

* The KMS key policy must grant permission to the IAM role that you specify in your CreateTrainingJob, * CreateTransformJob, or CreateHyperParameterTuningJob requests. For more information, * see Using Key Policies in AWS * KMS in the AWS Key Management Service Developer Guide. *

* * @return The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at * rest using Amazon S3 server-side encryption. The KmsKeyId can be 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" *

    *
  • *
  • *

    * // KMS Key Alias *

    *

    * "alias/ExampleAlias" *

    *
  • *
  • *

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

    *

    * "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" *

    *
  • *
*

* If you use a KMS key ID or an alias of your master key, the Amazon SageMaker execution role must include * permissions to call kms:Encrypt. If you don't provide a KMS key ID, Amazon SageMaker uses * the default KMS key for Amazon S3 for your role's account. Amazon SageMaker uses server-side encryption * with KMS-managed keys for OutputDataConfig. If you use a bucket policy with an * s3:PutObject permission that only allows objects with server-side encryption, set the * condition key of s3:x-amz-server-side-encryption to "aws:kms". For more * information, see KMS-Managed Encryption * Keys in the Amazon Simple Storage Service Developer Guide. *

*

* The KMS key policy must grant permission to the IAM role that you specify in your * CreateTrainingJob, CreateTransformJob, or * CreateHyperParameterTuningJob requests. For more information, see Using Key Policies in AWS * KMS in the AWS Key Management Service Developer Guide. */ public String getKmsKeyId() { return this.kmsKeyId; } /** *

* The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest * using Amazon S3 server-side encryption. The KmsKeyId can be 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" *

    *
  • *
  • *

    * // KMS Key Alias *

    *

    * "alias/ExampleAlias" *

    *
  • *
  • *

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

    *

    * "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" *

    *
  • *
*

* If you use a KMS key ID or an alias of your master key, the Amazon SageMaker execution role must include * permissions to call kms:Encrypt. If you don't provide a KMS key ID, Amazon SageMaker uses the * default KMS key for Amazon S3 for your role's account. Amazon SageMaker uses server-side encryption with * KMS-managed keys for OutputDataConfig. If you use a bucket policy with an s3:PutObject * permission that only allows objects with server-side encryption, set the condition key of * s3:x-amz-server-side-encryption to "aws:kms". For more information, see KMS-Managed Encryption Keys in * the Amazon Simple Storage Service Developer Guide. *

*

* The KMS key policy must grant permission to the IAM role that you specify in your CreateTrainingJob, * CreateTransformJob, or CreateHyperParameterTuningJob requests. For more information, * see Using Key Policies in AWS * KMS in the AWS Key Management Service Developer Guide. *

* * @param kmsKeyId * The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at * rest using Amazon S3 server-side encryption. The KmsKeyId can be 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" *

    *
  • *
  • *

    * // KMS Key Alias *

    *

    * "alias/ExampleAlias" *

    *
  • *
  • *

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

    *

    * "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" *

    *
  • *
*

* If you use a KMS key ID or an alias of your master key, the Amazon SageMaker execution role must include * permissions to call kms:Encrypt. If you don't provide a KMS key ID, Amazon SageMaker uses the * default KMS key for Amazon S3 for your role's account. Amazon SageMaker uses server-side encryption with * KMS-managed keys for OutputDataConfig. If you use a bucket policy with an * s3:PutObject permission that only allows objects with server-side encryption, set the * condition key of s3:x-amz-server-side-encryption to "aws:kms". For more * information, see KMS-Managed Encryption * Keys in the Amazon Simple Storage Service Developer Guide. *

*

* The KMS key policy must grant permission to the IAM role that you specify in your * CreateTrainingJob, CreateTransformJob, or * CreateHyperParameterTuningJob requests. For more information, see Using Key Policies in AWS * KMS in the AWS Key Management Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public OutputDataConfig withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** *

* Identifies the S3 path where you want Amazon SageMaker to store the model artifacts. For example, * s3://bucket-name/key-name-prefix. *

* * @param s3OutputPath * Identifies the S3 path where you want Amazon SageMaker to store the model artifacts. For example, * s3://bucket-name/key-name-prefix. */ public void setS3OutputPath(String s3OutputPath) { this.s3OutputPath = s3OutputPath; } /** *

* Identifies the S3 path where you want Amazon SageMaker to store the model artifacts. For example, * s3://bucket-name/key-name-prefix. *

* * @return Identifies the S3 path where you want Amazon SageMaker to store the model artifacts. For example, * s3://bucket-name/key-name-prefix. */ public String getS3OutputPath() { return this.s3OutputPath; } /** *

* Identifies the S3 path where you want Amazon SageMaker to store the model artifacts. For example, * s3://bucket-name/key-name-prefix. *

* * @param s3OutputPath * Identifies the S3 path where you want Amazon SageMaker to store the model artifacts. For example, * s3://bucket-name/key-name-prefix. * @return Returns a reference to this object so that method calls can be chained together. */ public OutputDataConfig withS3OutputPath(String s3OutputPath) { setS3OutputPath(s3OutputPath); 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 (getKmsKeyId() != null) sb.append("KmsKeyId: ").append(getKmsKeyId()).append(","); if (getS3OutputPath() != null) sb.append("S3OutputPath: ").append(getS3OutputPath()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof OutputDataConfig == false) return false; OutputDataConfig other = (OutputDataConfig) obj; if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null) return false; if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == false) return false; if (other.getS3OutputPath() == null ^ this.getS3OutputPath() == null) return false; if (other.getS3OutputPath() != null && other.getS3OutputPath().equals(this.getS3OutputPath()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getS3OutputPath() == null) ? 0 : getS3OutputPath().hashCode()); return hashCode; } @Override public OutputDataConfig clone() { try { return (OutputDataConfig) 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.OutputDataConfigMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy