@Generated(value="software.amazon.awssdk:codegen") public interface ElasticInferenceClient extends SdkClient
builder()
method.
Elastic Inference public APIs.
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider . |
static String |
SERVICE_NAME |
Modifier and Type | Method and Description |
---|---|
static ElasticInferenceClientBuilder |
builder()
Create a builder that can be used to configure and create a
ElasticInferenceClient . |
static ElasticInferenceClient |
create()
Create a
ElasticInferenceClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider . |
default DescribeAcceleratorOfferingsResponse |
describeAcceleratorOfferings(Consumer<DescribeAcceleratorOfferingsRequest.Builder> describeAcceleratorOfferingsRequest)
Describes the locations in which a given accelerator type or set of types is present in a given region.
|
default DescribeAcceleratorOfferingsResponse |
describeAcceleratorOfferings(DescribeAcceleratorOfferingsRequest describeAcceleratorOfferingsRequest)
Describes the locations in which a given accelerator type or set of types is present in a given region.
|
default DescribeAcceleratorsResponse |
describeAccelerators(Consumer<DescribeAcceleratorsRequest.Builder> describeAcceleratorsRequest)
Describes information over a provided set of accelerators belonging to an account.
|
default DescribeAcceleratorsResponse |
describeAccelerators(DescribeAcceleratorsRequest describeAcceleratorsRequest)
Describes information over a provided set of accelerators belonging to an account.
|
default DescribeAcceleratorsIterable |
describeAcceleratorsPaginator(Consumer<DescribeAcceleratorsRequest.Builder> describeAcceleratorsRequest)
Describes information over a provided set of accelerators belonging to an account.
|
default DescribeAcceleratorsIterable |
describeAcceleratorsPaginator(DescribeAcceleratorsRequest describeAcceleratorsRequest)
Describes information over a provided set of accelerators belonging to an account.
|
default DescribeAcceleratorTypesResponse |
describeAcceleratorTypes(Consumer<DescribeAcceleratorTypesRequest.Builder> describeAcceleratorTypesRequest)
Describes the accelerator types available in a given region, as well as their characteristics, such as memory and
throughput.
|
default DescribeAcceleratorTypesResponse |
describeAcceleratorTypes(DescribeAcceleratorTypesRequest describeAcceleratorTypesRequest)
Describes the accelerator types available in a given region, as well as their characteristics, such as memory and
throughput.
|
default ListTagsForResourceResponse |
listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)
Returns all tags of an Elastic Inference Accelerator.
|
default ListTagsForResourceResponse |
listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
Returns all tags of an Elastic Inference Accelerator.
|
static ServiceMetadata |
serviceMetadata() |
default TagResourceResponse |
tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)
Adds the specified tags to an Elastic Inference Accelerator.
|
default TagResourceResponse |
tagResource(TagResourceRequest tagResourceRequest)
Adds the specified tags to an Elastic Inference Accelerator.
|
default UntagResourceResponse |
untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)
Removes the specified tags from an Elastic Inference Accelerator.
|
default UntagResourceResponse |
untagResource(UntagResourceRequest untagResourceRequest)
Removes the specified tags from an Elastic Inference Accelerator.
|
serviceName
close
static final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider
.static ElasticInferenceClient create()
ElasticInferenceClient
with the region loaded from the
DefaultAwsRegionProviderChain
and credentials loaded from the
DefaultCredentialsProvider
.static ElasticInferenceClientBuilder builder()
ElasticInferenceClient
.default DescribeAcceleratorOfferingsResponse describeAcceleratorOfferings(DescribeAcceleratorOfferingsRequest describeAcceleratorOfferingsRequest) throws BadRequestException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, ElasticInferenceException
Describes the locations in which a given accelerator type or set of types is present in a given region.
describeAcceleratorOfferingsRequest
- BadRequestException
- Raised when a malformed input has been provided to the API.ResourceNotFoundException
- Raised when the requested resource cannot be found.InternalServerException
- Raised when an unexpected error occurred during request processing.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ElasticInferenceException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default DescribeAcceleratorOfferingsResponse describeAcceleratorOfferings(Consumer<DescribeAcceleratorOfferingsRequest.Builder> describeAcceleratorOfferingsRequest) throws BadRequestException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, ElasticInferenceException
Describes the locations in which a given accelerator type or set of types is present in a given region.
This is a convenience which creates an instance of the DescribeAcceleratorOfferingsRequest.Builder
avoiding the need to create one manually via DescribeAcceleratorOfferingsRequest.builder()
describeAcceleratorOfferingsRequest
- A Consumer
that will call methods on DescribeAcceleratorOfferingsRequest.Builder
to create
a request.BadRequestException
- Raised when a malformed input has been provided to the API.ResourceNotFoundException
- Raised when the requested resource cannot be found.InternalServerException
- Raised when an unexpected error occurred during request processing.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ElasticInferenceException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default DescribeAcceleratorTypesResponse describeAcceleratorTypes(DescribeAcceleratorTypesRequest describeAcceleratorTypesRequest) throws InternalServerException, AwsServiceException, SdkClientException, ElasticInferenceException
Describes the accelerator types available in a given region, as well as their characteristics, such as memory and throughput.
describeAcceleratorTypesRequest
- InternalServerException
- Raised when an unexpected error occurred during request processing.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ElasticInferenceException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default DescribeAcceleratorTypesResponse describeAcceleratorTypes(Consumer<DescribeAcceleratorTypesRequest.Builder> describeAcceleratorTypesRequest) throws InternalServerException, AwsServiceException, SdkClientException, ElasticInferenceException
Describes the accelerator types available in a given region, as well as their characteristics, such as memory and throughput.
This is a convenience which creates an instance of the DescribeAcceleratorTypesRequest.Builder
avoiding
the need to create one manually via DescribeAcceleratorTypesRequest.builder()
describeAcceleratorTypesRequest
- A Consumer
that will call methods on DescribeAcceleratorTypesRequest.Builder
to create a
request.InternalServerException
- Raised when an unexpected error occurred during request processing.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ElasticInferenceException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default DescribeAcceleratorsResponse describeAccelerators(DescribeAcceleratorsRequest describeAcceleratorsRequest) throws BadRequestException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, ElasticInferenceException
Describes information over a provided set of accelerators belonging to an account.
describeAcceleratorsRequest
- BadRequestException
- Raised when a malformed input has been provided to the API.ResourceNotFoundException
- Raised when the requested resource cannot be found.InternalServerException
- Raised when an unexpected error occurred during request processing.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ElasticInferenceException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default DescribeAcceleratorsResponse describeAccelerators(Consumer<DescribeAcceleratorsRequest.Builder> describeAcceleratorsRequest) throws BadRequestException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, ElasticInferenceException
Describes information over a provided set of accelerators belonging to an account.
This is a convenience which creates an instance of the DescribeAcceleratorsRequest.Builder
avoiding the
need to create one manually via DescribeAcceleratorsRequest.builder()
describeAcceleratorsRequest
- A Consumer
that will call methods on DescribeAcceleratorsRequest.Builder
to create a
request.BadRequestException
- Raised when a malformed input has been provided to the API.ResourceNotFoundException
- Raised when the requested resource cannot be found.InternalServerException
- Raised when an unexpected error occurred during request processing.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ElasticInferenceException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default DescribeAcceleratorsIterable describeAcceleratorsPaginator(DescribeAcceleratorsRequest describeAcceleratorsRequest) throws BadRequestException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, ElasticInferenceException
Describes information over a provided set of accelerators belonging to an account.
This is a variant of
describeAccelerators(software.amazon.awssdk.services.elasticinference.model.DescribeAcceleratorsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.elasticinference.paginators.DescribeAcceleratorsIterable responses = client.describeAcceleratorsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{ @code software.amazon.awssdk.services.elasticinference.paginators.DescribeAcceleratorsIterable responses = client .describeAcceleratorsPaginator(request); for (software.amazon.awssdk.services.elasticinference.model.DescribeAcceleratorsResponse response : responses) { // do something; } }3) Use iterator directly
software.amazon.awssdk.services.elasticinference.paginators.DescribeAcceleratorsIterable responses = client.describeAcceleratorsPaginator(request);
responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
describeAccelerators(software.amazon.awssdk.services.elasticinference.model.DescribeAcceleratorsRequest)
operation.
describeAcceleratorsRequest
- BadRequestException
- Raised when a malformed input has been provided to the API.ResourceNotFoundException
- Raised when the requested resource cannot be found.InternalServerException
- Raised when an unexpected error occurred during request processing.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ElasticInferenceException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default DescribeAcceleratorsIterable describeAcceleratorsPaginator(Consumer<DescribeAcceleratorsRequest.Builder> describeAcceleratorsRequest) throws BadRequestException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, ElasticInferenceException
Describes information over a provided set of accelerators belonging to an account.
This is a variant of
describeAccelerators(software.amazon.awssdk.services.elasticinference.model.DescribeAcceleratorsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.elasticinference.paginators.DescribeAcceleratorsIterable responses = client.describeAcceleratorsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{ @code software.amazon.awssdk.services.elasticinference.paginators.DescribeAcceleratorsIterable responses = client .describeAcceleratorsPaginator(request); for (software.amazon.awssdk.services.elasticinference.model.DescribeAcceleratorsResponse response : responses) { // do something; } }3) Use iterator directly
software.amazon.awssdk.services.elasticinference.paginators.DescribeAcceleratorsIterable responses = client.describeAcceleratorsPaginator(request);
responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
describeAccelerators(software.amazon.awssdk.services.elasticinference.model.DescribeAcceleratorsRequest)
operation.
This is a convenience which creates an instance of the DescribeAcceleratorsRequest.Builder
avoiding the
need to create one manually via DescribeAcceleratorsRequest.builder()
describeAcceleratorsRequest
- A Consumer
that will call methods on DescribeAcceleratorsRequest.Builder
to create a
request.BadRequestException
- Raised when a malformed input has been provided to the API.ResourceNotFoundException
- Raised when the requested resource cannot be found.InternalServerException
- Raised when an unexpected error occurred during request processing.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ElasticInferenceException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws BadRequestException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, ElasticInferenceException
Returns all tags of an Elastic Inference Accelerator.
listTagsForResourceRequest
- BadRequestException
- Raised when a malformed input has been provided to the API.ResourceNotFoundException
- Raised when the requested resource cannot be found.InternalServerException
- Raised when an unexpected error occurred during request processing.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ElasticInferenceException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default ListTagsForResourceResponse listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) throws BadRequestException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, ElasticInferenceException
Returns all tags of an Elastic Inference Accelerator.
This is a convenience which creates an instance of the ListTagsForResourceRequest.Builder
avoiding the
need to create one manually via ListTagsForResourceRequest.builder()
listTagsForResourceRequest
- A Consumer
that will call methods on ListTagsForResourceRequest.Builder
to create a
request.BadRequestException
- Raised when a malformed input has been provided to the API.ResourceNotFoundException
- Raised when the requested resource cannot be found.InternalServerException
- Raised when an unexpected error occurred during request processing.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ElasticInferenceException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws BadRequestException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, ElasticInferenceException
Adds the specified tags to an Elastic Inference Accelerator.
tagResourceRequest
- BadRequestException
- Raised when a malformed input has been provided to the API.ResourceNotFoundException
- Raised when the requested resource cannot be found.InternalServerException
- Raised when an unexpected error occurred during request processing.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ElasticInferenceException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default TagResourceResponse tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) throws BadRequestException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, ElasticInferenceException
Adds the specified tags to an Elastic Inference Accelerator.
This is a convenience which creates an instance of the TagResourceRequest.Builder
avoiding the need to
create one manually via TagResourceRequest.builder()
tagResourceRequest
- A Consumer
that will call methods on TagResourceRequest.Builder
to create a request.BadRequestException
- Raised when a malformed input has been provided to the API.ResourceNotFoundException
- Raised when the requested resource cannot be found.InternalServerException
- Raised when an unexpected error occurred during request processing.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ElasticInferenceException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws BadRequestException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, ElasticInferenceException
Removes the specified tags from an Elastic Inference Accelerator.
untagResourceRequest
- BadRequestException
- Raised when a malformed input has been provided to the API.ResourceNotFoundException
- Raised when the requested resource cannot be found.InternalServerException
- Raised when an unexpected error occurred during request processing.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ElasticInferenceException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default UntagResourceResponse untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) throws BadRequestException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, ElasticInferenceException
Removes the specified tags from an Elastic Inference Accelerator.
This is a convenience which creates an instance of the UntagResourceRequest.Builder
avoiding the need to
create one manually via UntagResourceRequest.builder()
untagResourceRequest
- A Consumer
that will call methods on UntagResourceRequest.Builder
to create a request.BadRequestException
- Raised when a malformed input has been provided to the API.ResourceNotFoundException
- Raised when the requested resource cannot be found.InternalServerException
- Raised when an unexpected error occurred during request processing.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ElasticInferenceException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
static ServiceMetadata serviceMetadata()