pub struct Client { /* private fields */ }
Expand description
Client for AWS CodePipeline
Client for invoking operations on AWS CodePipeline. Each operation on AWS CodePipeline 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_codepipeline::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_codepipeline::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 AcknowledgeJob
operation has
a Client::acknowledge_job
, 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.acknowledge_job()
.job_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 acknowledge_job(&self) -> AcknowledgeJobFluentBuilder
pub fn acknowledge_job(&self) -> AcknowledgeJobFluentBuilder
Constructs a fluent builder for the AcknowledgeJob
operation.
- The fluent builder is configurable:
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe unique system-generated ID of the job for which you want to confirm receipt.
nonce(impl Into<String>)
/set_nonce(Option<String>)
:
required: trueA system-generated random number that CodePipeline uses to ensure that the job is being worked on by only one job worker. Get this number from the response of the
PollForJobs
request that returned this job.
- On success, responds with
AcknowledgeJobOutput
with field(s):status(Option<JobStatus>)
:Whether the job worker has received the specified job.
- On failure, responds with
SdkError<AcknowledgeJobError>
Source§impl Client
impl Client
Sourcepub fn acknowledge_third_party_job(
&self,
) -> AcknowledgeThirdPartyJobFluentBuilder
pub fn acknowledge_third_party_job( &self, ) -> AcknowledgeThirdPartyJobFluentBuilder
Constructs a fluent builder for the AcknowledgeThirdPartyJob
operation.
- The fluent builder is configurable:
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe unique system-generated ID of the job.
nonce(impl Into<String>)
/set_nonce(Option<String>)
:
required: trueA system-generated random number that CodePipeline uses to ensure that the job is being worked on by only one job worker. Get this number from the response to a
GetThirdPartyJobDetails
request.client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: trueThe clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.
- On success, responds with
AcknowledgeThirdPartyJobOutput
with field(s):status(Option<JobStatus>)
:The status information for the third party job, if any.
- On failure, responds with
SdkError<AcknowledgeThirdPartyJobError>
Source§impl Client
impl Client
Sourcepub fn create_custom_action_type(&self) -> CreateCustomActionTypeFluentBuilder
pub fn create_custom_action_type(&self) -> CreateCustomActionTypeFluentBuilder
Constructs a fluent builder for the CreateCustomActionType
operation.
- The fluent builder is configurable:
category(ActionCategory)
/set_category(Option<ActionCategory>)
:
required: trueThe category of the custom action, such as a build action or a test action.
provider(impl Into<String>)
/set_provider(Option<String>)
:
required: trueThe provider of the service used in the custom action, such as CodeDeploy.
version(impl Into<String>)
/set_version(Option<String>)
:
required: trueThe version identifier of the custom action.
settings(ActionTypeSettings)
/set_settings(Option<ActionTypeSettings>)
:
required: falseURLs that provide users information about this custom action.
configuration_properties(ActionConfigurationProperty)
/set_configuration_properties(Option<Vec::<ActionConfigurationProperty>>)
:
required: falseThe configuration properties for the custom action.
You can refer to a name in the configuration properties of the custom action within the URL templates by following the format of {Config:name}, as long as the configuration property is both required and not secret. For more information, see Create a Custom Action for a Pipeline.
input_artifact_details(ArtifactDetails)
/set_input_artifact_details(Option<ArtifactDetails>)
:
required: trueThe details of the input artifact for the action, such as its commit ID.
output_artifact_details(ArtifactDetails)
/set_output_artifact_details(Option<ArtifactDetails>)
:
required: trueThe details of the output artifact of the action, such as its commit ID.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseThe tags for the custom action.
- On success, responds with
CreateCustomActionTypeOutput
with field(s):action_type(Option<ActionType>)
:Returns information about the details of an action type.
tags(Option<Vec::<Tag>>)
:Specifies the tags applied to the custom action.
- On failure, responds with
SdkError<CreateCustomActionTypeError>
Source§impl Client
impl Client
Sourcepub fn create_pipeline(&self) -> CreatePipelineFluentBuilder
pub fn create_pipeline(&self) -> CreatePipelineFluentBuilder
Constructs a fluent builder for the CreatePipeline
operation.
- The fluent builder is configurable:
pipeline(PipelineDeclaration)
/set_pipeline(Option<PipelineDeclaration>)
:
required: trueRepresents the structure of actions and stages to be performed in the pipeline.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseThe tags for the pipeline.
- On success, responds with
CreatePipelineOutput
with field(s):pipeline(Option<PipelineDeclaration>)
:Represents the structure of actions and stages to be performed in the pipeline.
tags(Option<Vec::<Tag>>)
:Specifies the tags applied to the pipeline.
- On failure, responds with
SdkError<CreatePipelineError>
Source§impl Client
impl Client
Sourcepub fn delete_custom_action_type(&self) -> DeleteCustomActionTypeFluentBuilder
pub fn delete_custom_action_type(&self) -> DeleteCustomActionTypeFluentBuilder
Constructs a fluent builder for the DeleteCustomActionType
operation.
- The fluent builder is configurable:
category(ActionCategory)
/set_category(Option<ActionCategory>)
:
required: trueThe category of the custom action that you want to delete, such as source or deploy.
provider(impl Into<String>)
/set_provider(Option<String>)
:
required: trueThe provider of the service used in the custom action, such as CodeDeploy.
version(impl Into<String>)
/set_version(Option<String>)
:
required: trueThe version of the custom action to delete.
- On success, responds with
DeleteCustomActionTypeOutput
- On failure, responds with
SdkError<DeleteCustomActionTypeError>
Source§impl Client
impl Client
Sourcepub fn delete_pipeline(&self) -> DeletePipelineFluentBuilder
pub fn delete_pipeline(&self) -> DeletePipelineFluentBuilder
Constructs a fluent builder for the DeletePipeline
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the pipeline to be deleted.
- On success, responds with
DeletePipelineOutput
- On failure, responds with
SdkError<DeletePipelineError>
Source§impl Client
impl Client
Sourcepub fn delete_webhook(&self) -> DeleteWebhookFluentBuilder
pub fn delete_webhook(&self) -> DeleteWebhookFluentBuilder
Constructs a fluent builder for the DeleteWebhook
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the webhook you want to delete.
- On success, responds with
DeleteWebhookOutput
- On failure, responds with
SdkError<DeleteWebhookError>
Source§impl Client
impl Client
Sourcepub fn deregister_webhook_with_third_party(
&self,
) -> DeregisterWebhookWithThirdPartyFluentBuilder
pub fn deregister_webhook_with_third_party( &self, ) -> DeregisterWebhookWithThirdPartyFluentBuilder
Constructs a fluent builder for the DeregisterWebhookWithThirdParty
operation.
- The fluent builder is configurable:
webhook_name(impl Into<String>)
/set_webhook_name(Option<String>)
:
required: falseThe name of the webhook you want to deregister.
- On success, responds with
DeregisterWebhookWithThirdPartyOutput
- On failure, responds with
SdkError<DeregisterWebhookWithThirdPartyError>
Source§impl Client
impl Client
Sourcepub fn disable_stage_transition(&self) -> DisableStageTransitionFluentBuilder
pub fn disable_stage_transition(&self) -> DisableStageTransitionFluentBuilder
Constructs a fluent builder for the DisableStageTransition
operation.
- The fluent builder is configurable:
pipeline_name(impl Into<String>)
/set_pipeline_name(Option<String>)
:
required: trueThe name of the pipeline in which you want to disable the flow of artifacts from one stage to another.
stage_name(impl Into<String>)
/set_stage_name(Option<String>)
:
required: trueThe name of the stage where you want to disable the inbound or outbound transition of artifacts.
transition_type(StageTransitionType)
/set_transition_type(Option<StageTransitionType>)
:
required: trueSpecifies whether artifacts are prevented from transitioning into the stage and being processed by the actions in that stage (inbound), or prevented from transitioning from the stage after they have been processed by the actions in that stage (outbound).
reason(impl Into<String>)
/set_reason(Option<String>)
:
required: trueThe reason given to the user that a stage is disabled, such as waiting for manual approval or manual tests. This message is displayed in the pipeline console UI.
- On success, responds with
DisableStageTransitionOutput
- On failure, responds with
SdkError<DisableStageTransitionError>
Source§impl Client
impl Client
Sourcepub fn enable_stage_transition(&self) -> EnableStageTransitionFluentBuilder
pub fn enable_stage_transition(&self) -> EnableStageTransitionFluentBuilder
Constructs a fluent builder for the EnableStageTransition
operation.
- The fluent builder is configurable:
pipeline_name(impl Into<String>)
/set_pipeline_name(Option<String>)
:
required: trueThe name of the pipeline in which you want to enable the flow of artifacts from one stage to another.
stage_name(impl Into<String>)
/set_stage_name(Option<String>)
:
required: trueThe name of the stage where you want to enable the transition of artifacts, either into the stage (inbound) or from that stage to the next stage (outbound).
transition_type(StageTransitionType)
/set_transition_type(Option<StageTransitionType>)
:
required: trueSpecifies whether artifacts are allowed to enter the stage and be processed by the actions in that stage (inbound) or whether already processed artifacts are allowed to transition to the next stage (outbound).
- On success, responds with
EnableStageTransitionOutput
- On failure, responds with
SdkError<EnableStageTransitionError>
Source§impl Client
impl Client
Sourcepub fn get_action_type(&self) -> GetActionTypeFluentBuilder
pub fn get_action_type(&self) -> GetActionTypeFluentBuilder
Constructs a fluent builder for the GetActionType
operation.
- The fluent builder is configurable:
category(ActionCategory)
/set_category(Option<ActionCategory>)
:
required: trueDefines what kind of action can be taken in the stage. The following are the valid values:
-
Source
-
Build
-
Test
-
Deploy
-
Approval
-
Invoke
-
Compute
-
owner(impl Into<String>)
/set_owner(Option<String>)
:
required: trueThe creator of an action type that was created with any supported integration model. There are two valid values:
AWS
andThirdParty
.provider(impl Into<String>)
/set_provider(Option<String>)
:
required: trueThe provider of the action type being called. The provider name is specified when the action type is created.
version(impl Into<String>)
/set_version(Option<String>)
:
required: trueA string that describes the action type version.
- On success, responds with
GetActionTypeOutput
with field(s):action_type(Option<ActionTypeDeclaration>)
:The action type information for the requested action type, such as the action type ID.
- On failure, responds with
SdkError<GetActionTypeError>
Source§impl Client
impl Client
Sourcepub fn get_job_details(&self) -> GetJobDetailsFluentBuilder
pub fn get_job_details(&self) -> GetJobDetailsFluentBuilder
Constructs a fluent builder for the GetJobDetails
operation.
- The fluent builder is configurable:
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe unique system-generated ID for the job.
- On success, responds with
GetJobDetailsOutput
with field(s):job_details(Option<JobDetails>)
:The details of the job.
If AWSSessionCredentials is used, a long-running job can call
GetJobDetails
again to obtain new credentials.
- On failure, responds with
SdkError<GetJobDetailsError>
Source§impl Client
impl Client
Sourcepub fn get_pipeline(&self) -> GetPipelineFluentBuilder
pub fn get_pipeline(&self) -> GetPipelineFluentBuilder
Constructs a fluent builder for the GetPipeline
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the pipeline for which you want to get information. Pipeline names must be unique in an Amazon Web Services account.
version(i32)
/set_version(Option<i32>)
:
required: falseThe version number of the pipeline. If you do not specify a version, defaults to the current version.
- On success, responds with
GetPipelineOutput
with field(s):pipeline(Option<PipelineDeclaration>)
:Represents the structure of actions and stages to be performed in the pipeline.
metadata(Option<PipelineMetadata>)
:Represents the pipeline metadata information returned as part of the output of a
GetPipeline
action.
- On failure, responds with
SdkError<GetPipelineError>
Source§impl Client
impl Client
Sourcepub fn get_pipeline_execution(&self) -> GetPipelineExecutionFluentBuilder
pub fn get_pipeline_execution(&self) -> GetPipelineExecutionFluentBuilder
Constructs a fluent builder for the GetPipelineExecution
operation.
- The fluent builder is configurable:
pipeline_name(impl Into<String>)
/set_pipeline_name(Option<String>)
:
required: trueThe name of the pipeline about which you want to get execution details.
pipeline_execution_id(impl Into<String>)
/set_pipeline_execution_id(Option<String>)
:
required: trueThe ID of the pipeline execution about which you want to get execution details.
- On success, responds with
GetPipelineExecutionOutput
with field(s):pipeline_execution(Option<PipelineExecution>)
:Represents information about the execution of a pipeline.
- On failure, responds with
SdkError<GetPipelineExecutionError>
Source§impl Client
impl Client
Sourcepub fn get_pipeline_state(&self) -> GetPipelineStateFluentBuilder
pub fn get_pipeline_state(&self) -> GetPipelineStateFluentBuilder
Constructs a fluent builder for the GetPipelineState
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the pipeline about which you want to get information.
- On success, responds with
GetPipelineStateOutput
with field(s):pipeline_name(Option<String>)
:The name of the pipeline for which you want to get the state.
pipeline_version(Option<i32>)
:The version number of the pipeline.
A newly created pipeline is always assigned a version number of
1
.stage_states(Option<Vec::<StageState>>)
:A list of the pipeline stage output information, including stage name, state, most recent run details, whether the stage is disabled, and other data.
created(Option<DateTime>)
:The date and time the pipeline was created, in timestamp format.
updated(Option<DateTime>)
:The date and time the pipeline was last updated, in timestamp format.
- On failure, responds with
SdkError<GetPipelineStateError>
Source§impl Client
impl Client
Sourcepub fn get_third_party_job_details(
&self,
) -> GetThirdPartyJobDetailsFluentBuilder
pub fn get_third_party_job_details( &self, ) -> GetThirdPartyJobDetailsFluentBuilder
Constructs a fluent builder for the GetThirdPartyJobDetails
operation.
- The fluent builder is configurable:
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe unique system-generated ID used for identifying the job.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: trueThe clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.
- On success, responds with
GetThirdPartyJobDetailsOutput
with field(s):job_details(Option<ThirdPartyJobDetails>)
:The details of the job, including any protected values defined for the job.
- On failure, responds with
SdkError<GetThirdPartyJobDetailsError>
Source§impl Client
impl Client
Sourcepub fn list_action_executions(&self) -> ListActionExecutionsFluentBuilder
pub fn list_action_executions(&self) -> ListActionExecutionsFluentBuilder
Constructs a fluent builder for the ListActionExecutions
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
pipeline_name(impl Into<String>)
/set_pipeline_name(Option<String>)
:
required: trueThe name of the pipeline for which you want to list action execution history.
filter(ActionExecutionFilter)
/set_filter(Option<ActionExecutionFilter>)
:
required: falseInput information used to filter action execution history.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value. Action execution history is retained for up to 12 months, based on action execution start times. Default value is 100.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token that was returned from the previous
ListActionExecutions
call, which can be used to return the next set of action executions in the list.
- On success, responds with
ListActionExecutionsOutput
with field(s):action_execution_details(Option<Vec::<ActionExecutionDetail>>)
:The details for a list of recent executions, such as action execution ID.
next_token(Option<String>)
:If the amount of returned information is significantly large, an identifier is also returned and can be used in a subsequent
ListActionExecutions
call to return the next set of action executions in the list.
- On failure, responds with
SdkError<ListActionExecutionsError>
Source§impl Client
impl Client
Sourcepub fn list_action_types(&self) -> ListActionTypesFluentBuilder
pub fn list_action_types(&self) -> ListActionTypesFluentBuilder
Constructs a fluent builder for the ListActionTypes
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
action_owner_filter(ActionOwner)
/set_action_owner_filter(Option<ActionOwner>)
:
required: falseFilters the list of action types to those created by a specified entity.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseAn identifier that was returned from the previous list action types call, which can be used to return the next set of action types in the list.
region_filter(impl Into<String>)
/set_region_filter(Option<String>)
:
required: falseThe Region to filter on for the list of action types.
- On success, responds with
ListActionTypesOutput
with field(s):action_types(Vec::<ActionType>)
:Provides details of the action types.
next_token(Option<String>)
:If the amount of returned information is significantly large, an identifier is also returned. It can be used in a subsequent list action types call to return the next set of action types in the list.
- On failure, responds with
SdkError<ListActionTypesError>
Source§impl Client
impl Client
Sourcepub fn list_pipeline_executions(&self) -> ListPipelineExecutionsFluentBuilder
pub fn list_pipeline_executions(&self) -> ListPipelineExecutionsFluentBuilder
Constructs a fluent builder for the ListPipelineExecutions
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
pipeline_name(impl Into<String>)
/set_pipeline_name(Option<String>)
:
required: trueThe name of the pipeline for which you want to get execution summary information.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value. Pipeline history is limited to the most recent 12 months, based on pipeline execution start times. Default value is 100.
filter(PipelineExecutionFilter)
/set_filter(Option<PipelineExecutionFilter>)
:
required: falseThe pipeline execution to filter on.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token that was returned from the previous
ListPipelineExecutions
call, which can be used to return the next set of pipeline executions in the list.
- On success, responds with
ListPipelineExecutionsOutput
with field(s):pipeline_execution_summaries(Option<Vec::<PipelineExecutionSummary>>)
:A list of executions in the history of a pipeline.
next_token(Option<String>)
:A token that can be used in the next
ListPipelineExecutions
call. To view all items in the list, continue to call this operation with each subsequent token until no more nextToken values are returned.
- On failure, responds with
SdkError<ListPipelineExecutionsError>
Source§impl Client
impl Client
Sourcepub fn list_pipelines(&self) -> ListPipelinesFluentBuilder
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:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseAn identifier that was returned from the previous list pipelines call. It can be used to return the next set of pipelines in the list.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of pipelines to return in a single call. To retrieve the remaining pipelines, make another call with the returned nextToken value. The minimum value you can specify is 1. The maximum accepted value is 1000.
- On success, responds with
ListPipelinesOutput
with field(s):pipelines(Option<Vec::<PipelineSummary>>)
:The list of pipelines.
next_token(Option<String>)
:If the amount of returned information is significantly large, an identifier is also returned. It can be used in a subsequent list pipelines call to return the next set of pipelines in the list.
- On failure, responds with
SdkError<ListPipelinesError>
Source§impl Client
impl Client
Sourcepub fn list_rule_executions(&self) -> ListRuleExecutionsFluentBuilder
pub fn list_rule_executions(&self) -> ListRuleExecutionsFluentBuilder
Constructs a fluent builder for the ListRuleExecutions
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
pipeline_name(impl Into<String>)
/set_pipeline_name(Option<String>)
:
required: trueThe name of the pipeline for which you want to get execution summary information.
filter(RuleExecutionFilter)
/set_filter(Option<RuleExecutionFilter>)
:
required: falseInput information used to filter rule execution history.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value. Pipeline history is limited to the most recent 12 months, based on pipeline execution start times. Default value is 100.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token that was returned from the previous
ListRuleExecutions
call, which can be used to return the next set of rule executions in the list.
- On success, responds with
ListRuleExecutionsOutput
with field(s):rule_execution_details(Option<Vec::<RuleExecutionDetail>>)
:Details about the output for listing rule executions.
next_token(Option<String>)
:A token that can be used in the next
ListRuleExecutions
call. To view all items in the list, continue to call this operation with each subsequent token until no more nextToken values are returned.
- On failure, responds with
SdkError<ListRuleExecutionsError>
Source§impl Client
impl Client
Sourcepub fn list_rule_types(&self) -> ListRuleTypesFluentBuilder
pub fn list_rule_types(&self) -> ListRuleTypesFluentBuilder
Constructs a fluent builder for the ListRuleTypes
operation.
- The fluent builder is configurable:
rule_owner_filter(RuleOwner)
/set_rule_owner_filter(Option<RuleOwner>)
:
required: falseThe rule owner to filter on.
region_filter(impl Into<String>)
/set_region_filter(Option<String>)
:
required: falseThe rule Region to filter on.
- On success, responds with
ListRuleTypesOutput
with field(s):rule_types(Vec::<RuleType>)
:Lists the rules that are configured for the condition.
- On failure, responds with
SdkError<ListRuleTypesError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the resource to get tags for.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token that was returned from the previous API call, which would be used to return the next page of the list. The ListTagsforResource call lists all available tags in one call and does not use pagination.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return in a single call.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<Vec::<Tag>>)
:The tags for the resource.
next_token(Option<String>)
:If the amount of returned information is significantly large, an identifier is also returned and can be used in a subsequent API call to return the next page of the list. The ListTagsforResource call lists all available tags in one call and does not use pagination.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn list_webhooks(&self) -> ListWebhooksFluentBuilder
pub fn list_webhooks(&self) -> ListWebhooksFluentBuilder
Constructs a fluent builder for the ListWebhooks
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token that was returned from the previous ListWebhooks call, which can be used to return the next set of webhooks in the list.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value.
- On success, responds with
ListWebhooksOutput
with field(s):webhooks(Option<Vec::<ListWebhookItem>>)
:The JSON detail returned for each webhook in the list output for the ListWebhooks call.
next_token(Option<String>)
:If the amount of returned information is significantly large, an identifier is also returned and can be used in a subsequent ListWebhooks call to return the next set of webhooks in the list.
- On failure, responds with
SdkError<ListWebhooksError>
Source§impl Client
impl Client
Sourcepub fn override_stage_condition(&self) -> OverrideStageConditionFluentBuilder
pub fn override_stage_condition(&self) -> OverrideStageConditionFluentBuilder
Constructs a fluent builder for the OverrideStageCondition
operation.
- The fluent builder is configurable:
pipeline_name(impl Into<String>)
/set_pipeline_name(Option<String>)
:
required: trueThe name of the pipeline with the stage that will override the condition.
stage_name(impl Into<String>)
/set_stage_name(Option<String>)
:
required: trueThe name of the stage for the override.
pipeline_execution_id(impl Into<String>)
/set_pipeline_execution_id(Option<String>)
:
required: trueThe ID of the pipeline execution for the override.
condition_type(ConditionType)
/set_condition_type(Option<ConditionType>)
:
required: trueThe type of condition to override for the stage, such as entry conditions, failure conditions, or success conditions.
- On success, responds with
OverrideStageConditionOutput
- On failure, responds with
SdkError<OverrideStageConditionError>
Source§impl Client
impl Client
Sourcepub fn poll_for_jobs(&self) -> PollForJobsFluentBuilder
pub fn poll_for_jobs(&self) -> PollForJobsFluentBuilder
Constructs a fluent builder for the PollForJobs
operation.
- The fluent builder is configurable:
action_type_id(ActionTypeId)
/set_action_type_id(Option<ActionTypeId>)
:
required: trueRepresents information about an action type.
max_batch_size(i32)
/set_max_batch_size(Option<i32>)
:
required: falseThe maximum number of jobs to return in a poll for jobs call.
query_param(impl Into<String>, impl Into<String>)
/set_query_param(Option<HashMap::<String, String>>)
:
required: falseA map of property names and values. For an action type with no queryable properties, this value must be null or an empty map. For an action type with a queryable property, you must supply that property as a key in the map. Only jobs whose action configuration matches the mapped value are returned.
- On success, responds with
PollForJobsOutput
with field(s):jobs(Option<Vec::<Job>>)
:Information about the jobs to take action on.
- On failure, responds with
SdkError<PollForJobsError>
Source§impl Client
impl Client
Sourcepub fn poll_for_third_party_jobs(&self) -> PollForThirdPartyJobsFluentBuilder
pub fn poll_for_third_party_jobs(&self) -> PollForThirdPartyJobsFluentBuilder
Constructs a fluent builder for the PollForThirdPartyJobs
operation.
- The fluent builder is configurable:
action_type_id(ActionTypeId)
/set_action_type_id(Option<ActionTypeId>)
:
required: trueRepresents information about an action type.
max_batch_size(i32)
/set_max_batch_size(Option<i32>)
:
required: falseThe maximum number of jobs to return in a poll for jobs call.
- On success, responds with
PollForThirdPartyJobsOutput
with field(s):jobs(Option<Vec::<ThirdPartyJob>>)
:Information about the jobs to take action on.
- On failure, responds with
SdkError<PollForThirdPartyJobsError>
Source§impl Client
impl Client
Sourcepub fn put_action_revision(&self) -> PutActionRevisionFluentBuilder
pub fn put_action_revision(&self) -> PutActionRevisionFluentBuilder
Constructs a fluent builder for the PutActionRevision
operation.
- The fluent builder is configurable:
pipeline_name(impl Into<String>)
/set_pipeline_name(Option<String>)
:
required: trueThe name of the pipeline that starts processing the revision to the source.
stage_name(impl Into<String>)
/set_stage_name(Option<String>)
:
required: trueThe name of the stage that contains the action that acts on the revision.
action_name(impl Into<String>)
/set_action_name(Option<String>)
:
required: trueThe name of the action that processes the revision.
action_revision(ActionRevision)
/set_action_revision(Option<ActionRevision>)
:
required: trueRepresents information about the version (or revision) of an action.
- On success, responds with
PutActionRevisionOutput
with field(s):new_revision(bool)
:Indicates whether the artifact revision was previously used in an execution of the specified pipeline.
pipeline_execution_id(Option<String>)
:The ID of the current workflow state of the pipeline.
- On failure, responds with
SdkError<PutActionRevisionError>
Source§impl Client
impl Client
Sourcepub fn put_approval_result(&self) -> PutApprovalResultFluentBuilder
pub fn put_approval_result(&self) -> PutApprovalResultFluentBuilder
Constructs a fluent builder for the PutApprovalResult
operation.
- The fluent builder is configurable:
pipeline_name(impl Into<String>)
/set_pipeline_name(Option<String>)
:
required: trueThe name of the pipeline that contains the action.
stage_name(impl Into<String>)
/set_stage_name(Option<String>)
:
required: trueThe name of the stage that contains the action.
action_name(impl Into<String>)
/set_action_name(Option<String>)
:
required: trueThe name of the action for which approval is requested.
result(ApprovalResult)
/set_result(Option<ApprovalResult>)
:
required: trueRepresents information about the result of the approval request.
token(impl Into<String>)
/set_token(Option<String>)
:
required: trueThe system-generated token used to identify a unique approval request. The token for each open approval request can be obtained using the
GetPipelineState
action. It is used to validate that the approval request corresponding to this token is still valid.For a pipeline where the execution mode is set to PARALLEL, the token required to approve/reject an approval request as detailed above is not available. Instead, use the
externalExecutionId
in the response output from theListActionExecutions
action as the token in the approval request.
- On success, responds with
PutApprovalResultOutput
with field(s):approved_at(Option<DateTime>)
:The timestamp showing when the approval or rejection was submitted.
- On failure, responds with
SdkError<PutApprovalResultError>
Source§impl Client
impl Client
Sourcepub fn put_job_failure_result(&self) -> PutJobFailureResultFluentBuilder
pub fn put_job_failure_result(&self) -> PutJobFailureResultFluentBuilder
Constructs a fluent builder for the PutJobFailureResult
operation.
- The fluent builder is configurable:
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe unique system-generated ID of the job that failed. This is the same ID returned from
PollForJobs
.failure_details(FailureDetails)
/set_failure_details(Option<FailureDetails>)
:
required: trueThe details about the failure of a job.
- On success, responds with
PutJobFailureResultOutput
- On failure, responds with
SdkError<PutJobFailureResultError>
Source§impl Client
impl Client
Sourcepub fn put_job_success_result(&self) -> PutJobSuccessResultFluentBuilder
pub fn put_job_success_result(&self) -> PutJobSuccessResultFluentBuilder
Constructs a fluent builder for the PutJobSuccessResult
operation.
- The fluent builder is configurable:
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe unique system-generated ID of the job that succeeded. This is the same ID returned from
PollForJobs
.current_revision(CurrentRevision)
/set_current_revision(Option<CurrentRevision>)
:
required: falseThe ID of the current revision of the artifact successfully worked on by the job.
continuation_token(impl Into<String>)
/set_continuation_token(Option<String>)
:
required: falseA token generated by a job worker, such as a CodeDeploy deployment ID, that a successful job provides to identify a custom action in progress. Future jobs use this token to identify the running instance of the action. It can be reused to return more information about the progress of the custom action. When the action is complete, no continuation token should be supplied.
execution_details(ExecutionDetails)
/set_execution_details(Option<ExecutionDetails>)
:
required: falseThe execution details of the successful job, such as the actions taken by the job worker.
output_variables(impl Into<String>, impl Into<String>)
/set_output_variables(Option<HashMap::<String, String>>)
:
required: falseKey-value pairs produced as output by a job worker that can be made available to a downstream action configuration.
outputVariables
can be included only when there is no continuation token on the request.
- On success, responds with
PutJobSuccessResultOutput
- On failure, responds with
SdkError<PutJobSuccessResultError>
Source§impl Client
impl Client
Sourcepub fn put_third_party_job_failure_result(
&self,
) -> PutThirdPartyJobFailureResultFluentBuilder
pub fn put_third_party_job_failure_result( &self, ) -> PutThirdPartyJobFailureResultFluentBuilder
Constructs a fluent builder for the PutThirdPartyJobFailureResult
operation.
- The fluent builder is configurable:
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe ID of the job that failed. This is the same ID returned from
PollForThirdPartyJobs
.client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: trueThe clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.
failure_details(FailureDetails)
/set_failure_details(Option<FailureDetails>)
:
required: trueRepresents information about failure details.
- On success, responds with
PutThirdPartyJobFailureResultOutput
- On failure, responds with
SdkError<PutThirdPartyJobFailureResultError>
Source§impl Client
impl Client
Sourcepub fn put_third_party_job_success_result(
&self,
) -> PutThirdPartyJobSuccessResultFluentBuilder
pub fn put_third_party_job_success_result( &self, ) -> PutThirdPartyJobSuccessResultFluentBuilder
Constructs a fluent builder for the PutThirdPartyJobSuccessResult
operation.
- The fluent builder is configurable:
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe ID of the job that successfully completed. This is the same ID returned from
PollForThirdPartyJobs
.client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: trueThe clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.
current_revision(CurrentRevision)
/set_current_revision(Option<CurrentRevision>)
:
required: falseRepresents information about a current revision.
continuation_token(impl Into<String>)
/set_continuation_token(Option<String>)
:
required: falseA token generated by a job worker, such as a CodeDeploy deployment ID, that a successful job provides to identify a partner action in progress. Future jobs use this token to identify the running instance of the action. It can be reused to return more information about the progress of the partner action. When the action is complete, no continuation token should be supplied.
execution_details(ExecutionDetails)
/set_execution_details(Option<ExecutionDetails>)
:
required: falseThe details of the actions taken and results produced on an artifact as it passes through stages in the pipeline.
- On success, responds with
PutThirdPartyJobSuccessResultOutput
- On failure, responds with
SdkError<PutThirdPartyJobSuccessResultError>
Source§impl Client
impl Client
Sourcepub fn put_webhook(&self) -> PutWebhookFluentBuilder
pub fn put_webhook(&self) -> PutWebhookFluentBuilder
Constructs a fluent builder for the PutWebhook
operation.
- The fluent builder is configurable:
webhook(WebhookDefinition)
/set_webhook(Option<WebhookDefinition>)
:
required: trueThe detail provided in an input file to create the webhook, such as the webhook name, the pipeline name, and the action name. Give the webhook a unique name that helps you identify it. You might name the webhook after the pipeline and action it targets so that you can easily recognize what it’s used for later.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseThe tags for the webhook.
- On success, responds with
PutWebhookOutput
with field(s):webhook(Option<ListWebhookItem>)
:The detail returned from creating the webhook, such as the webhook name, webhook URL, and webhook ARN.
- On failure, responds with
SdkError<PutWebhookError>
Source§impl Client
impl Client
Sourcepub fn register_webhook_with_third_party(
&self,
) -> RegisterWebhookWithThirdPartyFluentBuilder
pub fn register_webhook_with_third_party( &self, ) -> RegisterWebhookWithThirdPartyFluentBuilder
Constructs a fluent builder for the RegisterWebhookWithThirdParty
operation.
- The fluent builder is configurable:
webhook_name(impl Into<String>)
/set_webhook_name(Option<String>)
:
required: falseThe name of an existing webhook created with PutWebhook to register with a supported third party.
- On success, responds with
RegisterWebhookWithThirdPartyOutput
- On failure, responds with
SdkError<RegisterWebhookWithThirdPartyError>
Source§impl Client
impl Client
Sourcepub fn retry_stage_execution(&self) -> RetryStageExecutionFluentBuilder
pub fn retry_stage_execution(&self) -> RetryStageExecutionFluentBuilder
Constructs a fluent builder for the RetryStageExecution
operation.
- The fluent builder is configurable:
pipeline_name(impl Into<String>)
/set_pipeline_name(Option<String>)
:
required: trueThe name of the pipeline that contains the failed stage.
stage_name(impl Into<String>)
/set_stage_name(Option<String>)
:
required: trueThe name of the failed stage to be retried.
pipeline_execution_id(impl Into<String>)
/set_pipeline_execution_id(Option<String>)
:
required: trueThe ID of the pipeline execution in the failed stage to be retried. Use the
GetPipelineState
action to retrieve the current pipelineExecutionId of the failed stageretry_mode(StageRetryMode)
/set_retry_mode(Option<StageRetryMode>)
:
required: trueThe scope of the retry attempt.
- On success, responds with
RetryStageExecutionOutput
with field(s):pipeline_execution_id(Option<String>)
:The ID of the current workflow execution in the failed stage.
- On failure, responds with
SdkError<RetryStageExecutionError>
Source§impl Client
impl Client
Sourcepub fn rollback_stage(&self) -> RollbackStageFluentBuilder
pub fn rollback_stage(&self) -> RollbackStageFluentBuilder
Constructs a fluent builder for the RollbackStage
operation.
- The fluent builder is configurable:
pipeline_name(impl Into<String>)
/set_pipeline_name(Option<String>)
:
required: trueThe name of the pipeline for which the stage will be rolled back.
stage_name(impl Into<String>)
/set_stage_name(Option<String>)
:
required: trueThe name of the stage in the pipeline to be rolled back.
target_pipeline_execution_id(impl Into<String>)
/set_target_pipeline_execution_id(Option<String>)
:
required: trueThe pipeline execution ID for the stage to be rolled back to.
- On success, responds with
RollbackStageOutput
with field(s):pipeline_execution_id(String)
:The execution ID of the pipeline execution for the stage that has been rolled back.
- On failure, responds with
SdkError<RollbackStageError>
Source§impl Client
impl Client
Sourcepub fn start_pipeline_execution(&self) -> StartPipelineExecutionFluentBuilder
pub fn start_pipeline_execution(&self) -> StartPipelineExecutionFluentBuilder
Constructs a fluent builder for the StartPipelineExecution
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the pipeline to start.
variables(PipelineVariable)
/set_variables(Option<Vec::<PipelineVariable>>)
:
required: falseA list that overrides pipeline variables for a pipeline execution that’s being started. Variable names must match
[A-Za-z0-9@-_]+
, and the values can be anything except an empty string.client_request_token(impl Into<String>)
/set_client_request_token(Option<String>)
:
required: falseThe system-generated unique ID used to identify a unique execution request.
source_revisions(SourceRevisionOverride)
/set_source_revisions(Option<Vec::<SourceRevisionOverride>>)
:
required: falseA list that allows you to specify, or override, the source revision for a pipeline execution that’s being started. A source revision is the version with all the changes to your application code, or source artifact, for the pipeline execution.
- On success, responds with
StartPipelineExecutionOutput
with field(s):pipeline_execution_id(Option<String>)
:The unique system-generated ID of the pipeline execution that was started.
- On failure, responds with
SdkError<StartPipelineExecutionError>
Source§impl Client
impl Client
Sourcepub fn stop_pipeline_execution(&self) -> StopPipelineExecutionFluentBuilder
pub fn stop_pipeline_execution(&self) -> StopPipelineExecutionFluentBuilder
Constructs a fluent builder for the StopPipelineExecution
operation.
- The fluent builder is configurable:
pipeline_name(impl Into<String>)
/set_pipeline_name(Option<String>)
:
required: trueThe name of the pipeline to stop.
pipeline_execution_id(impl Into<String>)
/set_pipeline_execution_id(Option<String>)
:
required: trueThe ID of the pipeline execution to be stopped in the current stage. Use the
GetPipelineState
action to retrieve the current pipelineExecutionId.abandon(bool)
/set_abandon(Option<bool>)
:
required: falseUse this option to stop the pipeline execution by abandoning, rather than finishing, in-progress actions.
This option can lead to failed or out-of-sequence tasks.
reason(impl Into<String>)
/set_reason(Option<String>)
:
required: falseUse this option to enter comments, such as the reason the pipeline was stopped.
- On success, responds with
StopPipelineExecutionOutput
with field(s):pipeline_execution_id(Option<String>)
:The unique system-generated ID of the pipeline execution that was stopped.
- On failure, responds with
SdkError<StopPipelineExecutionError>
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: trueThe Amazon Resource Name (ARN) of the resource you want to add tags to.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: trueThe tags you want to modify or add to the resource.
- 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: trueThe Amazon Resource Name (ARN) of the resource to remove tags from.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe list of keys for the tags to be removed from the resource.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_action_type(&self) -> UpdateActionTypeFluentBuilder
pub fn update_action_type(&self) -> UpdateActionTypeFluentBuilder
Constructs a fluent builder for the UpdateActionType
operation.
- The fluent builder is configurable:
action_type(ActionTypeDeclaration)
/set_action_type(Option<ActionTypeDeclaration>)
:
required: trueThe action type definition for the action type to be updated.
- On success, responds with
UpdateActionTypeOutput
- On failure, responds with
SdkError<UpdateActionTypeError>
Source§impl Client
impl Client
Sourcepub fn update_pipeline(&self) -> UpdatePipelineFluentBuilder
pub fn update_pipeline(&self) -> UpdatePipelineFluentBuilder
Constructs a fluent builder for the UpdatePipeline
operation.
- The fluent builder is configurable:
pipeline(PipelineDeclaration)
/set_pipeline(Option<PipelineDeclaration>)
:
required: trueThe name of the pipeline to be updated.
- On success, responds with
UpdatePipelineOutput
with field(s):pipeline(Option<PipelineDeclaration>)
:The structure of the updated pipeline.
- On failure, responds with
SdkError<UpdatePipelineError>
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>
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>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
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>
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>
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>
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>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
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 rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
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);