pub struct Client { /* private fields */ }
Expand description
Client for AWS Data Exchange
Client for invoking operations on AWS Data Exchange. Each operation on AWS Data Exchange 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_dataexchange::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Builder
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_dataexchange::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 AcceptDataGrant
operation has
a Client::accept_data_grant
, 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.accept_data_grant()
.data_grant_arn("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 accept_data_grant(&self) -> AcceptDataGrantFluentBuilder
pub fn accept_data_grant(&self) -> AcceptDataGrantFluentBuilder
Constructs a fluent builder for the AcceptDataGrant
operation.
- The fluent builder is configurable:
data_grant_arn(impl Into<String>)
/set_data_grant_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the data grant to accept.
- On success, responds with
AcceptDataGrantOutput
with field(s):name(String)
:The name of the accepted data grant.
sender_principal(Option<String>)
:The Amazon Web Services account ID of the data grant sender.
receiver_principal(String)
:The Amazon Web Services account ID of the data grant receiver.
description(Option<String>)
:The description of the accepted data grant.
acceptance_state(DataGrantAcceptanceState)
:The acceptance state of the data grant.
accepted_at(Option<DateTime>)
:The timestamp of when the data grant was accepted.
ends_at(Option<DateTime>)
:The timestamp of when access to the associated data set ends.
grant_distribution_scope(GrantDistributionScope)
:The distribution scope for the data grant.
data_set_id(String)
:The ID of the data set associated to the data grant.
id(String)
:The ID of the data grant.
arn(String)
:The Amazon Resource Name (ARN) of the accepted data grant.
created_at(DateTime)
:The timestamp of when the data grant was created.
updated_at(DateTime)
:The timestamp of when the data grant was last updated.
- On failure, responds with
SdkError<AcceptDataGrantError>
Source§impl Client
impl Client
Sourcepub fn cancel_job(&self) -> CancelJobFluentBuilder
pub fn cancel_job(&self) -> CancelJobFluentBuilder
Constructs a fluent builder for the CancelJob
operation.
- The fluent builder is configurable:
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe unique identifier for a job.
- On success, responds with
CancelJobOutput
- On failure, responds with
SdkError<CancelJobError>
Source§impl Client
impl Client
Sourcepub fn create_data_grant(&self) -> CreateDataGrantFluentBuilder
pub fn create_data_grant(&self) -> CreateDataGrantFluentBuilder
Constructs a fluent builder for the CreateDataGrant
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the data grant.
grant_distribution_scope(GrantDistributionScope)
/set_grant_distribution_scope(Option<GrantDistributionScope>)
:
required: trueThe distribution scope of the data grant.
receiver_principal(impl Into<String>)
/set_receiver_principal(Option<String>)
:
required: trueThe Amazon Web Services account ID of the data grant receiver.
source_data_set_id(impl Into<String>)
/set_source_data_set_id(Option<String>)
:
required: trueThe ID of the data set used to create the data grant.
ends_at(DateTime)
/set_ends_at(Option<DateTime>)
:
required: falseThe timestamp of when access to the associated data set ends.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseThe description of the data grant.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseThe tags to add to the data grant. A tag is a key-value pair.
- On success, responds with
CreateDataGrantOutput
with field(s):name(String)
:The name of the data grant.
sender_principal(String)
:The Amazon Web Services account ID of the data grant sender.
receiver_principal(String)
:The Amazon Web Services account ID of the data grant receiver.
description(Option<String>)
:The description of the data grant.
acceptance_state(DataGrantAcceptanceState)
:The acceptance state of the data grant.
accepted_at(Option<DateTime>)
:The timestamp of when the data grant was accepted.
ends_at(Option<DateTime>)
:The timestamp of when access to the associated data set ends.
grant_distribution_scope(GrantDistributionScope)
:The distribution scope for the data grant.
data_set_id(String)
:The ID of the data set associated to the data grant.
source_data_set_id(String)
:The ID of the data set used to create the data grant.
id(String)
:The ID of the data grant.
arn(String)
:The Amazon Resource Name (ARN) of the data grant.
created_at(DateTime)
:The timestamp of when the data grant was created.
updated_at(DateTime)
:The timestamp of when the data grant was last updated.
tags(Option<HashMap::<String, String>>)
:The tags associated to the data grant. A tag is a key-value pair.
- On failure, responds with
SdkError<CreateDataGrantError>
Source§impl Client
impl Client
Sourcepub fn create_data_set(&self) -> CreateDataSetFluentBuilder
pub fn create_data_set(&self) -> CreateDataSetFluentBuilder
Constructs a fluent builder for the CreateDataSet
operation.
- The fluent builder is configurable:
asset_type(AssetType)
/set_asset_type(Option<AssetType>)
:
required: trueThe type of asset that is added to a data set.
description(impl Into<String>)
/set_description(Option<String>)
:
required: trueA description for the data set. This value can be up to 16,348 characters long.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the data set.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseA data set tag is an optional label that you can assign to a data set when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to these data sets and revisions.
- On success, responds with
CreateDataSetOutput
with field(s):arn(Option<String>)
:The ARN for the data set.
asset_type(Option<AssetType>)
:The type of asset that is added to a data set.
created_at(Option<DateTime>)
:The date and time that the data set was created, in ISO 8601 format.
description(Option<String>)
:The description for the data set.
id(Option<String>)
:The unique identifier for the data set.
name(Option<String>)
:The name of the data set.
origin(Option<Origin>)
:A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers).
origin_details(Option<OriginDetails>)
:If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.
source_id(Option<String>)
:The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is returned when a data set owner is viewing the entitled copy of its owned data set.
tags(Option<HashMap::<String, String>>)
:The tags for the data set.
updated_at(Option<DateTime>)
:The date and time that the data set was last updated, in ISO 8601 format.
- On failure, responds with
SdkError<CreateDataSetError>
Source§impl Client
impl Client
Sourcepub fn create_event_action(&self) -> CreateEventActionFluentBuilder
pub fn create_event_action(&self) -> CreateEventActionFluentBuilder
Constructs a fluent builder for the CreateEventAction
operation.
- The fluent builder is configurable:
action(Action)
/set_action(Option<Action>)
:
required: trueWhat occurs after a certain event.
event(Event)
/set_event(Option<Event>)
:
required: trueWhat occurs to start an action.
- On success, responds with
CreateEventActionOutput
with field(s):action(Option<Action>)
:What occurs after a certain event.
arn(Option<String>)
:The ARN for the event action.
created_at(Option<DateTime>)
:The date and time that the event action was created, in ISO 8601 format.
event(Option<Event>)
:What occurs to start an action.
id(Option<String>)
:The unique identifier for the event action.
updated_at(Option<DateTime>)
:The date and time that the event action was last updated, in ISO 8601 format.
- On failure, responds with
SdkError<CreateEventActionError>
Source§impl Client
impl Client
Sourcepub fn create_job(&self) -> CreateJobFluentBuilder
pub fn create_job(&self) -> CreateJobFluentBuilder
Constructs a fluent builder for the CreateJob
operation.
- The fluent builder is configurable:
details(RequestDetails)
/set_details(Option<RequestDetails>)
:
required: trueThe details for the CreateJob request.
r#type(Type)
/set_type(Option<Type>)
:
required: trueThe type of job to be created.
- On success, responds with
CreateJobOutput
with field(s):arn(Option<String>)
:The ARN for the job.
created_at(Option<DateTime>)
:The date and time that the job was created, in ISO 8601 format.
details(Option<ResponseDetails>)
:Details about the job.
errors(Option<Vec::<JobError>>)
:The errors associated with jobs.
id(Option<String>)
:The unique identifier for the job.
state(Option<State>)
:The state of the job.
r#type(Option<Type>)
:The job type.
updated_at(Option<DateTime>)
:The date and time that the job was last updated, in ISO 8601 format.
- On failure, responds with
SdkError<CreateJobError>
Source§impl Client
impl Client
Sourcepub fn create_revision(&self) -> CreateRevisionFluentBuilder
pub fn create_revision(&self) -> CreateRevisionFluentBuilder
Constructs a fluent builder for the CreateRevision
operation.
- The fluent builder is configurable:
comment(impl Into<String>)
/set_comment(Option<String>)
:
required: falseAn optional comment about the revision.
data_set_id(impl Into<String>)
/set_data_set_id(Option<String>)
:
required: trueThe unique identifier for a data set.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseA revision tag is an optional label that you can assign to a revision when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to these data sets and revisions.
- On success, responds with
CreateRevisionOutput
with field(s):arn(Option<String>)
:The ARN for the revision.
comment(Option<String>)
:An optional comment about the revision.
created_at(Option<DateTime>)
:The date and time that the revision was created, in ISO 8601 format.
data_set_id(Option<String>)
:The unique identifier for the data set associated with the data set revision.
finalized(bool)
:To publish a revision to a data set in a product, the revision must first be finalized. Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it’s in this read-only state, you can publish the revision to your products. Finalized revisions can be published through the AWS Data Exchange console or the AWS Marketplace Catalog API, using the StartChangeSet AWS Marketplace Catalog API action. When using the API, revisions are uniquely identified by their ARN.
id(Option<String>)
:The unique identifier for the revision.
source_id(Option<String>)
:The revision ID of the owned revision corresponding to the entitled revision being viewed. This parameter is returned when a revision owner is viewing the entitled copy of its owned revision.
tags(Option<HashMap::<String, String>>)
:The tags for the revision.
updated_at(Option<DateTime>)
:The date and time that the revision was last updated, in ISO 8601 format.
revocation_comment(Option<String>)
:A required comment to inform subscribers of the reason their access to the revision was revoked.
revoked(bool)
:A status indicating that subscribers’ access to the revision was revoked.
revoked_at(Option<DateTime>)
:The date and time that the revision was revoked, in ISO 8601 format.
- On failure, responds with
SdkError<CreateRevisionError>
Source§impl Client
impl Client
Sourcepub fn delete_asset(&self) -> DeleteAssetFluentBuilder
pub fn delete_asset(&self) -> DeleteAssetFluentBuilder
Constructs a fluent builder for the DeleteAsset
operation.
- The fluent builder is configurable:
asset_id(impl Into<String>)
/set_asset_id(Option<String>)
:
required: trueThe unique identifier for an asset.
data_set_id(impl Into<String>)
/set_data_set_id(Option<String>)
:
required: trueThe unique identifier for a data set.
revision_id(impl Into<String>)
/set_revision_id(Option<String>)
:
required: trueThe unique identifier for a revision.
- On success, responds with
DeleteAssetOutput
- On failure, responds with
SdkError<DeleteAssetError>
Source§impl Client
impl Client
Sourcepub fn delete_data_grant(&self) -> DeleteDataGrantFluentBuilder
pub fn delete_data_grant(&self) -> DeleteDataGrantFluentBuilder
Constructs a fluent builder for the DeleteDataGrant
operation.
- The fluent builder is configurable:
data_grant_id(impl Into<String>)
/set_data_grant_id(Option<String>)
:
required: trueThe ID of the data grant to delete.
- On success, responds with
DeleteDataGrantOutput
- On failure, responds with
SdkError<DeleteDataGrantError>
Source§impl Client
impl Client
Sourcepub fn delete_data_set(&self) -> DeleteDataSetFluentBuilder
pub fn delete_data_set(&self) -> DeleteDataSetFluentBuilder
Constructs a fluent builder for the DeleteDataSet
operation.
- The fluent builder is configurable:
data_set_id(impl Into<String>)
/set_data_set_id(Option<String>)
:
required: trueThe unique identifier for a data set.
- On success, responds with
DeleteDataSetOutput
- On failure, responds with
SdkError<DeleteDataSetError>
Source§impl Client
impl Client
Sourcepub fn delete_event_action(&self) -> DeleteEventActionFluentBuilder
pub fn delete_event_action(&self) -> DeleteEventActionFluentBuilder
Constructs a fluent builder for the DeleteEventAction
operation.
- The fluent builder is configurable:
event_action_id(impl Into<String>)
/set_event_action_id(Option<String>)
:
required: trueThe unique identifier for the event action.
- On success, responds with
DeleteEventActionOutput
- On failure, responds with
SdkError<DeleteEventActionError>
Source§impl Client
impl Client
Sourcepub fn delete_revision(&self) -> DeleteRevisionFluentBuilder
pub fn delete_revision(&self) -> DeleteRevisionFluentBuilder
Constructs a fluent builder for the DeleteRevision
operation.
- The fluent builder is configurable:
data_set_id(impl Into<String>)
/set_data_set_id(Option<String>)
:
required: trueThe unique identifier for a data set.
revision_id(impl Into<String>)
/set_revision_id(Option<String>)
:
required: trueThe unique identifier for a revision.
- On success, responds with
DeleteRevisionOutput
- On failure, responds with
SdkError<DeleteRevisionError>
Source§impl Client
impl Client
Sourcepub fn get_asset(&self) -> GetAssetFluentBuilder
pub fn get_asset(&self) -> GetAssetFluentBuilder
Constructs a fluent builder for the GetAsset
operation.
- The fluent builder is configurable:
asset_id(impl Into<String>)
/set_asset_id(Option<String>)
:
required: trueThe unique identifier for an asset.
data_set_id(impl Into<String>)
/set_data_set_id(Option<String>)
:
required: trueThe unique identifier for a data set.
revision_id(impl Into<String>)
/set_revision_id(Option<String>)
:
required: trueThe unique identifier for a revision.
- On success, responds with
GetAssetOutput
with field(s):arn(Option<String>)
:The ARN for the asset.
asset_details(Option<AssetDetails>)
:Details about the asset.
asset_type(Option<AssetType>)
:The type of asset that is added to a data set.
created_at(Option<DateTime>)
:The date and time that the asset was created, in ISO 8601 format.
data_set_id(Option<String>)
:The unique identifier for the data set associated with this asset.
id(Option<String>)
:The unique identifier for the asset.
name(Option<String>)
:The name of the asset. When importing from Amazon S3, the Amazon S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target Amazon S3 object key. When importing from Amazon API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the asset name. When importing from AWS Lake Formation, the static values of “Database(s) included in the LF-tag policy” or “Table(s) included in the LF-tag policy” are used as the asset name.
revision_id(Option<String>)
:The unique identifier for the revision associated with this asset.
source_id(Option<String>)
:The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is returned when an asset owner is viewing the entitled copy of its owned asset.
updated_at(Option<DateTime>)
:The date and time that the asset was last updated, in ISO 8601 format.
- On failure, responds with
SdkError<GetAssetError>
Source§impl Client
impl Client
Sourcepub fn get_data_grant(&self) -> GetDataGrantFluentBuilder
pub fn get_data_grant(&self) -> GetDataGrantFluentBuilder
Constructs a fluent builder for the GetDataGrant
operation.
- The fluent builder is configurable:
data_grant_id(impl Into<String>)
/set_data_grant_id(Option<String>)
:
required: trueThe ID of the data grant.
- On success, responds with
GetDataGrantOutput
with field(s):name(String)
:The name of the data grant.
sender_principal(String)
:The Amazon Web Services account ID of the data grant sender.
receiver_principal(String)
:The Amazon Web Services account ID of the data grant receiver.
description(Option<String>)
:The description of the data grant.
acceptance_state(DataGrantAcceptanceState)
:The acceptance state of the data grant.
accepted_at(Option<DateTime>)
:The timestamp of when the data grant was accepted.
ends_at(Option<DateTime>)
:The timestamp of when access to the associated data set ends.
grant_distribution_scope(GrantDistributionScope)
:The distribution scope for the data grant.
data_set_id(String)
:The ID of the data set associated to the data grant.
source_data_set_id(String)
:The ID of the data set used to create the data grant.
id(String)
:The ID of the data grant.
arn(String)
:The Amazon Resource Name (ARN) of the data grant.
created_at(DateTime)
:The timestamp of when the data grant was created.
updated_at(DateTime)
:The timestamp of when the data grant was last updated.
tags(Option<HashMap::<String, String>>)
:The tags associated to the data grant. A tag is a key-value pair.
- On failure, responds with
SdkError<GetDataGrantError>
Source§impl Client
impl Client
Sourcepub fn get_data_set(&self) -> GetDataSetFluentBuilder
pub fn get_data_set(&self) -> GetDataSetFluentBuilder
Constructs a fluent builder for the GetDataSet
operation.
- The fluent builder is configurable:
data_set_id(impl Into<String>)
/set_data_set_id(Option<String>)
:
required: trueThe unique identifier for a data set.
- On success, responds with
GetDataSetOutput
with field(s):arn(Option<String>)
:The ARN for the data set.
asset_type(Option<AssetType>)
:The type of asset that is added to a data set.
created_at(Option<DateTime>)
:The date and time that the data set was created, in ISO 8601 format.
description(Option<String>)
:The description for the data set.
id(Option<String>)
:The unique identifier for the data set.
name(Option<String>)
:The name of the data set.
origin(Option<Origin>)
:A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers).
origin_details(Option<OriginDetails>)
:If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.
source_id(Option<String>)
:The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is returned when a data set owner is viewing the entitled copy of its owned data set.
tags(Option<HashMap::<String, String>>)
:The tags for the data set.
updated_at(Option<DateTime>)
:The date and time that the data set was last updated, in ISO 8601 format.
- On failure, responds with
SdkError<GetDataSetError>
Source§impl Client
impl Client
Sourcepub fn get_event_action(&self) -> GetEventActionFluentBuilder
pub fn get_event_action(&self) -> GetEventActionFluentBuilder
Constructs a fluent builder for the GetEventAction
operation.
- The fluent builder is configurable:
event_action_id(impl Into<String>)
/set_event_action_id(Option<String>)
:
required: trueThe unique identifier for the event action.
- On success, responds with
GetEventActionOutput
with field(s):action(Option<Action>)
:What occurs after a certain event.
arn(Option<String>)
:The ARN for the event action.
created_at(Option<DateTime>)
:The date and time that the event action was created, in ISO 8601 format.
event(Option<Event>)
:What occurs to start an action.
id(Option<String>)
:The unique identifier for the event action.
updated_at(Option<DateTime>)
:The date and time that the event action was last updated, in ISO 8601 format.
- On failure, responds with
SdkError<GetEventActionError>
Source§impl Client
impl Client
Sourcepub fn get_job(&self) -> GetJobFluentBuilder
pub fn get_job(&self) -> GetJobFluentBuilder
Constructs a fluent builder for the GetJob
operation.
- The fluent builder is configurable:
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe unique identifier for a job.
- On success, responds with
GetJobOutput
with field(s):arn(Option<String>)
:The ARN for the job.
created_at(Option<DateTime>)
:The date and time that the job was created, in ISO 8601 format.
details(Option<ResponseDetails>)
:Details about the job.
errors(Option<Vec::<JobError>>)
:The errors associated with jobs.
id(Option<String>)
:The unique identifier for the job.
state(Option<State>)
:The state of the job.
r#type(Option<Type>)
:The job type.
updated_at(Option<DateTime>)
:The date and time that the job was last updated, in ISO 8601 format.
- On failure, responds with
SdkError<GetJobError>
Source§impl Client
impl Client
Sourcepub fn get_received_data_grant(&self) -> GetReceivedDataGrantFluentBuilder
pub fn get_received_data_grant(&self) -> GetReceivedDataGrantFluentBuilder
Constructs a fluent builder for the GetReceivedDataGrant
operation.
- The fluent builder is configurable:
data_grant_arn(impl Into<String>)
/set_data_grant_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the data grant.
- On success, responds with
GetReceivedDataGrantOutput
with field(s):name(String)
:The name of the data grant.
sender_principal(Option<String>)
:The Amazon Web Services account ID of the data grant sender.
receiver_principal(String)
:The Amazon Web Services account ID of the data grant receiver.
description(Option<String>)
:The description of the data grant.
acceptance_state(DataGrantAcceptanceState)
:The acceptance state of the data grant.
accepted_at(Option<DateTime>)
:The timestamp of when the data grant was accepted.
ends_at(Option<DateTime>)
:The timestamp of when access to the associated data set ends.
grant_distribution_scope(GrantDistributionScope)
:The distribution scope for the data grant.
data_set_id(String)
:The ID of the data set associated to the data grant.
id(String)
:The ID of the data grant.
arn(String)
:The Amazon Resource Name (ARN) of the data grant.
created_at(DateTime)
:The timestamp of when the data grant was created.
updated_at(DateTime)
:The timestamp of when the data grant was last updated.
- On failure, responds with
SdkError<GetReceivedDataGrantError>
Source§impl Client
impl Client
Sourcepub fn get_revision(&self) -> GetRevisionFluentBuilder
pub fn get_revision(&self) -> GetRevisionFluentBuilder
Constructs a fluent builder for the GetRevision
operation.
- The fluent builder is configurable:
data_set_id(impl Into<String>)
/set_data_set_id(Option<String>)
:
required: trueThe unique identifier for a data set.
revision_id(impl Into<String>)
/set_revision_id(Option<String>)
:
required: trueThe unique identifier for a revision.
- On success, responds with
GetRevisionOutput
with field(s):arn(Option<String>)
:The ARN for the revision.
comment(Option<String>)
:An optional comment about the revision.
created_at(Option<DateTime>)
:The date and time that the revision was created, in ISO 8601 format.
data_set_id(Option<String>)
:The unique identifier for the data set associated with the data set revision.
finalized(bool)
:To publish a revision to a data set in a product, the revision must first be finalized. Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it’s in this read-only state, you can publish the revision to your products. Finalized revisions can be published through the AWS Data Exchange console or the AWS Marketplace Catalog API, using the StartChangeSet AWS Marketplace Catalog API action. When using the API, revisions are uniquely identified by their ARN.
id(Option<String>)
:The unique identifier for the revision.
source_id(Option<String>)
:The revision ID of the owned revision corresponding to the entitled revision being viewed. This parameter is returned when a revision owner is viewing the entitled copy of its owned revision.
tags(Option<HashMap::<String, String>>)
:The tags for the revision.
updated_at(Option<DateTime>)
:The date and time that the revision was last updated, in ISO 8601 format.
revocation_comment(Option<String>)
:A required comment to inform subscribers of the reason their access to the revision was revoked.
revoked(bool)
:A status indicating that subscribers’ access to the revision was revoked.
revoked_at(Option<DateTime>)
:The date and time that the revision was revoked, in ISO 8601 format.
- On failure, responds with
SdkError<GetRevisionError>
Source§impl Client
impl Client
Sourcepub fn list_data_grants(&self) -> ListDataGrantsFluentBuilder
pub fn list_data_grants(&self) -> ListDataGrantsFluentBuilder
Constructs a fluent builder for the ListDataGrants
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to be included in the next page.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe pagination token used to retrieve the next page of results for this operation.
- On success, responds with
ListDataGrantsOutput
with field(s):data_grant_summaries(Option<Vec::<DataGrantSummaryEntry>>)
:An object that contains a list of data grant information.
next_token(Option<String>)
:The pagination token used to retrieve the next page of results for this operation.
- On failure, responds with
SdkError<ListDataGrantsError>
Source§impl Client
impl Client
Sourcepub fn list_data_set_revisions(&self) -> ListDataSetRevisionsFluentBuilder
pub fn list_data_set_revisions(&self) -> ListDataSetRevisionsFluentBuilder
Constructs a fluent builder for the ListDataSetRevisions
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
data_set_id(impl Into<String>)
/set_data_set_id(Option<String>)
:
required: trueThe unique identifier for a data set.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results returned by a single call.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token value retrieved from a previous call to access the next page of results.
- On success, responds with
ListDataSetRevisionsOutput
with field(s):next_token(Option<String>)
:The token value retrieved from a previous call to access the next page of results.
revisions(Option<Vec::<RevisionEntry>>)
:The asset objects listed by the request.
- On failure, responds with
SdkError<ListDataSetRevisionsError>
Source§impl Client
impl Client
Sourcepub fn list_data_sets(&self) -> ListDataSetsFluentBuilder
pub fn list_data_sets(&self) -> ListDataSetsFluentBuilder
Constructs a fluent builder for the ListDataSets
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results returned by a single call.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token value retrieved from a previous call to access the next page of results.
origin(impl Into<String>)
/set_origin(Option<String>)
:
required: falseA property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers).
- On success, responds with
ListDataSetsOutput
with field(s):data_sets(Option<Vec::<DataSetEntry>>)
:The data set objects listed by the request.
next_token(Option<String>)
:The token value retrieved from a previous call to access the next page of results.
- On failure, responds with
SdkError<ListDataSetsError>
Source§impl Client
impl Client
Sourcepub fn list_event_actions(&self) -> ListEventActionsFluentBuilder
pub fn list_event_actions(&self) -> ListEventActionsFluentBuilder
Constructs a fluent builder for the ListEventActions
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
event_source_id(impl Into<String>)
/set_event_source_id(Option<String>)
:
required: falseThe unique identifier for the event source.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results returned by a single call.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token value retrieved from a previous call to access the next page of results.
- On success, responds with
ListEventActionsOutput
with field(s):event_actions(Option<Vec::<EventActionEntry>>)
:The event action objects listed by the request.
next_token(Option<String>)
:The token value retrieved from a previous call to access the next page of results.
- On failure, responds with
SdkError<ListEventActionsError>
Source§impl Client
impl Client
Sourcepub fn list_jobs(&self) -> ListJobsFluentBuilder
pub fn list_jobs(&self) -> ListJobsFluentBuilder
Constructs a fluent builder for the ListJobs
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
data_set_id(impl Into<String>)
/set_data_set_id(Option<String>)
:
required: falseThe unique identifier for a data set.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results returned by a single call.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token value retrieved from a previous call to access the next page of results.
revision_id(impl Into<String>)
/set_revision_id(Option<String>)
:
required: falseThe unique identifier for a revision.
- On success, responds with
ListJobsOutput
with field(s):jobs(Option<Vec::<JobEntry>>)
:The jobs listed by the request.
next_token(Option<String>)
:The token value retrieved from a previous call to access the next page of results.
- On failure, responds with
SdkError<ListJobsError>
Source§impl Client
impl Client
Sourcepub fn list_received_data_grants(&self) -> ListReceivedDataGrantsFluentBuilder
pub fn list_received_data_grants(&self) -> ListReceivedDataGrantsFluentBuilder
Constructs a fluent builder for the ListReceivedDataGrants
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to be included in the next page.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe pagination token used to retrieve the next page of results for this operation.
acceptance_state(AcceptanceStateFilterValue)
/set_acceptance_state(Option<Vec::<AcceptanceStateFilterValue>>)
:
required: falseThe acceptance state of the data grants to list.
- On success, responds with
ListReceivedDataGrantsOutput
with field(s):data_grant_summaries(Option<Vec::<ReceivedDataGrantSummariesEntry>>)
:An object that contains a list of received data grant information.
next_token(Option<String>)
:The pagination token used to retrieve the next page of results for this operation.
- On failure, responds with
SdkError<ListReceivedDataGrantsError>
Source§impl Client
impl Client
Sourcepub fn list_revision_assets(&self) -> ListRevisionAssetsFluentBuilder
pub fn list_revision_assets(&self) -> ListRevisionAssetsFluentBuilder
Constructs a fluent builder for the ListRevisionAssets
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
data_set_id(impl Into<String>)
/set_data_set_id(Option<String>)
:
required: trueThe unique identifier for a data set.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results returned by a single call.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token value retrieved from a previous call to access the next page of results.
revision_id(impl Into<String>)
/set_revision_id(Option<String>)
:
required: trueThe unique identifier for a revision.
- On success, responds with
ListRevisionAssetsOutput
with field(s):assets(Option<Vec::<AssetEntry>>)
:The asset objects listed by the request.
next_token(Option<String>)
:The token value retrieved from a previous call to access the next page of results.
- On failure, responds with
SdkError<ListRevisionAssetsError>
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>)
:
required: trueAn Amazon Resource Name (ARN) that uniquely identifies an AWS resource.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap::<String, String>>)
:A label that consists of a customer-defined key and an optional value.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn revoke_revision(&self) -> RevokeRevisionFluentBuilder
pub fn revoke_revision(&self) -> RevokeRevisionFluentBuilder
Constructs a fluent builder for the RevokeRevision
operation.
- The fluent builder is configurable:
data_set_id(impl Into<String>)
/set_data_set_id(Option<String>)
:
required: trueThe unique identifier for a data set.
revision_id(impl Into<String>)
/set_revision_id(Option<String>)
:
required: trueThe unique identifier for a revision.
revocation_comment(impl Into<String>)
/set_revocation_comment(Option<String>)
:
required: trueA required comment to inform subscribers of the reason their access to the revision was revoked.
- On success, responds with
RevokeRevisionOutput
with field(s):arn(Option<String>)
:The ARN for the revision.
comment(Option<String>)
:An optional comment about the revision.
created_at(Option<DateTime>)
:The date and time that the revision was created, in ISO 8601 format.
data_set_id(Option<String>)
:The unique identifier for the data set associated with the data set revision.
finalized(bool)
:To publish a revision to a data set in a product, the revision must first be finalized. Finalizing a revision tells AWS Data Exchange that changes to the assets in the revision are complete. After it’s in this read-only state, you can publish the revision to your products. Finalized revisions can be published through the AWS Data Exchange console or the AWS Marketplace Catalog API, using the StartChangeSet AWS Marketplace Catalog API action. When using the API, revisions are uniquely identified by their ARN.
id(Option<String>)
:The unique identifier for the revision.
source_id(Option<String>)
:The revision ID of the owned revision corresponding to the entitled revision being viewed. This parameter is returned when a revision owner is viewing the entitled copy of its owned revision.
updated_at(Option<DateTime>)
:The date and time that the revision was last updated, in ISO 8601 format.
revocation_comment(Option<String>)
:A required comment to inform subscribers of the reason their access to the revision was revoked.
revoked(bool)
:A status indicating that subscribers’ access to the revision was revoked.
revoked_at(Option<DateTime>)
:The date and time that the revision was revoked, in ISO 8601 format.
- On failure, responds with
SdkError<RevokeRevisionError>
Source§impl Client
impl Client
Sourcepub fn send_api_asset(&self) -> SendApiAssetFluentBuilder
pub fn send_api_asset(&self) -> SendApiAssetFluentBuilder
Constructs a fluent builder for the SendApiAsset
operation.
- The fluent builder is configurable:
body(impl Into<String>)
/set_body(Option<String>)
:
required: falseThe request body.
query_string_parameters(impl Into<String>, impl Into<String>)
/set_query_string_parameters(Option<HashMap::<String, String>>)
:
required: falseAttach query string parameters to the end of the URI (for example, /v1/examplePath?exampleParam=exampleValue).
asset_id(impl Into<String>)
/set_asset_id(Option<String>)
:
required: trueAsset ID value for the API request.
data_set_id(impl Into<String>)
/set_data_set_id(Option<String>)
:
required: trueData set ID value for the API request.
request_headers(impl Into<String>, impl Into<String>)
/set_request_headers(Option<HashMap::<String, String>>)
:
required: falseAny header value prefixed with x-amzn-dataexchange-header- will have that stripped before sending the Asset API request. Use this when you want to override a header that AWS Data Exchange uses. Alternatively, you can use the header without a prefix to the HTTP request.
method(impl Into<String>)
/set_method(Option<String>)
:
required: falseHTTP method value for the API request. Alternatively, you can use the appropriate verb in your request.
path(impl Into<String>)
/set_path(Option<String>)
:
required: falseURI path value for the API request. Alternatively, you can set the URI path directly by invoking /v1/{pathValue}.
revision_id(impl Into<String>)
/set_revision_id(Option<String>)
:
required: trueRevision ID value for the API request.
- On success, responds with
SendApiAssetOutput
with field(s):body(Option<String>)
:The response body from the underlying API tracked by the API asset.
response_headers(Option<HashMap::<String, String>>)
:The response headers from the underlying API tracked by the API asset.
- On failure, responds with
SdkError<SendApiAssetError>
Source§impl Client
impl Client
Sourcepub fn send_data_set_notification(&self) -> SendDataSetNotificationFluentBuilder
pub fn send_data_set_notification(&self) -> SendDataSetNotificationFluentBuilder
Constructs a fluent builder for the SendDataSetNotification
operation.
- The fluent builder is configurable:
scope(ScopeDetails)
/set_scope(Option<ScopeDetails>)
:
required: falseAffected scope of this notification such as the underlying resources affected by the notification event.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseIdempotency key for the notification, this key allows us to deduplicate notifications that are sent in quick succession erroneously.
comment(impl Into<String>)
/set_comment(Option<String>)
:
required: falseFree-form text field for providers to add information about their notifications.
data_set_id(impl Into<String>)
/set_data_set_id(Option<String>)
:
required: trueAffected data set of the notification.
details(NotificationDetails)
/set_details(Option<NotificationDetails>)
:
required: falseExtra details specific to this notification type.
r#type(NotificationType)
/set_type(Option<NotificationType>)
:
required: trueThe type of the notification. Describing the kind of event the notification is alerting you to.
- On success, responds with
SendDataSetNotificationOutput
- On failure, responds with
SdkError<SendDataSetNotificationError>
Source§impl Client
impl Client
Sourcepub fn start_job(&self) -> StartJobFluentBuilder
pub fn start_job(&self) -> StartJobFluentBuilder
Constructs a fluent builder for the StartJob
operation.
- The fluent builder is configurable:
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe unique identifier for a job.
- On success, responds with
StartJobOutput
- On failure, responds with
SdkError<StartJobError>
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>)
:
required: trueAn Amazon Resource Name (ARN) that uniquely identifies an AWS resource.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: trueA label that consists of a customer-defined key and an optional value.
- 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>)
:
required: trueAn Amazon Resource Name (ARN) that uniquely identifies an AWS resource.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe key tags.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_asset(&self) -> UpdateAssetFluentBuilder
pub fn update_asset(&self) -> UpdateAssetFluentBuilder
Constructs a fluent builder for the UpdateAsset
operation.
- The fluent builder is configurable:
asset_id(impl Into<String>)
/set_asset_id(Option<String>)
:
required: trueThe unique identifier for an asset.
data_set_id(impl Into<String>)
/set_data_set_id(Option<String>)
:
required: trueThe unique identifier for a data set.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the asset. When importing from Amazon S3, the Amazon S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target Amazon S3 object key. When importing from Amazon API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the asset name. When importing from AWS Lake Formation, the static values of “Database(s) included in the LF-tag policy” or “Table(s) included in LF-tag policy” are used as the name.
revision_id(impl Into<String>)
/set_revision_id(Option<String>)
:
required: trueThe unique identifier for a revision.
- On success, responds with
UpdateAssetOutput
with field(s):arn(Option<String>)
:The ARN for the asset.
asset_details(Option<AssetDetails>)
:Details about the asset.
asset_type(Option<AssetType>)
:The type of asset that is added to a data set.
created_at(Option<DateTime>)
:The date and time that the asset was created, in ISO 8601 format.
data_set_id(Option<String>)
:The unique identifier for the data set associated with this asset.
id(Option<String>)
:The unique identifier for the asset.
name(Option<String>)
:The name of the asset. When importing from Amazon S3, the Amazon S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target Amazon S3 object key. When importing from Amazon API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the asset name. When importing from AWS Lake Formation, the static values of “Database(s) included in the LF-tag policy”- or “Table(s) included in LF-tag policy” are used as the asset name.
revision_id(Option<String>)
:The unique identifier for the revision associated with this asset.
source_id(Option<String>)
:The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is returned when an asset owner is viewing the entitled copy of its owned asset.
updated_at(Option<DateTime>)
:The date and time that the asset was last updated, in ISO 8601 format.
- On failure, responds with
SdkError<UpdateAssetError>
Source§impl Client
impl Client
Sourcepub fn update_data_set(&self) -> UpdateDataSetFluentBuilder
pub fn update_data_set(&self) -> UpdateDataSetFluentBuilder
Constructs a fluent builder for the UpdateDataSet
operation.
- The fluent builder is configurable:
data_set_id(impl Into<String>)
/set_data_set_id(Option<String>)
:
required: trueThe unique identifier for a data set.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseThe description for the data set.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseThe name of the data set.
- On success, responds with
UpdateDataSetOutput
with field(s):arn(Option<String>)
:The ARN for the data set.
asset_type(Option<AssetType>)
:The type of asset that is added to a data set.
created_at(Option<DateTime>)
:The date and time that the data set was created, in ISO 8601 format.
description(Option<String>)
:The description for the data set.
id(Option<String>)
:The unique identifier for the data set.
name(Option<String>)
:The name of the data set.
origin(Option<Origin>)
:A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers).
origin_details(Option<OriginDetails>)
:If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.
source_id(Option<String>)
:The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is returned when a data set owner is viewing the entitled copy of its owned data set.
updated_at(Option<DateTime>)
:The date and time that the data set was last updated, in ISO 8601 format.
- On failure, responds with
SdkError<UpdateDataSetError>
Source§impl Client
impl Client
Sourcepub fn update_event_action(&self) -> UpdateEventActionFluentBuilder
pub fn update_event_action(&self) -> UpdateEventActionFluentBuilder
Constructs a fluent builder for the UpdateEventAction
operation.
- The fluent builder is configurable:
action(Action)
/set_action(Option<Action>)
:
required: falseWhat occurs after a certain event.
event_action_id(impl Into<String>)
/set_event_action_id(Option<String>)
:
required: trueThe unique identifier for the event action.
- On success, responds with
UpdateEventActionOutput
with field(s):action(Option<Action>)
:What occurs after a certain event.
arn(Option<String>)
:The ARN for the event action.
created_at(Option<DateTime>)
:The date and time that the event action was created, in ISO 8601 format.
event(Option<Event>)
:What occurs to start an action.
id(Option<String>)
:The unique identifier for the event action.
updated_at(Option<DateTime>)
:The date and time that the event action was last updated, in ISO 8601 format.
- On failure, responds with
SdkError<UpdateEventActionError>
Source§impl Client
impl Client
Sourcepub fn update_revision(&self) -> UpdateRevisionFluentBuilder
pub fn update_revision(&self) -> UpdateRevisionFluentBuilder
Constructs a fluent builder for the UpdateRevision
operation.
- The fluent builder is configurable:
comment(impl Into<String>)
/set_comment(Option<String>)
:
required: falseAn optional comment about the revision.
data_set_id(impl Into<String>)
/set_data_set_id(Option<String>)
:
required: trueThe unique identifier for a data set.
finalized(bool)
/set_finalized(Option<bool>)
:
required: falseFinalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it’s in this read-only state, you can publish the revision to your products.
revision_id(impl Into<String>)
/set_revision_id(Option<String>)
:
required: trueThe unique identifier for a revision.
- On success, responds with
UpdateRevisionOutput
with field(s):arn(Option<String>)
:The ARN for the revision.
comment(Option<String>)
:An optional comment about the revision.
created_at(Option<DateTime>)
:The date and time that the revision was created, in ISO 8601 format.
data_set_id(Option<String>)
:The unique identifier for the data set associated with the data set revision.
finalized(bool)
:To publish a revision to a data set in a product, the revision must first be finalized. Finalizing a revision tells AWS Data Exchange that changes to the assets in the revision are complete. After it’s in this read-only state, you can publish the revision to your products. Finalized revisions can be published through the AWS Data Exchange console or the AWS Marketplace Catalog API, using the StartChangeSet AWS Marketplace Catalog API action. When using the API, revisions are uniquely identified by their ARN.
id(Option<String>)
:The unique identifier for the revision.
source_id(Option<String>)
:The revision ID of the owned revision corresponding to the entitled revision being viewed. This parameter is returned when a revision owner is viewing the entitled copy of its owned revision.
updated_at(Option<DateTime>)
:The date and time that the revision was last updated, in ISO 8601 format.
revocation_comment(Option<String>)
:A required comment to inform subscribers of the reason their access to the revision was revoked.
revoked(bool)
:A status indicating that subscribers’ access to the revision was revoked.
revoked_at(Option<DateTime>)
:The date and time that the revision was revoked, in ISO 8601 format.
- On failure, responds with
SdkError<UpdateRevisionError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
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_config
is missing an async sleep implementation. If you experience this panic, set thesleep_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 thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.bright_black());
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.bright_green());
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.bright_yellow());
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.bright_magenta());
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.bright_white());
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.on_bright_black());
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.on_bright_green());
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.on_bright_yellow());
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlue
.
§Example
println!("{}", value.on_bright_blue());
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.on_bright_magenta());
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightCyan
.
§Example
println!("{}", value.on_bright_cyan());
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.on_bright_white());
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn underline(&self) -> Painted<&T>
fn underline(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::Underline
.
§Example
println!("{}", value.underline());
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::RapidBlink
.
§Example
println!("{}", value.rapid_blink());
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);