
com.amazonaws.services.sagemaker.model.CreateEndpointConfigRequest 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.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateEndpointConfigRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of the endpoint configuration. You specify this name in a CreateEndpoint request.
*
*/
private String endpointConfigName;
/**
*
* An list of ProductionVariant
objects, one for each model that you want to host at this endpoint.
*
*/
private java.util.List productionVariants;
private DataCaptureConfig dataCaptureConfig;
/**
*
* An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for example, by
* purpose, owner, or environment. For more information, see Tagging AWS Resources.
*
*/
private java.util.List tags;
/**
*
* The Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon SageMaker uses to encrypt data on
* the storage volume attached to the ML compute instance that hosts the endpoint.
*
*
* 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 AWS Key Management Service section Using Key Policies in AWS 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.
*
*
*/
private String kmsKeyId;
/**
*
* The name of the endpoint configuration. You specify this name in a CreateEndpoint request.
*
*
* @param endpointConfigName
* The name of the endpoint configuration. You specify this name in a CreateEndpoint request.
*/
public void setEndpointConfigName(String endpointConfigName) {
this.endpointConfigName = endpointConfigName;
}
/**
*
* The name of the endpoint configuration. You specify this name in a CreateEndpoint request.
*
*
* @return The name of the endpoint configuration. You specify this name in a CreateEndpoint request.
*/
public String getEndpointConfigName() {
return this.endpointConfigName;
}
/**
*
* The name of the endpoint configuration. You specify this name in a CreateEndpoint request.
*
*
* @param endpointConfigName
* The name of the endpoint configuration. You specify this name in a CreateEndpoint request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEndpointConfigRequest withEndpointConfigName(String endpointConfigName) {
setEndpointConfigName(endpointConfigName);
return this;
}
/**
*
* An list of ProductionVariant
objects, one for each model that you want to host at this endpoint.
*
*
* @return An list of ProductionVariant
objects, one for each model that you want to host at this
* endpoint.
*/
public java.util.List getProductionVariants() {
return productionVariants;
}
/**
*
* An list of ProductionVariant
objects, one for each model that you want to host at this endpoint.
*
*
* @param productionVariants
* An list of ProductionVariant
objects, one for each model that you want to host at this
* endpoint.
*/
public void setProductionVariants(java.util.Collection productionVariants) {
if (productionVariants == null) {
this.productionVariants = null;
return;
}
this.productionVariants = new java.util.ArrayList(productionVariants);
}
/**
*
* An list of ProductionVariant
objects, one for each model that you want to host at this endpoint.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setProductionVariants(java.util.Collection)} or {@link #withProductionVariants(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param productionVariants
* An list of ProductionVariant
objects, one for each model that you want to host at this
* endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEndpointConfigRequest withProductionVariants(ProductionVariant... productionVariants) {
if (this.productionVariants == null) {
setProductionVariants(new java.util.ArrayList(productionVariants.length));
}
for (ProductionVariant ele : productionVariants) {
this.productionVariants.add(ele);
}
return this;
}
/**
*
* An list of ProductionVariant
objects, one for each model that you want to host at this endpoint.
*
*
* @param productionVariants
* An list of ProductionVariant
objects, one for each model that you want to host at this
* endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEndpointConfigRequest withProductionVariants(java.util.Collection productionVariants) {
setProductionVariants(productionVariants);
return this;
}
/**
* @param dataCaptureConfig
*/
public void setDataCaptureConfig(DataCaptureConfig dataCaptureConfig) {
this.dataCaptureConfig = dataCaptureConfig;
}
/**
* @return
*/
public DataCaptureConfig getDataCaptureConfig() {
return this.dataCaptureConfig;
}
/**
* @param dataCaptureConfig
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEndpointConfigRequest withDataCaptureConfig(DataCaptureConfig dataCaptureConfig) {
setDataCaptureConfig(dataCaptureConfig);
return this;
}
/**
*
* An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for example, by
* purpose, owner, or environment. For more information, see Tagging AWS Resources.
*
*
* @return An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for
* example, by purpose, owner, or environment. For more information, see Tagging AWS Resources.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for example, by
* purpose, owner, or environment. For more information, see Tagging AWS Resources.
*
*
* @param tags
* An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for
* example, by purpose, owner, or environment. For more information, see Tagging AWS Resources.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for example, by
* purpose, owner, or environment. For more information, see Tagging AWS Resources.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for
* example, by purpose, owner, or environment. For more information, see Tagging AWS Resources.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEndpointConfigRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for example, by
* purpose, owner, or environment. For more information, see Tagging AWS Resources.
*
*
* @param tags
* An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for
* example, by purpose, owner, or environment. For more information, see Tagging AWS Resources.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEndpointConfigRequest withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon SageMaker uses to encrypt data on
* the storage volume attached to the ML compute instance that hosts the endpoint.
*
*
* 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 AWS Key Management Service section Using Key Policies in AWS 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.
*
*
*
* @param kmsKeyId
* The Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon SageMaker uses to encrypt
* data on the storage volume attached to the ML compute instance that hosts the endpoint.
*
* 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 AWS
* Key Management Service section Using Key Policies in AWS
* 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.
*
*/
public void setKmsKeyId(String kmsKeyId) {
this.kmsKeyId = kmsKeyId;
}
/**
*
* The Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon SageMaker uses to encrypt data on
* the storage volume attached to the ML compute instance that hosts the endpoint.
*
*
* 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 AWS Key Management Service section Using Key Policies in AWS 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.
*
*
*
* @return The Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon SageMaker uses to encrypt
* data on the storage volume attached to the ML compute instance that hosts the endpoint.
*
* 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 AWS
* Key Management Service section Using Key Policies in AWS
* 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.
*
*/
public String getKmsKeyId() {
return this.kmsKeyId;
}
/**
*
* The Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon SageMaker uses to encrypt data on
* the storage volume attached to the ML compute instance that hosts the endpoint.
*
*
* 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 AWS Key Management Service section Using Key Policies in AWS 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.
*
*
*
* @param kmsKeyId
* The Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon SageMaker uses to encrypt
* data on the storage volume attached to the ML compute instance that hosts the endpoint.
*
* 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 AWS
* Key Management Service section Using Key Policies in AWS
* 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.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEndpointConfigRequest withKmsKeyId(String kmsKeyId) {
setKmsKeyId(kmsKeyId);
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 (getEndpointConfigName() != null)
sb.append("EndpointConfigName: ").append(getEndpointConfigName()).append(",");
if (getProductionVariants() != null)
sb.append("ProductionVariants: ").append(getProductionVariants()).append(",");
if (getDataCaptureConfig() != null)
sb.append("DataCaptureConfig: ").append(getDataCaptureConfig()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getKmsKeyId() != null)
sb.append("KmsKeyId: ").append(getKmsKeyId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateEndpointConfigRequest == false)
return false;
CreateEndpointConfigRequest other = (CreateEndpointConfigRequest) obj;
if (other.getEndpointConfigName() == null ^ this.getEndpointConfigName() == null)
return false;
if (other.getEndpointConfigName() != null && other.getEndpointConfigName().equals(this.getEndpointConfigName()) == false)
return false;
if (other.getProductionVariants() == null ^ this.getProductionVariants() == null)
return false;
if (other.getProductionVariants() != null && other.getProductionVariants().equals(this.getProductionVariants()) == false)
return false;
if (other.getDataCaptureConfig() == null ^ this.getDataCaptureConfig() == null)
return false;
if (other.getDataCaptureConfig() != null && other.getDataCaptureConfig().equals(this.getDataCaptureConfig()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null)
return false;
if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEndpointConfigName() == null) ? 0 : getEndpointConfigName().hashCode());
hashCode = prime * hashCode + ((getProductionVariants() == null) ? 0 : getProductionVariants().hashCode());
hashCode = prime * hashCode + ((getDataCaptureConfig() == null) ? 0 : getDataCaptureConfig().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode());
return hashCode;
}
@Override
public CreateEndpointConfigRequest clone() {
return (CreateEndpointConfigRequest) super.clone();
}
}