@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface EmrServerlessClient extends AwsClient
builder() method.
Amazon EMR Serverless is a new deployment option for Amazon EMR. Amazon EMR Serverless provides a serverless runtime environment that simplifies running analytics applications using the latest open source frameworks such as Apache Spark and Apache Hive. With Amazon EMR Serverless, you don’t have to configure, optimize, secure, or operate clusters to run applications with these frameworks.
The API reference to Amazon EMR Serverless is emr-serverless. The emr-serverless prefix is
used in the following scenarios:
It is the prefix in the CLI commands for Amazon EMR Serverless. For example,
aws emr-serverless start-job-run.
It is the prefix before IAM policy actions for Amazon EMR Serverless. For example,
"Action": ["emr-serverless:StartJobRun"]. For more information, see Policy actions for Amazon EMR Serverless.
It is the prefix used in Amazon EMR Serverless service endpoints. For example,
emr-serverless.us-east-2.amazonaws.com.
| 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 EmrServerlessClientBuilder |
builder()
Create a builder that can be used to configure and create a
EmrServerlessClient. |
default CancelJobRunResponse |
cancelJobRun(CancelJobRunRequest cancelJobRunRequest)
Cancels a job run.
|
default CancelJobRunResponse |
cancelJobRun(Consumer<CancelJobRunRequest.Builder> cancelJobRunRequest)
Cancels a job run.
|
static EmrServerlessClient |
create()
Create a
EmrServerlessClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default CreateApplicationResponse |
createApplication(Consumer<CreateApplicationRequest.Builder> createApplicationRequest)
Creates an application.
|
default CreateApplicationResponse |
createApplication(CreateApplicationRequest createApplicationRequest)
Creates an application.
|
default DeleteApplicationResponse |
deleteApplication(Consumer<DeleteApplicationRequest.Builder> deleteApplicationRequest)
Deletes an application.
|
default DeleteApplicationResponse |
deleteApplication(DeleteApplicationRequest deleteApplicationRequest)
Deletes an application.
|
default GetApplicationResponse |
getApplication(Consumer<GetApplicationRequest.Builder> getApplicationRequest)
Displays detailed information about a specified application.
|
default GetApplicationResponse |
getApplication(GetApplicationRequest getApplicationRequest)
Displays detailed information about a specified application.
|
default GetDashboardForJobRunResponse |
getDashboardForJobRun(Consumer<GetDashboardForJobRunRequest.Builder> getDashboardForJobRunRequest)
Returns a URL to access the job run dashboard.
|
default GetDashboardForJobRunResponse |
getDashboardForJobRun(GetDashboardForJobRunRequest getDashboardForJobRunRequest)
Returns a URL to access the job run dashboard.
|
default GetJobRunResponse |
getJobRun(Consumer<GetJobRunRequest.Builder> getJobRunRequest)
Displays detailed information about a job run.
|
default GetJobRunResponse |
getJobRun(GetJobRunRequest getJobRunRequest)
Displays detailed information about a job run.
|
default ListApplicationsResponse |
listApplications(Consumer<ListApplicationsRequest.Builder> listApplicationsRequest)
Lists applications based on a set of parameters.
|
default ListApplicationsResponse |
listApplications(ListApplicationsRequest listApplicationsRequest)
Lists applications based on a set of parameters.
|
default ListApplicationsIterable |
listApplicationsPaginator(Consumer<ListApplicationsRequest.Builder> listApplicationsRequest)
Lists applications based on a set of parameters.
|
default ListApplicationsIterable |
listApplicationsPaginator(ListApplicationsRequest listApplicationsRequest)
Lists applications based on a set of parameters.
|
default ListJobRunsResponse |
listJobRuns(Consumer<ListJobRunsRequest.Builder> listJobRunsRequest)
Lists job runs based on a set of parameters.
|
default ListJobRunsResponse |
listJobRuns(ListJobRunsRequest listJobRunsRequest)
Lists job runs based on a set of parameters.
|
default ListJobRunsIterable |
listJobRunsPaginator(Consumer<ListJobRunsRequest.Builder> listJobRunsRequest)
Lists job runs based on a set of parameters.
|
default ListJobRunsIterable |
listJobRunsPaginator(ListJobRunsRequest listJobRunsRequest)
Lists job runs based on a set of parameters.
|
default ListTagsForResourceResponse |
listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)
Lists the tags assigned to the resources.
|
default ListTagsForResourceResponse |
listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
Lists the tags assigned to the resources.
|
default EmrServerlessServiceClientConfiguration |
serviceClientConfiguration() |
static ServiceMetadata |
serviceMetadata() |
default StartApplicationResponse |
startApplication(Consumer<StartApplicationRequest.Builder> startApplicationRequest)
Starts a specified application and initializes initial capacity if configured.
|
default StartApplicationResponse |
startApplication(StartApplicationRequest startApplicationRequest)
Starts a specified application and initializes initial capacity if configured.
|
default StartJobRunResponse |
startJobRun(Consumer<StartJobRunRequest.Builder> startJobRunRequest)
Starts a job run.
|
default StartJobRunResponse |
startJobRun(StartJobRunRequest startJobRunRequest)
Starts a job run.
|
default StopApplicationResponse |
stopApplication(Consumer<StopApplicationRequest.Builder> stopApplicationRequest)
Stops a specified application and releases initial capacity if configured.
|
default StopApplicationResponse |
stopApplication(StopApplicationRequest stopApplicationRequest)
Stops a specified application and releases initial capacity if configured.
|
default TagResourceResponse |
tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)
Assigns tags to resources.
|
default TagResourceResponse |
tagResource(TagResourceRequest tagResourceRequest)
Assigns tags to resources.
|
default UntagResourceResponse |
untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)
Removes tags from resources.
|
default UntagResourceResponse |
untagResource(UntagResourceRequest untagResourceRequest)
Removes tags from resources.
|
default UpdateApplicationResponse |
updateApplication(Consumer<UpdateApplicationRequest.Builder> updateApplicationRequest)
Updates a specified application.
|
default UpdateApplicationResponse |
updateApplication(UpdateApplicationRequest updateApplicationRequest)
Updates a specified application.
|
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.default CancelJobRunResponse cancelJobRun(CancelJobRunRequest cancelJobRunRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Cancels a job run.
cancelJobRunRequest - ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault CancelJobRunResponse cancelJobRun(Consumer<CancelJobRunRequest.Builder> cancelJobRunRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Cancels a job run.
This is a convenience which creates an instance of the CancelJobRunRequest.Builder avoiding the need to
create one manually via CancelJobRunRequest.builder()
cancelJobRunRequest - A Consumer that will call methods on CancelJobRunRequest.Builder to create a request.ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault CreateApplicationResponse createApplication(CreateApplicationRequest createApplicationRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, EmrServerlessException
Creates an application.
createApplicationRequest - ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.ConflictException - The request could not be processed because of conflict in the current state of the resource.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault CreateApplicationResponse createApplication(Consumer<CreateApplicationRequest.Builder> createApplicationRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, EmrServerlessException
Creates an application.
This is a convenience which creates an instance of the CreateApplicationRequest.Builder avoiding the need
to create one manually via CreateApplicationRequest.builder()
createApplicationRequest - A Consumer that will call methods on CreateApplicationRequest.Builder to create a request.ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.ConflictException - The request could not be processed because of conflict in the current state of the resource.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DeleteApplicationResponse deleteApplication(DeleteApplicationRequest deleteApplicationRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Deletes an application. An application has to be in a stopped or created state in order to be deleted.
deleteApplicationRequest - ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DeleteApplicationResponse deleteApplication(Consumer<DeleteApplicationRequest.Builder> deleteApplicationRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Deletes an application. An application has to be in a stopped or created state in order to be deleted.
This is a convenience which creates an instance of the DeleteApplicationRequest.Builder avoiding the need
to create one manually via DeleteApplicationRequest.builder()
deleteApplicationRequest - A Consumer that will call methods on DeleteApplicationRequest.Builder to create a request.ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetApplicationResponse getApplication(GetApplicationRequest getApplicationRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Displays detailed information about a specified application.
getApplicationRequest - ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetApplicationResponse getApplication(Consumer<GetApplicationRequest.Builder> getApplicationRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Displays detailed information about a specified application.
This is a convenience which creates an instance of the GetApplicationRequest.Builder avoiding the need to
create one manually via GetApplicationRequest.builder()
getApplicationRequest - A Consumer that will call methods on GetApplicationRequest.Builder to create a request.ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetDashboardForJobRunResponse getDashboardForJobRun(GetDashboardForJobRunRequest getDashboardForJobRunRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Returns a URL to access the job run dashboard. The generated URL is valid for one hour, after which you must invoke the API again to generate a new URL.
getDashboardForJobRunRequest - ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetDashboardForJobRunResponse getDashboardForJobRun(Consumer<GetDashboardForJobRunRequest.Builder> getDashboardForJobRunRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Returns a URL to access the job run dashboard. The generated URL is valid for one hour, after which you must invoke the API again to generate a new URL.
This is a convenience which creates an instance of the GetDashboardForJobRunRequest.Builder avoiding the
need to create one manually via GetDashboardForJobRunRequest.builder()
getDashboardForJobRunRequest - A Consumer that will call methods on GetDashboardForJobRunRequest.Builder to create a
request.ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetJobRunResponse getJobRun(GetJobRunRequest getJobRunRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Displays detailed information about a job run.
getJobRunRequest - ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetJobRunResponse getJobRun(Consumer<GetJobRunRequest.Builder> getJobRunRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Displays detailed information about a job run.
This is a convenience which creates an instance of the GetJobRunRequest.Builder avoiding the need to
create one manually via GetJobRunRequest.builder()
getJobRunRequest - A Consumer that will call methods on GetJobRunRequest.Builder to create a request.ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListApplicationsResponse listApplications(ListApplicationsRequest listApplicationsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Lists applications based on a set of parameters.
listApplicationsRequest - ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListApplicationsResponse listApplications(Consumer<ListApplicationsRequest.Builder> listApplicationsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Lists applications based on a set of parameters.
This is a convenience which creates an instance of the ListApplicationsRequest.Builder avoiding the need
to create one manually via ListApplicationsRequest.builder()
listApplicationsRequest - A Consumer that will call methods on ListApplicationsRequest.Builder to create a request.ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListApplicationsIterable listApplicationsPaginator(ListApplicationsRequest listApplicationsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Lists applications based on a set of parameters.
This is a variant of
listApplications(software.amazon.awssdk.services.emrserverless.model.ListApplicationsRequest) 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.emrserverless.paginators.ListApplicationsIterable responses = client.listApplicationsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.emrserverless.paginators.ListApplicationsIterable responses = client
.listApplicationsPaginator(request);
for (software.amazon.awssdk.services.emrserverless.model.ListApplicationsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.emrserverless.paginators.ListApplicationsIterable responses = client.listApplicationsPaginator(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
listApplications(software.amazon.awssdk.services.emrserverless.model.ListApplicationsRequest)
operation.
listApplicationsRequest - ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListApplicationsIterable listApplicationsPaginator(Consumer<ListApplicationsRequest.Builder> listApplicationsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Lists applications based on a set of parameters.
This is a variant of
listApplications(software.amazon.awssdk.services.emrserverless.model.ListApplicationsRequest) 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.emrserverless.paginators.ListApplicationsIterable responses = client.listApplicationsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.emrserverless.paginators.ListApplicationsIterable responses = client
.listApplicationsPaginator(request);
for (software.amazon.awssdk.services.emrserverless.model.ListApplicationsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.emrserverless.paginators.ListApplicationsIterable responses = client.listApplicationsPaginator(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
listApplications(software.amazon.awssdk.services.emrserverless.model.ListApplicationsRequest)
operation.
This is a convenience which creates an instance of the ListApplicationsRequest.Builder avoiding the need
to create one manually via ListApplicationsRequest.builder()
listApplicationsRequest - A Consumer that will call methods on ListApplicationsRequest.Builder to create a request.ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListJobRunsResponse listJobRuns(ListJobRunsRequest listJobRunsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Lists job runs based on a set of parameters.
listJobRunsRequest - ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListJobRunsResponse listJobRuns(Consumer<ListJobRunsRequest.Builder> listJobRunsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Lists job runs based on a set of parameters.
This is a convenience which creates an instance of the ListJobRunsRequest.Builder avoiding the need to
create one manually via ListJobRunsRequest.builder()
listJobRunsRequest - A Consumer that will call methods on ListJobRunsRequest.Builder to create a request.ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListJobRunsIterable listJobRunsPaginator(ListJobRunsRequest listJobRunsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Lists job runs based on a set of parameters.
This is a variant of listJobRuns(software.amazon.awssdk.services.emrserverless.model.ListJobRunsRequest)
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.emrserverless.paginators.ListJobRunsIterable responses = client.listJobRunsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.emrserverless.paginators.ListJobRunsIterable responses = client.listJobRunsPaginator(request);
for (software.amazon.awssdk.services.emrserverless.model.ListJobRunsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.emrserverless.paginators.ListJobRunsIterable responses = client.listJobRunsPaginator(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
listJobRuns(software.amazon.awssdk.services.emrserverless.model.ListJobRunsRequest) operation.
listJobRunsRequest - ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListJobRunsIterable listJobRunsPaginator(Consumer<ListJobRunsRequest.Builder> listJobRunsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Lists job runs based on a set of parameters.
This is a variant of listJobRuns(software.amazon.awssdk.services.emrserverless.model.ListJobRunsRequest)
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.emrserverless.paginators.ListJobRunsIterable responses = client.listJobRunsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.emrserverless.paginators.ListJobRunsIterable responses = client.listJobRunsPaginator(request);
for (software.amazon.awssdk.services.emrserverless.model.ListJobRunsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.emrserverless.paginators.ListJobRunsIterable responses = client.listJobRunsPaginator(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
listJobRuns(software.amazon.awssdk.services.emrserverless.model.ListJobRunsRequest) operation.
This is a convenience which creates an instance of the ListJobRunsRequest.Builder avoiding the need to
create one manually via ListJobRunsRequest.builder()
listJobRunsRequest - A Consumer that will call methods on ListJobRunsRequest.Builder to create a request.ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Lists the tags assigned to the resources.
listTagsForResourceRequest - ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListTagsForResourceResponse listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Lists the tags assigned to the resources.
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.ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault StartApplicationResponse startApplication(StartApplicationRequest startApplicationRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, EmrServerlessException
Starts a specified application and initializes initial capacity if configured.
startApplicationRequest - ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.ServiceQuotaExceededException - The maximum number of resources per account has been reached.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault StartApplicationResponse startApplication(Consumer<StartApplicationRequest.Builder> startApplicationRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, EmrServerlessException
Starts a specified application and initializes initial capacity if configured.
This is a convenience which creates an instance of the StartApplicationRequest.Builder avoiding the need
to create one manually via StartApplicationRequest.builder()
startApplicationRequest - A Consumer that will call methods on StartApplicationRequest.Builder to create a request.ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.ServiceQuotaExceededException - The maximum number of resources per account has been reached.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault StartJobRunResponse startJobRun(StartJobRunRequest startJobRunRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, EmrServerlessException
Starts a job run.
startJobRunRequest - ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.ConflictException - The request could not be processed because of conflict in the current state of the resource.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault StartJobRunResponse startJobRun(Consumer<StartJobRunRequest.Builder> startJobRunRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, EmrServerlessException
Starts a job run.
This is a convenience which creates an instance of the StartJobRunRequest.Builder avoiding the need to
create one manually via StartJobRunRequest.builder()
startJobRunRequest - A Consumer that will call methods on StartJobRunRequest.Builder to create a request.ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.ConflictException - The request could not be processed because of conflict in the current state of the resource.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault StopApplicationResponse stopApplication(StopApplicationRequest stopApplicationRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Stops a specified application and releases initial capacity if configured. All scheduled and running jobs must be completed or cancelled before stopping an application.
stopApplicationRequest - ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault StopApplicationResponse stopApplication(Consumer<StopApplicationRequest.Builder> stopApplicationRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Stops a specified application and releases initial capacity if configured. All scheduled and running jobs must be completed or cancelled before stopping an application.
This is a convenience which creates an instance of the StopApplicationRequest.Builder avoiding the need
to create one manually via StopApplicationRequest.builder()
stopApplicationRequest - A Consumer that will call methods on StopApplicationRequest.Builder to create a request.ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Assigns tags to resources. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key and an optional value, both of which you define. Tags enable you to categorize your Amazon Web Services resources by attributes such as purpose, owner, or environment. When you have many resources of the same type, you can quickly identify a specific resource based on the tags you've assigned to it.
tagResourceRequest - ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault TagResourceResponse tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Assigns tags to resources. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key and an optional value, both of which you define. Tags enable you to categorize your Amazon Web Services resources by attributes such as purpose, owner, or environment. When you have many resources of the same type, you can quickly identify a specific resource based on the tags you've assigned to it.
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.ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Removes tags from resources.
untagResourceRequest - ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UntagResourceResponse untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Removes tags from resources.
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.ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UpdateApplicationResponse updateApplication(UpdateApplicationRequest updateApplicationRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Updates a specified application. An application has to be in a stopped or created state in order to be updated.
updateApplicationRequest - ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UpdateApplicationResponse updateApplication(Consumer<UpdateApplicationRequest.Builder> updateApplicationRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, EmrServerlessException
Updates a specified application. An application has to be in a stopped or created state in order to be updated.
This is a convenience which creates an instance of the UpdateApplicationRequest.Builder avoiding the need
to create one manually via UpdateApplicationRequest.builder()
updateApplicationRequest - A Consumer that will call methods on UpdateApplicationRequest.Builder to create a request.ValidationException - The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException - The specified resource was not found.InternalServerException - Request processing failed because of an error or failure with the service.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.EmrServerlessException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptionstatic EmrServerlessClient create()
EmrServerlessClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static EmrServerlessClientBuilder builder()
EmrServerlessClient.static ServiceMetadata serviceMetadata()
default EmrServerlessServiceClientConfiguration serviceClientConfiguration()
serviceClientConfiguration in interface AwsClientserviceClientConfiguration in interface SdkClientCopyright © 2023. All rights reserved.