/* * 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.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 array of ProductionVariant
objects, one for each model that you want to host at this endpoint.
*
* 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. *
*/ private java.util.List* The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that 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. *
** Specifies configuration for how an endpoint performs asynchronous inference. This is a required field in order * for your Endpoint to be invoked using InvokeEndpointAsync. *
*/ private AsyncInferenceConfig asyncInferenceConfig; /** *
* A member of CreateEndpointConfig
that enables explainers.
*
* An array of ProductionVariant
objects, one for each model that you want to host at this endpoint in
* shadow mode with production traffic replicated from the model specified on ProductionVariants
. If
* you use this field, you can only specify one variant for ProductionVariants
and one variant for
* ShadowProductionVariants
.
*
* 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 array of ProductionVariant
objects, one for each model that you want to host at this endpoint.
*
ProductionVariant
objects, one for each model that you want to host at this
* endpoint.
*/
public java.util.List
* An array of ProductionVariant
objects, one for each model that you want to host at this endpoint.
*
ProductionVariant
objects, one for each model that you want to host at this
* endpoint.
*/
public void setProductionVariants(java.util.Collection
* An array 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 array ofProductionVariant
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
* An array of ProductionVariant
objects, one for each model that you want to host at this endpoint.
*
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* 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. *
* * @return 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. */ public java.util.List* 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. *
* * @param tags * 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. */ public void setTags(java.util.Collection* 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. *
** 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 Amazon Web Services resources in * different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services * 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* 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. *
* * @param tags * 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateEndpointConfigRequest withTags(java.util.Collection* The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that 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. *
** 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. *
*/ public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } /** ** The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that 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. *
** 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. *
*/ public String getKmsKeyId() { return this.kmsKeyId; } /** ** The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that 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. *
** 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. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateEndpointConfigRequest withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** ** Specifies configuration for how an endpoint performs asynchronous inference. This is a required field in order * for your Endpoint to be invoked using InvokeEndpointAsync. *
* * @param 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. */ public void setAsyncInferenceConfig(AsyncInferenceConfig asyncInferenceConfig) { this.asyncInferenceConfig = 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. *
* * @return Specifies configuration for how an endpoint performs asynchronous inference. This is a required field in * order for your Endpoint to be invoked using InvokeEndpointAsync. */ public AsyncInferenceConfig getAsyncInferenceConfig() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateEndpointConfigRequest withAsyncInferenceConfig(AsyncInferenceConfig asyncInferenceConfig) { setAsyncInferenceConfig(asyncInferenceConfig); return this; } /** *
* A member of CreateEndpointConfig
that enables explainers.
*
CreateEndpointConfig
that enables explainers.
*/
public void setExplainerConfig(ExplainerConfig explainerConfig) {
this.explainerConfig = explainerConfig;
}
/**
*
* A member of CreateEndpointConfig
that enables explainers.
*
CreateEndpointConfig
that enables explainers.
*/
public ExplainerConfig getExplainerConfig() {
return this.explainerConfig;
}
/**
*
* A member of CreateEndpointConfig
that enables explainers.
*
CreateEndpointConfig
that enables explainers.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEndpointConfigRequest withExplainerConfig(ExplainerConfig explainerConfig) {
setExplainerConfig(explainerConfig);
return this;
}
/**
*
* An array of ProductionVariant
objects, one for each model that you want to host at this endpoint in
* shadow mode with production traffic replicated from the model specified on ProductionVariants
. If
* you use this field, you can only specify one variant for ProductionVariants
and one variant for
* ShadowProductionVariants
.
*
ProductionVariant
objects, one for each model that you want to host at this
* endpoint in shadow mode with production traffic replicated from the model specified on
* ProductionVariants
. If you use this field, you can only specify one variant for
* ProductionVariants
and one variant for ShadowProductionVariants
.
*/
public java.util.List
* An array of ProductionVariant
objects, one for each model that you want to host at this endpoint in
* shadow mode with production traffic replicated from the model specified on ProductionVariants
. If
* you use this field, you can only specify one variant for ProductionVariants
and one variant for
* ShadowProductionVariants
.
*
ProductionVariant
objects, one for each model that you want to host at this
* endpoint in shadow mode with production traffic replicated from the model specified on
* ProductionVariants
. If you use this field, you can only specify one variant for
* ProductionVariants
and one variant for ShadowProductionVariants
.
*/
public void setShadowProductionVariants(java.util.Collection
* An array of ProductionVariant
objects, one for each model that you want to host at this endpoint in
* shadow mode with production traffic replicated from the model specified on ProductionVariants
. If
* you use this field, you can only specify one variant for ProductionVariants
and one variant for
* ShadowProductionVariants
.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setShadowProductionVariants(java.util.Collection)} or * {@link #withShadowProductionVariants(java.util.Collection)} if you want to override the existing values. *
* * @param shadowProductionVariants * An array ofProductionVariant
objects, one for each model that you want to host at this
* endpoint in shadow mode with production traffic replicated from the model specified on
* ProductionVariants
. If you use this field, you can only specify one variant for
* ProductionVariants
and one variant for ShadowProductionVariants
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEndpointConfigRequest withShadowProductionVariants(ProductionVariant... shadowProductionVariants) {
if (this.shadowProductionVariants == null) {
setShadowProductionVariants(new java.util.ArrayList
* An array of ProductionVariant
objects, one for each model that you want to host at this endpoint in
* shadow mode with production traffic replicated from the model specified on ProductionVariants
. If
* you use this field, you can only specify one variant for ProductionVariants
and one variant for
* ShadowProductionVariants
.
*
ProductionVariant
objects, one for each model that you want to host at this
* endpoint in shadow mode with production traffic replicated from the model specified on
* ProductionVariants
. If you use this field, you can only specify one variant for
* ProductionVariants
and one variant for ShadowProductionVariants
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEndpointConfigRequest withShadowProductionVariants(java.util.Collection