pub struct Client { /* private fields */ }
Expand description

Client for AWS Data Pipeline

Client for invoking operations on AWS Data Pipeline. Each operation on AWS Data Pipeline 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_datapipeline::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_datapipeline::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 ActivatePipeline operation has a Client::activate_pipeline, function which returns a builder for that operation. The fluent builder ultimately has a call() function that returns an async future that returns a result, as illustrated below:

let result = client.activate_pipeline()
    .pipeline_id("example")
    .call()
    .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

source

pub fn activate_pipeline(&self) -> ActivatePipelineFluentBuilder

Constructs a fluent builder for the ActivatePipeline operation.

source§

impl Client

source

pub fn add_tags(&self) -> AddTagsFluentBuilder

Constructs a fluent builder for the AddTags operation.

source§

impl Client

source

pub fn create_pipeline(&self) -> CreatePipelineFluentBuilder

Constructs a fluent builder for the CreatePipeline operation.

  • The fluent builder is configurable:
    • name(impl Into<String>) / set_name(Option<String>):

      The name for the pipeline. You can use the same name for multiple pipelines associated with your AWS account, because AWS Data Pipeline assigns each pipeline a unique pipeline identifier.

    • unique_id(impl Into<String>) / set_unique_id(Option<String>):

      A unique identifier. This identifier is not the same as the pipeline identifier assigned by AWS Data Pipeline. You are responsible for defining the format and ensuring the uniqueness of this identifier. You use this parameter to ensure idempotency during repeated calls to CreatePipeline. For example, if the first call to CreatePipeline does not succeed, you can pass in the same unique identifier and pipeline name combination on a subsequent call to CreatePipeline. CreatePipeline ensures that if a pipeline already exists with the same name and unique identifier, a new pipeline is not created. Instead, you’ll receive the pipeline identifier from the previous attempt. The uniqueness of the name and unique identifier combination is scoped to the AWS account or IAM user credentials.

    • description(impl Into<String>) / set_description(Option<String>):

      The description for the pipeline.

    • tags(Vec<Tag>) / set_tags(Option<Vec<Tag>>):

      A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For more information, see Controlling User Access to Pipelines in the AWS Data Pipeline Developer Guide.

  • On success, responds with CreatePipelineOutput with field(s):
  • On failure, responds with SdkError<CreatePipelineError>
source§

impl Client

source

pub fn deactivate_pipeline(&self) -> DeactivatePipelineFluentBuilder

Constructs a fluent builder for the DeactivatePipeline operation.

source§

impl Client

source

pub fn delete_pipeline(&self) -> DeletePipelineFluentBuilder

Constructs a fluent builder for the DeletePipeline operation.

source§

impl Client

source

pub fn describe_objects(&self) -> DescribeObjectsFluentBuilder

Constructs a fluent builder for the DescribeObjects operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn describe_pipelines(&self) -> DescribePipelinesFluentBuilder

Constructs a fluent builder for the DescribePipelines operation.

source§

impl Client

source

pub fn evaluate_expression(&self) -> EvaluateExpressionFluentBuilder

Constructs a fluent builder for the EvaluateExpression operation.

source§

impl Client

source

pub fn get_pipeline_definition(&self) -> GetPipelineDefinitionFluentBuilder

Constructs a fluent builder for the GetPipelineDefinition operation.

source§

impl Client

source

pub fn list_pipelines(&self) -> ListPipelinesFluentBuilder

Constructs a fluent builder for the ListPipelines operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • marker(impl Into<String>) / set_marker(Option<String>):

      The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call ListPipelines with the marker value from the previous call to retrieve the next set of results.

  • On success, responds with ListPipelinesOutput with field(s):
    • pipeline_id_list(Option<Vec<PipelineIdName>>):

      The pipeline identifiers. If you require additional information about the pipelines, you can use these identifiers to call DescribePipelines and GetPipelineDefinition.

    • marker(Option<String>):

      The starting point for the next page of results. To view the next page of results, call ListPipelinesOutput again with this marker value. If the value is null, there are no more results.

    • has_more_results(bool):

      Indicates whether there are more results that can be obtained by a subsequent call.

  • On failure, responds with SdkError<ListPipelinesError>
source§

impl Client

source

pub fn poll_for_task(&self) -> PollForTaskFluentBuilder

Constructs a fluent builder for the PollForTask operation.

  • The fluent builder is configurable:
  • On success, responds with PollForTaskOutput with field(s):
    • task_object(Option<TaskObject>):

      The information needed to complete the task that is being assigned to the task runner. One of the fields returned in this object is taskId, which contains an identifier for the task being assigned. The calling task runner uses taskId in subsequent calls to ReportTaskProgress and SetTaskStatus.

  • On failure, responds with SdkError<PollForTaskError>
source§

impl Client

source

pub fn put_pipeline_definition(&self) -> PutPipelineDefinitionFluentBuilder

Constructs a fluent builder for the PutPipelineDefinition operation.

source§

impl Client

source

pub fn query_objects(&self) -> QueryObjectsFluentBuilder

Constructs a fluent builder for the QueryObjects operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn remove_tags(&self) -> RemoveTagsFluentBuilder

Constructs a fluent builder for the RemoveTags operation.

source§

impl Client

source

pub fn report_task_progress(&self) -> ReportTaskProgressFluentBuilder

Constructs a fluent builder for the ReportTaskProgress operation.

source§

impl Client

source

pub fn report_task_runner_heartbeat( &self ) -> ReportTaskRunnerHeartbeatFluentBuilder

Constructs a fluent builder for the ReportTaskRunnerHeartbeat operation.

source§

impl Client

source

pub fn set_status(&self) -> SetStatusFluentBuilder

Constructs a fluent builder for the SetStatus operation.

source§

impl Client

source

pub fn set_task_status(&self) -> SetTaskStatusFluentBuilder

Constructs a fluent builder for the SetTaskStatus operation.

source§

impl Client

source

pub fn validate_pipeline_definition( &self ) -> ValidatePipelineDefinitionFluentBuilder

Constructs a fluent builder for the ValidatePipelineDefinition operation.

source§

impl Client

source

pub fn with_config( client: Client<DynConnector, DynMiddleware<DynConnector>>, conf: Config ) -> Self

Creates a client with the given service configuration.

source

pub fn conf(&self) -> &Config

Returns the client’s configuration.

source§

impl Client

source

pub fn new(sdk_config: &SdkConfig) -> Self

Creates a new client from an SDK Config.

Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.
source

pub fn from_conf(conf: Config) -> Self

Creates a new client from the service Config.

Panics
  • This method will panic if the conf is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the conf is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.

Trait Implementations§

source§

impl Clone for Client

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Client

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client

source§

fn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more