#[non_exhaustive]pub struct TargetBuilder { /* private fields */ }
Expand description
A builder for Target
.
Implementations§
Source§impl TargetBuilder
impl TargetBuilder
Sourcepub fn arn(self, input: impl Into<String>) -> Self
pub fn arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the target.
This field is required.Sourcepub fn set_arn(self, input: Option<String>) -> Self
pub fn set_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the target.
Sourcepub fn role_arn(self, input: impl Into<String>) -> Self
pub fn role_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the IAM role that EventBridge Scheduler will use for this target when the schedule is invoked.
This field is required.Sourcepub fn set_role_arn(self, input: Option<String>) -> Self
pub fn set_role_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the IAM role that EventBridge Scheduler will use for this target when the schedule is invoked.
Sourcepub fn get_role_arn(&self) -> &Option<String>
pub fn get_role_arn(&self) -> &Option<String>
The Amazon Resource Name (ARN) of the IAM role that EventBridge Scheduler will use for this target when the schedule is invoked.
Sourcepub fn dead_letter_config(self, input: DeadLetterConfig) -> Self
pub fn dead_letter_config(self, input: DeadLetterConfig) -> Self
An object that contains information about an Amazon SQS queue that EventBridge Scheduler uses as a dead-letter queue for your schedule. If specified, EventBridge Scheduler delivers failed events that could not be successfully delivered to a target to the queue.
Sourcepub fn set_dead_letter_config(self, input: Option<DeadLetterConfig>) -> Self
pub fn set_dead_letter_config(self, input: Option<DeadLetterConfig>) -> Self
An object that contains information about an Amazon SQS queue that EventBridge Scheduler uses as a dead-letter queue for your schedule. If specified, EventBridge Scheduler delivers failed events that could not be successfully delivered to a target to the queue.
Sourcepub fn get_dead_letter_config(&self) -> &Option<DeadLetterConfig>
pub fn get_dead_letter_config(&self) -> &Option<DeadLetterConfig>
An object that contains information about an Amazon SQS queue that EventBridge Scheduler uses as a dead-letter queue for your schedule. If specified, EventBridge Scheduler delivers failed events that could not be successfully delivered to a target to the queue.
Sourcepub fn retry_policy(self, input: RetryPolicy) -> Self
pub fn retry_policy(self, input: RetryPolicy) -> Self
A RetryPolicy
object that includes information about the retry policy settings, including the maximum age of an event, and the maximum number of times EventBridge Scheduler will try to deliver the event to a target.
Sourcepub fn set_retry_policy(self, input: Option<RetryPolicy>) -> Self
pub fn set_retry_policy(self, input: Option<RetryPolicy>) -> Self
A RetryPolicy
object that includes information about the retry policy settings, including the maximum age of an event, and the maximum number of times EventBridge Scheduler will try to deliver the event to a target.
Sourcepub fn get_retry_policy(&self) -> &Option<RetryPolicy>
pub fn get_retry_policy(&self) -> &Option<RetryPolicy>
A RetryPolicy
object that includes information about the retry policy settings, including the maximum age of an event, and the maximum number of times EventBridge Scheduler will try to deliver the event to a target.
Sourcepub fn input(self, input: impl Into<String>) -> Self
pub fn input(self, input: impl Into<String>) -> Self
The text, or well-formed JSON, passed to the target. If you are configuring a templated Lambda, AWS Step Functions, or Amazon EventBridge target, the input must be a well-formed JSON. For all other target types, a JSON is not required. If you do not specify anything for this field, EventBridge Scheduler delivers a default notification to the target.
Sourcepub fn set_input(self, input: Option<String>) -> Self
pub fn set_input(self, input: Option<String>) -> Self
The text, or well-formed JSON, passed to the target. If you are configuring a templated Lambda, AWS Step Functions, or Amazon EventBridge target, the input must be a well-formed JSON. For all other target types, a JSON is not required. If you do not specify anything for this field, EventBridge Scheduler delivers a default notification to the target.
Sourcepub fn get_input(&self) -> &Option<String>
pub fn get_input(&self) -> &Option<String>
The text, or well-formed JSON, passed to the target. If you are configuring a templated Lambda, AWS Step Functions, or Amazon EventBridge target, the input must be a well-formed JSON. For all other target types, a JSON is not required. If you do not specify anything for this field, EventBridge Scheduler delivers a default notification to the target.
Sourcepub fn ecs_parameters(self, input: EcsParameters) -> Self
pub fn ecs_parameters(self, input: EcsParameters) -> Self
The templated target type for the Amazon ECS RunTask
API operation.
Sourcepub fn set_ecs_parameters(self, input: Option<EcsParameters>) -> Self
pub fn set_ecs_parameters(self, input: Option<EcsParameters>) -> Self
The templated target type for the Amazon ECS RunTask
API operation.
Sourcepub fn get_ecs_parameters(&self) -> &Option<EcsParameters>
pub fn get_ecs_parameters(&self) -> &Option<EcsParameters>
The templated target type for the Amazon ECS RunTask
API operation.
Sourcepub fn event_bridge_parameters(self, input: EventBridgeParameters) -> Self
pub fn event_bridge_parameters(self, input: EventBridgeParameters) -> Self
The templated target type for the EventBridge PutEvents
API operation.
Sourcepub fn set_event_bridge_parameters(
self,
input: Option<EventBridgeParameters>,
) -> Self
pub fn set_event_bridge_parameters( self, input: Option<EventBridgeParameters>, ) -> Self
The templated target type for the EventBridge PutEvents
API operation.
Sourcepub fn get_event_bridge_parameters(&self) -> &Option<EventBridgeParameters>
pub fn get_event_bridge_parameters(&self) -> &Option<EventBridgeParameters>
The templated target type for the EventBridge PutEvents
API operation.
Sourcepub fn kinesis_parameters(self, input: KinesisParameters) -> Self
pub fn kinesis_parameters(self, input: KinesisParameters) -> Self
The templated target type for the Amazon Kinesis PutRecord
API operation.
Sourcepub fn set_kinesis_parameters(self, input: Option<KinesisParameters>) -> Self
pub fn set_kinesis_parameters(self, input: Option<KinesisParameters>) -> Self
The templated target type for the Amazon Kinesis PutRecord
API operation.
Sourcepub fn get_kinesis_parameters(&self) -> &Option<KinesisParameters>
pub fn get_kinesis_parameters(&self) -> &Option<KinesisParameters>
The templated target type for the Amazon Kinesis PutRecord
API operation.
Sourcepub fn sage_maker_pipeline_parameters(
self,
input: SageMakerPipelineParameters,
) -> Self
pub fn sage_maker_pipeline_parameters( self, input: SageMakerPipelineParameters, ) -> Self
The templated target type for the Amazon SageMaker StartPipelineExecution
API operation.
Sourcepub fn set_sage_maker_pipeline_parameters(
self,
input: Option<SageMakerPipelineParameters>,
) -> Self
pub fn set_sage_maker_pipeline_parameters( self, input: Option<SageMakerPipelineParameters>, ) -> Self
The templated target type for the Amazon SageMaker StartPipelineExecution
API operation.
Sourcepub fn get_sage_maker_pipeline_parameters(
&self,
) -> &Option<SageMakerPipelineParameters>
pub fn get_sage_maker_pipeline_parameters( &self, ) -> &Option<SageMakerPipelineParameters>
The templated target type for the Amazon SageMaker StartPipelineExecution
API operation.
Sourcepub fn sqs_parameters(self, input: SqsParameters) -> Self
pub fn sqs_parameters(self, input: SqsParameters) -> Self
The templated target type for the Amazon SQS SendMessage
API operation. Contains the message group ID to use when the target is a FIFO queue. If you specify an Amazon SQS FIFO queue as a target, the queue must have content-based deduplication enabled. For more information, see Using the Amazon SQS message deduplication ID in the Amazon SQS Developer Guide.
Sourcepub fn set_sqs_parameters(self, input: Option<SqsParameters>) -> Self
pub fn set_sqs_parameters(self, input: Option<SqsParameters>) -> Self
The templated target type for the Amazon SQS SendMessage
API operation. Contains the message group ID to use when the target is a FIFO queue. If you specify an Amazon SQS FIFO queue as a target, the queue must have content-based deduplication enabled. For more information, see Using the Amazon SQS message deduplication ID in the Amazon SQS Developer Guide.
Sourcepub fn get_sqs_parameters(&self) -> &Option<SqsParameters>
pub fn get_sqs_parameters(&self) -> &Option<SqsParameters>
The templated target type for the Amazon SQS SendMessage
API operation. Contains the message group ID to use when the target is a FIFO queue. If you specify an Amazon SQS FIFO queue as a target, the queue must have content-based deduplication enabled. For more information, see Using the Amazon SQS message deduplication ID in the Amazon SQS Developer Guide.
Trait Implementations§
Source§impl Clone for TargetBuilder
impl Clone for TargetBuilder
Source§fn clone(&self) -> TargetBuilder
fn clone(&self) -> TargetBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TargetBuilder
impl Debug for TargetBuilder
Source§impl Default for TargetBuilder
impl Default for TargetBuilder
Source§fn default() -> TargetBuilder
fn default() -> TargetBuilder
Source§impl PartialEq for TargetBuilder
impl PartialEq for TargetBuilder
impl StructuralPartialEq for TargetBuilder
Auto Trait Implementations§
impl Freeze for TargetBuilder
impl RefUnwindSafe for TargetBuilder
impl Send for TargetBuilder
impl Sync for TargetBuilder
impl Unpin for TargetBuilder
impl UnwindSafe for TargetBuilder
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);