Struct aws_sdk_emrserverless::client::Client
source · [−]pub struct Client { /* private fields */ }
Expand description
Client for EMR Serverless
Client for invoking operations on EMR Serverless. Each operation on EMR Serverless is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
Examples
Constructing a client and invoking an operation
// create a shared configuration. This can be used & shared between multiple service clients.
let shared_config = aws_config::load_from_env().await;
let client = aws_sdk_emrserverless::Client::new(&shared_config);
// invoke an operation
/* let rsp = client
.<operation_name>().
.<param>("some value")
.send().await; */
Constructing a client with custom configuration
use aws_config::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_emrserverless::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_emrserverless::Client::from_conf(config);
Implementations
sourceimpl Client
impl Client
sourcepub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
pub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
Creates a client with the given service configuration.
sourceimpl Client
impl Client
sourcepub fn cancel_job_run(&self) -> CancelJobRun
pub fn cancel_job_run(&self) -> CancelJobRun
Constructs a fluent builder for the CancelJobRun
operation.
- The fluent builder is configurable:
application_id(impl Into<String>)
/set_application_id(Option<String>)
:The ID of the application on which the job run will be canceled.
job_run_id(impl Into<String>)
/set_job_run_id(Option<String>)
:The ID of the job run to cancel.
- On success, responds with
CancelJobRunOutput
with field(s):application_id(Option<String>)
:The output contains the application ID on which the job run is cancelled.
job_run_id(Option<String>)
:The output contains the ID of the cancelled job run.
- On failure, responds with
SdkError<CancelJobRunError>
sourcepub fn create_application(&self) -> CreateApplication
pub fn create_application(&self) -> CreateApplication
Constructs a fluent builder for the CreateApplication
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:The name of the application.
release_label(impl Into<String>)
/set_release_label(Option<String>)
:The EMR release version associated with the application.
r#type(impl Into<String>)
/set_type(Option<String>)
:The type of application you want to start, such as Spark or Hive.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:The client idempotency token of the application to create. Its value must be unique for each request.
initial_capacity(HashMap<String, InitialCapacityConfig>)
/set_initial_capacity(Option<HashMap<String, InitialCapacityConfig>>)
:The capacity to initialize when the application is created.
maximum_capacity(MaximumAllowedResources)
/set_maximum_capacity(Option<MaximumAllowedResources>)
:The maximum capacity to allocate when the application is created. This is cumulative across all workers at any given point in time, not just when an application is created. No new resources will be created once any one of the defined limits is hit.
tags(HashMap<String, String>)
/set_tags(Option<HashMap<String, String>>)
:The tags assigned to the application.
auto_start_configuration(AutoStartConfig)
/set_auto_start_configuration(Option<AutoStartConfig>)
:The configuration for an application to automatically start on job submission.
auto_stop_configuration(AutoStopConfig)
/set_auto_stop_configuration(Option<AutoStopConfig>)
:The configuration for an application to automatically stop after a certain amount of time being idle.
network_configuration(NetworkConfiguration)
/set_network_configuration(Option<NetworkConfiguration>)
:The network configuration for customer VPC connectivity.
- On success, responds with
CreateApplicationOutput
with field(s):application_id(Option<String>)
:The output contains the application ID.
name(Option<String>)
:The output contains the name of the application.
arn(Option<String>)
:The output contains the ARN of the application.
- On failure, responds with
SdkError<CreateApplicationError>
sourcepub fn delete_application(&self) -> DeleteApplication
pub fn delete_application(&self) -> DeleteApplication
Constructs a fluent builder for the DeleteApplication
operation.
- The fluent builder is configurable:
application_id(impl Into<String>)
/set_application_id(Option<String>)
:The ID of the application that will be deleted.
- On success, responds with
DeleteApplicationOutput
- On failure, responds with
SdkError<DeleteApplicationError>
sourcepub fn get_application(&self) -> GetApplication
pub fn get_application(&self) -> GetApplication
Constructs a fluent builder for the GetApplication
operation.
- The fluent builder is configurable:
application_id(impl Into<String>)
/set_application_id(Option<String>)
:The ID of the application that will be described.
- On success, responds with
GetApplicationOutput
with field(s):application(Option<Application>)
:The output displays information about the specified application.
- On failure, responds with
SdkError<GetApplicationError>
sourcepub fn get_job_run(&self) -> GetJobRun
pub fn get_job_run(&self) -> GetJobRun
Constructs a fluent builder for the GetJobRun
operation.
- The fluent builder is configurable:
application_id(impl Into<String>)
/set_application_id(Option<String>)
:The ID of the application on which the job run is submitted.
job_run_id(impl Into<String>)
/set_job_run_id(Option<String>)
:The ID of the job run.
- On success, responds with
GetJobRunOutput
with field(s):job_run(Option<JobRun>)
:The output displays information about the job run.
- On failure, responds with
SdkError<GetJobRunError>
sourcepub fn list_applications(&self) -> ListApplications
pub fn list_applications(&self) -> ListApplications
Constructs a fluent builder for the ListApplications
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token for the next set of application results.
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of applications that can be listed.
states(Vec<ApplicationState>)
/set_states(Option<Vec<ApplicationState>>)
:An optional filter for application states. Note that if this filter contains multiple states, the resulting list will be grouped by the state.
- On success, responds with
ListApplicationsOutput
with field(s):applications(Option<Vec<ApplicationSummary>>)
:The output lists the specified applications.
next_token(Option<String>)
:The output displays the token for the next set of application results. This is required for pagination and is available as a response of the previous request.
- On failure, responds with
SdkError<ListApplicationsError>
sourcepub fn list_job_runs(&self) -> ListJobRuns
pub fn list_job_runs(&self) -> ListJobRuns
Constructs a fluent builder for the ListJobRuns
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
application_id(impl Into<String>)
/set_application_id(Option<String>)
:The ID of the application for which to list the job run.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token for the next set of job run results.
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of job runs that can be listed.
created_at_after(DateTime)
/set_created_at_after(Option<DateTime>)
:The lower bound of the option to filter by creation date and time.
created_at_before(DateTime)
/set_created_at_before(Option<DateTime>)
:The upper bound of the option to filter by creation date and time.
states(Vec<JobRunState>)
/set_states(Option<Vec<JobRunState>>)
:An optional filter for job run states. Note that if this filter contains multiple states, the resulting list will be grouped by the state.
- On success, responds with
ListJobRunsOutput
with field(s):job_runs(Option<Vec<JobRunSummary>>)
:The output lists information about the specified job runs.
next_token(Option<String>)
:The output displays the token for the next set of job run results. This is required for pagination and is available as a response of the previous request.
- On failure, responds with
SdkError<ListJobRunsError>
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The Amazon Resource Name (ARN) that identifies the resource to list the tags for. Currently, the supported resources are Amazon EMR Serverless applications and job runs.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap<String, String>>)
:The tags for the resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
sourcepub fn start_application(&self) -> StartApplication
pub fn start_application(&self) -> StartApplication
Constructs a fluent builder for the StartApplication
operation.
- The fluent builder is configurable:
application_id(impl Into<String>)
/set_application_id(Option<String>)
:The ID of the application to start.
- On success, responds with
StartApplicationOutput
- On failure, responds with
SdkError<StartApplicationError>
sourcepub fn start_job_run(&self) -> StartJobRun
pub fn start_job_run(&self) -> StartJobRun
Constructs a fluent builder for the StartJobRun
operation.
- The fluent builder is configurable:
application_id(impl Into<String>)
/set_application_id(Option<String>)
:The ID of the application on which to run the job.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:The client idempotency token of the job run to start. Its value must be unique for each request.
execution_role_arn(impl Into<String>)
/set_execution_role_arn(Option<String>)
:The execution role ARN for the job run.
job_driver(JobDriver)
/set_job_driver(Option<JobDriver>)
:The job driver for the job run.
configuration_overrides(ConfigurationOverrides)
/set_configuration_overrides(Option<ConfigurationOverrides>)
:The configuration overrides for the job run.
tags(HashMap<String, String>)
/set_tags(Option<HashMap<String, String>>)
:The tags assigned to the job run.
execution_timeout_minutes(i64)
/set_execution_timeout_minutes(Option<i64>)
:The maximum duration for the job run to run. If the job run runs beyond this duration, it will be automatically cancelled.
name(impl Into<String>)
/set_name(Option<String>)
:The optional job run name. This doesn’t have to be unique.
- On success, responds with
StartJobRunOutput
with field(s):application_id(Option<String>)
:This output displays the application ID on which the job run was submitted.
job_run_id(Option<String>)
:The output contains the ID of the started job run.
arn(Option<String>)
:The output lists the execution role ARN of the job run.
- On failure, responds with
SdkError<StartJobRunError>
sourcepub fn stop_application(&self) -> StopApplication
pub fn stop_application(&self) -> StopApplication
Constructs a fluent builder for the StopApplication
operation.
- The fluent builder is configurable:
application_id(impl Into<String>)
/set_application_id(Option<String>)
:The ID of the application to stop.
- On success, responds with
StopApplicationOutput
- On failure, responds with
SdkError<StopApplicationError>
sourcepub fn tag_resource(&self) -> TagResource
pub fn tag_resource(&self) -> TagResource
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The Amazon Resource Name (ARN) that identifies the resource to list the tags for. Currently, the supported resources are Amazon EMR Serverless applications and job runs.
tags(HashMap<String, String>)
/set_tags(Option<HashMap<String, String>>)
:The tags to add to the resource. A tag is an array of key-value pairs.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
sourcepub fn untag_resource(&self) -> UntagResource
pub fn untag_resource(&self) -> UntagResource
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The Amazon Resource Name (ARN) that identifies the resource to list the tags for. Currently, the supported resources are Amazon EMR Serverless applications and job runs.
tag_keys(Vec<String>)
/set_tag_keys(Option<Vec<String>>)
:The keys of the tags to be removed.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
sourcepub fn update_application(&self) -> UpdateApplication
pub fn update_application(&self) -> UpdateApplication
Constructs a fluent builder for the UpdateApplication
operation.
- The fluent builder is configurable:
application_id(impl Into<String>)
/set_application_id(Option<String>)
:The ID of the application to update.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:The client idempotency token of the application to update. Its value must be unique for each request.
initial_capacity(HashMap<String, InitialCapacityConfig>)
/set_initial_capacity(Option<HashMap<String, InitialCapacityConfig>>)
:The capacity to initialize when the application is updated.
maximum_capacity(MaximumAllowedResources)
/set_maximum_capacity(Option<MaximumAllowedResources>)
:The maximum capacity to allocate when the application is updated. This is cumulative across all workers at any given point in time during the lifespan of the application. No new resources will be created once any one of the defined limits is hit.
auto_start_configuration(AutoStartConfig)
/set_auto_start_configuration(Option<AutoStartConfig>)
:The configuration for an application to automatically start on job submission.
auto_stop_configuration(AutoStopConfig)
/set_auto_stop_configuration(Option<AutoStopConfig>)
:The configuration for an application to automatically stop after a certain amount of time being idle.
network_configuration(NetworkConfiguration)
/set_network_configuration(Option<NetworkConfiguration>)
:The network configuration for customer VPC connectivity.
- On success, responds with
UpdateApplicationOutput
with field(s):application(Option<Application>)
:Information about the updated application.
- On failure, responds with
SdkError<UpdateApplicationError>
sourceimpl Client
impl Client
sourcepub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Selfwhere
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
pub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Selfwhere
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
Creates a client with the given service config and connector override.