Struct aws_sdk_emrcontainers::Client
source · pub struct Client { /* private fields */ }Expand description
Client for Amazon EMR Containers
Client for invoking operations on Amazon EMR Containers. Each operation on Amazon EMR Containers is a method on this
this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.
Constructing a Client
A Config is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env() instead, which returns a ConfigLoader that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_emrcontainers::Client::new(&config);Occasionally, SDKs may have additional service-specific that can be set on the Config that
is absent from SdkConfig, or slightly different settings for a specific client may be desired.
The Config struct implements From<&SdkConfig>, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_emrcontainers::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();See the aws-config docs and Config for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
Using the Client
A client has a function for every operation that can be performed by the service.
For example, the CancelJobRun operation has
a Client::cancel_job_run, function which returns a builder for that operation.
The fluent builder ultimately has a send() function that returns an async future that
returns a result, as illustrated below:
let result = client.cancel_job_run()
.id("example")
.send()
.await;The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize module for more
information.
Implementations§
source§impl Client
impl Client
sourcepub fn cancel_job_run(&self) -> CancelJobRunFluentBuilder
pub fn cancel_job_run(&self) -> CancelJobRunFluentBuilder
Constructs a fluent builder for the CancelJobRun operation.
- The fluent builder is configurable:
id(impl Into<String>)/set_id(Option<String>):The ID of the job run to cancel.
virtual_cluster_id(impl Into<String>)/set_virtual_cluster_id(Option<String>):The ID of the virtual cluster for which the job run will be canceled.
- On success, responds with
CancelJobRunOutputwith field(s):id(Option<String>):The output contains the ID of the cancelled job run.
virtual_cluster_id(Option<String>):The output contains the virtual cluster ID for which the job run is cancelled.
- On failure, responds with
SdkError<CancelJobRunError>
source§impl Client
impl Client
sourcepub fn create_job_template(&self) -> CreateJobTemplateFluentBuilder
pub fn create_job_template(&self) -> CreateJobTemplateFluentBuilder
Constructs a fluent builder for the CreateJobTemplate operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):The specified name of the job template.
client_token(impl Into<String>)/set_client_token(Option<String>):The client token of the job template.
job_template_data(JobTemplateData)/set_job_template_data(Option<JobTemplateData>):The job template data which holds values of StartJobRun API request.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap<String, String>>):The tags that are associated with the job template.
kms_key_arn(impl Into<String>)/set_kms_key_arn(Option<String>):The KMS key ARN used to encrypt the job template.
- On success, responds with
CreateJobTemplateOutputwith field(s):id(Option<String>):This output display the created job template ID.
name(Option<String>):This output displays the name of the created job template.
arn(Option<String>):This output display the ARN of the created job template.
created_at(Option<DateTime>):This output displays the date and time when the job template was created.
- On failure, responds with
SdkError<CreateJobTemplateError>
source§impl Client
impl Client
sourcepub fn create_managed_endpoint(&self) -> CreateManagedEndpointFluentBuilder
pub fn create_managed_endpoint(&self) -> CreateManagedEndpointFluentBuilder
Constructs a fluent builder for the CreateManagedEndpoint operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):The name of the managed endpoint.
virtual_cluster_id(impl Into<String>)/set_virtual_cluster_id(Option<String>):The ID of the virtual cluster for which a managed endpoint is created.
r#type(impl Into<String>)/set_type(Option<String>):The type of the managed endpoint.
release_label(impl Into<String>)/set_release_label(Option<String>):The Amazon EMR release version.
execution_role_arn(impl Into<String>)/set_execution_role_arn(Option<String>):The ARN of the execution role.
certificate_arn(impl Into<String>)/set_certificate_arn(Option<String>):The certificate ARN provided by users for the managed endpoint. This field is under deprecation and will be removed in future releases.
configuration_overrides(ConfigurationOverrides)/set_configuration_overrides(Option<ConfigurationOverrides>):The configuration settings that will be used to override existing configurations.
client_token(impl Into<String>)/set_client_token(Option<String>):The client idempotency token for this create call.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap<String, String>>):The tags of the managed endpoint.
- On success, responds with
CreateManagedEndpointOutputwith field(s):id(Option<String>):The output contains the ID of the managed endpoint.
name(Option<String>):The output contains the name of the managed endpoint.
arn(Option<String>):The output contains the ARN of the managed endpoint.
virtual_cluster_id(Option<String>):The output contains the ID of the virtual cluster.
- On failure, responds with
SdkError<CreateManagedEndpointError>
source§impl Client
impl Client
sourcepub fn create_virtual_cluster(&self) -> CreateVirtualClusterFluentBuilder
pub fn create_virtual_cluster(&self) -> CreateVirtualClusterFluentBuilder
Constructs a fluent builder for the CreateVirtualCluster operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):The specified name of the virtual cluster.
container_provider(ContainerProvider)/set_container_provider(Option<ContainerProvider>):The container provider of the virtual cluster.
client_token(impl Into<String>)/set_client_token(Option<String>):The client token of the virtual cluster.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap<String, String>>):The tags assigned to the virtual cluster.
- On success, responds with
CreateVirtualClusterOutputwith field(s):id(Option<String>):This output contains the virtual cluster ID.
name(Option<String>):This output contains the name of the virtual cluster.
arn(Option<String>):This output contains the ARN of virtual cluster.
- On failure, responds with
SdkError<CreateVirtualClusterError>
source§impl Client
impl Client
sourcepub fn delete_job_template(&self) -> DeleteJobTemplateFluentBuilder
pub fn delete_job_template(&self) -> DeleteJobTemplateFluentBuilder
Constructs a fluent builder for the DeleteJobTemplate operation.
- The fluent builder is configurable:
id(impl Into<String>)/set_id(Option<String>):The ID of the job template that will be deleted.
- On success, responds with
DeleteJobTemplateOutputwith field(s):id(Option<String>):This output contains the ID of the job template that was deleted.
- On failure, responds with
SdkError<DeleteJobTemplateError>
source§impl Client
impl Client
sourcepub fn delete_managed_endpoint(&self) -> DeleteManagedEndpointFluentBuilder
pub fn delete_managed_endpoint(&self) -> DeleteManagedEndpointFluentBuilder
Constructs a fluent builder for the DeleteManagedEndpoint operation.
- The fluent builder is configurable:
id(impl Into<String>)/set_id(Option<String>):The ID of the managed endpoint.
virtual_cluster_id(impl Into<String>)/set_virtual_cluster_id(Option<String>):The ID of the endpoint’s virtual cluster.
- On success, responds with
DeleteManagedEndpointOutputwith field(s):id(Option<String>):The output displays the ID of the managed endpoint.
virtual_cluster_id(Option<String>):The output displays the ID of the endpoint’s virtual cluster.
- On failure, responds with
SdkError<DeleteManagedEndpointError>
source§impl Client
impl Client
sourcepub fn delete_virtual_cluster(&self) -> DeleteVirtualClusterFluentBuilder
pub fn delete_virtual_cluster(&self) -> DeleteVirtualClusterFluentBuilder
Constructs a fluent builder for the DeleteVirtualCluster operation.
- The fluent builder is configurable:
id(impl Into<String>)/set_id(Option<String>):The ID of the virtual cluster that will be deleted.
- On success, responds with
DeleteVirtualClusterOutputwith field(s):id(Option<String>):This output contains the ID of the virtual cluster that will be deleted.
- On failure, responds with
SdkError<DeleteVirtualClusterError>
source§impl Client
impl Client
sourcepub fn describe_job_run(&self) -> DescribeJobRunFluentBuilder
pub fn describe_job_run(&self) -> DescribeJobRunFluentBuilder
Constructs a fluent builder for the DescribeJobRun operation.
- The fluent builder is configurable:
id(impl Into<String>)/set_id(Option<String>):The ID of the job run request.
virtual_cluster_id(impl Into<String>)/set_virtual_cluster_id(Option<String>):The ID of the virtual cluster for which the job run is submitted.
- On success, responds with
DescribeJobRunOutputwith field(s):job_run(Option<JobRun>):The output displays information about a job run.
- On failure, responds with
SdkError<DescribeJobRunError>
source§impl Client
impl Client
sourcepub fn describe_job_template(&self) -> DescribeJobTemplateFluentBuilder
pub fn describe_job_template(&self) -> DescribeJobTemplateFluentBuilder
Constructs a fluent builder for the DescribeJobTemplate operation.
- The fluent builder is configurable:
id(impl Into<String>)/set_id(Option<String>):The ID of the job template that will be described.
- On success, responds with
DescribeJobTemplateOutputwith field(s):job_template(Option<JobTemplate>):This output displays information about the specified job template.
- On failure, responds with
SdkError<DescribeJobTemplateError>
source§impl Client
impl Client
sourcepub fn describe_managed_endpoint(&self) -> DescribeManagedEndpointFluentBuilder
pub fn describe_managed_endpoint(&self) -> DescribeManagedEndpointFluentBuilder
Constructs a fluent builder for the DescribeManagedEndpoint operation.
- The fluent builder is configurable:
id(impl Into<String>)/set_id(Option<String>):This output displays ID of the managed endpoint.
virtual_cluster_id(impl Into<String>)/set_virtual_cluster_id(Option<String>):The ID of the endpoint’s virtual cluster.
- On success, responds with
DescribeManagedEndpointOutputwith field(s):endpoint(Option<Endpoint>):This output displays information about a managed endpoint.
- On failure, responds with
SdkError<DescribeManagedEndpointError>
source§impl Client
impl Client
sourcepub fn describe_virtual_cluster(&self) -> DescribeVirtualClusterFluentBuilder
pub fn describe_virtual_cluster(&self) -> DescribeVirtualClusterFluentBuilder
Constructs a fluent builder for the DescribeVirtualCluster operation.
- The fluent builder is configurable:
id(impl Into<String>)/set_id(Option<String>):The ID of the virtual cluster that will be described.
- On success, responds with
DescribeVirtualClusterOutputwith field(s):virtual_cluster(Option<VirtualCluster>):This output displays information about the specified virtual cluster.
- On failure, responds with
SdkError<DescribeVirtualClusterError>
source§impl Client
impl Client
sourcepub fn get_managed_endpoint_session_credentials(
&self
) -> GetManagedEndpointSessionCredentialsFluentBuilder
pub fn get_managed_endpoint_session_credentials( &self ) -> GetManagedEndpointSessionCredentialsFluentBuilder
Constructs a fluent builder for the GetManagedEndpointSessionCredentials operation.
- The fluent builder is configurable:
endpoint_identifier(impl Into<String>)/set_endpoint_identifier(Option<String>):The ARN of the managed endpoint for which the request is submitted.
virtual_cluster_identifier(impl Into<String>)/set_virtual_cluster_identifier(Option<String>):The ARN of the Virtual Cluster which the Managed Endpoint belongs to.
execution_role_arn(impl Into<String>)/set_execution_role_arn(Option<String>):The IAM Execution Role ARN that will be used by the job run.
credential_type(impl Into<String>)/set_credential_type(Option<String>):Type of the token requested. Currently supported and default value of this field is “TOKEN.”
duration_in_seconds(i32)/set_duration_in_seconds(Option<i32>):Duration in seconds for which the session token is valid. The default duration is 15 minutes and the maximum is 12 hours.
log_context(impl Into<String>)/set_log_context(Option<String>):String identifier used to separate sections of the execution logs uploaded to S3.
client_token(impl Into<String>)/set_client_token(Option<String>):The client idempotency token of the job run request.
- On success, responds with
GetManagedEndpointSessionCredentialsOutputwith field(s):id(Option<String>):The identifier of the session token returned.
credentials(Option<Credentials>):The structure containing the session credentials.
expires_at(Option<DateTime>):The date and time when the session token will expire.
- On failure, responds with
SdkError<GetManagedEndpointSessionCredentialsError>
source§impl Client
impl Client
sourcepub fn list_job_runs(&self) -> ListJobRunsFluentBuilder
pub fn list_job_runs(&self) -> ListJobRunsFluentBuilder
Constructs a fluent builder for the ListJobRuns operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
virtual_cluster_id(impl Into<String>)/set_virtual_cluster_id(Option<String>):The ID of the virtual cluster for which to list the job run.
created_before(DateTime)/set_created_before(Option<DateTime>):The date and time before which the job runs were submitted.
created_after(DateTime)/set_created_after(Option<DateTime>):The date and time after which the job runs were submitted.
name(impl Into<String>)/set_name(Option<String>):The name of the job run.
states(JobRunState)/set_states(Option<Vec<JobRunState>>):The states of the job run.
max_results(i32)/set_max_results(Option<i32>):The maximum number of job runs that can be listed.
next_token(impl Into<String>)/set_next_token(Option<String>):The token for the next set of job runs to return.
- On success, responds with
ListJobRunsOutputwith field(s):job_runs(Option<Vec<JobRun>>):This output lists information about the specified job runs.
next_token(Option<String>):This output displays the token for the next set of job runs.
- On failure, responds with
SdkError<ListJobRunsError>
source§impl Client
impl Client
sourcepub fn list_job_templates(&self) -> ListJobTemplatesFluentBuilder
pub fn list_job_templates(&self) -> ListJobTemplatesFluentBuilder
Constructs a fluent builder for the ListJobTemplates operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
created_after(DateTime)/set_created_after(Option<DateTime>):The date and time after which the job templates were created.
created_before(DateTime)/set_created_before(Option<DateTime>):The date and time before which the job templates were created.
max_results(i32)/set_max_results(Option<i32>):The maximum number of job templates that can be listed.
next_token(impl Into<String>)/set_next_token(Option<String>):The token for the next set of job templates to return.
- On success, responds with
ListJobTemplatesOutputwith field(s):templates(Option<Vec<JobTemplate>>):This output lists information about the specified job templates.
next_token(Option<String>):This output displays the token for the next set of job templates.
- On failure, responds with
SdkError<ListJobTemplatesError>
source§impl Client
impl Client
sourcepub fn list_managed_endpoints(&self) -> ListManagedEndpointsFluentBuilder
pub fn list_managed_endpoints(&self) -> ListManagedEndpointsFluentBuilder
Constructs a fluent builder for the ListManagedEndpoints operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
virtual_cluster_id(impl Into<String>)/set_virtual_cluster_id(Option<String>):The ID of the virtual cluster.
created_before(DateTime)/set_created_before(Option<DateTime>):The date and time before which the endpoints are created.
created_after(DateTime)/set_created_after(Option<DateTime>):The date and time after which the endpoints are created.
types(impl Into<String>)/set_types(Option<Vec<String>>):The types of the managed endpoints.
states(EndpointState)/set_states(Option<Vec<EndpointState>>):The states of the managed endpoints.
max_results(i32)/set_max_results(Option<i32>):The maximum number of managed endpoints that can be listed.
next_token(impl Into<String>)/set_next_token(Option<String>):The token for the next set of managed endpoints to return.
- On success, responds with
ListManagedEndpointsOutputwith field(s):endpoints(Option<Vec<Endpoint>>):The managed endpoints to be listed.
next_token(Option<String>):The token for the next set of endpoints to return.
- On failure, responds with
SdkError<ListManagedEndpointsError>
source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):The ARN of tagged resources.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<HashMap<String, String>>):The tags assigned to resources.
- On failure, responds with
SdkError<ListTagsForResourceError>
source§impl Client
impl Client
sourcepub fn list_virtual_clusters(&self) -> ListVirtualClustersFluentBuilder
pub fn list_virtual_clusters(&self) -> ListVirtualClustersFluentBuilder
Constructs a fluent builder for the ListVirtualClusters operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
container_provider_id(impl Into<String>)/set_container_provider_id(Option<String>):The container provider ID of the virtual cluster.
container_provider_type(ContainerProviderType)/set_container_provider_type(Option<ContainerProviderType>):The container provider type of the virtual cluster. Amazon EKS is the only supported type as of now.
created_after(DateTime)/set_created_after(Option<DateTime>):The date and time after which the virtual clusters are created.
created_before(DateTime)/set_created_before(Option<DateTime>):The date and time before which the virtual clusters are created.
states(VirtualClusterState)/set_states(Option<Vec<VirtualClusterState>>):The states of the requested virtual clusters.
max_results(i32)/set_max_results(Option<i32>):The maximum number of virtual clusters that can be listed.
next_token(impl Into<String>)/set_next_token(Option<String>):The token for the next set of virtual clusters to return.
- On success, responds with
ListVirtualClustersOutputwith field(s):virtual_clusters(Option<Vec<VirtualCluster>>):This output lists the specified virtual clusters.
next_token(Option<String>):This output displays the token for the next set of virtual clusters.
- On failure, responds with
SdkError<ListVirtualClustersError>
source§impl Client
impl Client
sourcepub fn start_job_run(&self) -> StartJobRunFluentBuilder
pub fn start_job_run(&self) -> StartJobRunFluentBuilder
Constructs a fluent builder for the StartJobRun operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):The name of the job run.
virtual_cluster_id(impl Into<String>)/set_virtual_cluster_id(Option<String>):The virtual cluster ID for which the job run request is submitted.
client_token(impl Into<String>)/set_client_token(Option<String>):The client idempotency token of the job run request.
execution_role_arn(impl Into<String>)/set_execution_role_arn(Option<String>):The execution role ARN for the job run.
release_label(impl Into<String>)/set_release_label(Option<String>):The Amazon EMR release version to use 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(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap<String, String>>):The tags assigned to job runs.
job_template_id(impl Into<String>)/set_job_template_id(Option<String>):The job template ID to be used to start the job run.
job_template_parameters(impl Into<String>, impl Into<String>)/set_job_template_parameters(Option<HashMap<String, String>>):The values of job template parameters to start a job run.
retry_policy_configuration(RetryPolicyConfiguration)/set_retry_policy_configuration(Option<RetryPolicyConfiguration>):The retry policy configuration for the job run.
- On success, responds with
StartJobRunOutputwith field(s):id(Option<String>):This output displays the started job run ID.
name(Option<String>):This output displays the name of the started job run.
arn(Option<String>):This output lists the ARN of job run.
virtual_cluster_id(Option<String>):This output displays the virtual cluster ID for which the job run was submitted.
- On failure, responds with
SdkError<StartJobRunError>
source§impl Client
impl Client
sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):The ARN of resources.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap<String, String>>):The tags assigned to resources.
- On success, responds with
TagResourceOutput - On failure, responds with
SdkError<TagResourceError>
source§impl Client
impl Client
sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):The ARN of resources.
tag_keys(impl Into<String>)/set_tag_keys(Option<Vec<String>>):The tag keys of the resources.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
source§impl Client
impl Client
sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it.