pub struct Client { /* private fields */ }
Expand description
Client for AWS Global Accelerator
Client for invoking operations on AWS Global Accelerator. Each operation on AWS Global Accelerator 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_globalaccelerator::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_globalaccelerator::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 AddCustomRoutingEndpoints
operation has
a Client::add_custom_routing_endpoints
, 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.add_custom_routing_endpoints()
.endpoint_group_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 add_custom_routing_endpoints(
&self,
) -> AddCustomRoutingEndpointsFluentBuilder
pub fn add_custom_routing_endpoints( &self, ) -> AddCustomRoutingEndpointsFluentBuilder
Constructs a fluent builder for the AddCustomRoutingEndpoints
operation.
- The fluent builder is configurable:
endpoint_configurations(CustomRoutingEndpointConfiguration)
/set_endpoint_configurations(Option<Vec::<CustomRoutingEndpointConfiguration>>)
:
required: trueThe list of endpoint objects to add to a custom routing accelerator.
endpoint_group_arn(impl Into<String>)
/set_endpoint_group_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the endpoint group for the custom routing endpoint.
- On success, responds with
AddCustomRoutingEndpointsOutput
with field(s):endpoint_descriptions(Option<Vec::<CustomRoutingEndpointDescription>>)
:The endpoint objects added to the custom routing accelerator.
endpoint_group_arn(Option<String>)
:The Amazon Resource Name (ARN) of the endpoint group for the custom routing endpoint.
- On failure, responds with
SdkError<AddCustomRoutingEndpointsError>
Source§impl Client
impl Client
Sourcepub fn add_endpoints(&self) -> AddEndpointsFluentBuilder
pub fn add_endpoints(&self) -> AddEndpointsFluentBuilder
Constructs a fluent builder for the AddEndpoints
operation.
- The fluent builder is configurable:
endpoint_configurations(EndpointConfiguration)
/set_endpoint_configurations(Option<Vec::<EndpointConfiguration>>)
:
required: trueThe list of endpoint objects.
endpoint_group_arn(impl Into<String>)
/set_endpoint_group_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the endpoint group.
- On success, responds with
AddEndpointsOutput
with field(s):endpoint_descriptions(Option<Vec::<EndpointDescription>>)
:The list of endpoint objects.
endpoint_group_arn(Option<String>)
:The Amazon Resource Name (ARN) of the endpoint group.
- On failure, responds with
SdkError<AddEndpointsError>
Source§impl Client
impl Client
Sourcepub fn advertise_byoip_cidr(&self) -> AdvertiseByoipCidrFluentBuilder
pub fn advertise_byoip_cidr(&self) -> AdvertiseByoipCidrFluentBuilder
Constructs a fluent builder for the AdvertiseByoipCidr
operation.
- The fluent builder is configurable:
cidr(impl Into<String>)
/set_cidr(Option<String>)
:
required: trueThe address range, in CIDR notation. This must be the exact range that you provisioned. You can’t advertise only a portion of the provisioned range.
For more information, see Bring your own IP addresses (BYOIP) in the Global Accelerator Developer Guide.
- On success, responds with
AdvertiseByoipCidrOutput
with field(s):byoip_cidr(Option<ByoipCidr>)
:Information about the address range.
- On failure, responds with
SdkError<AdvertiseByoipCidrError>
Source§impl Client
impl Client
Sourcepub fn allow_custom_routing_traffic(
&self,
) -> AllowCustomRoutingTrafficFluentBuilder
pub fn allow_custom_routing_traffic( &self, ) -> AllowCustomRoutingTrafficFluentBuilder
Constructs a fluent builder for the AllowCustomRoutingTraffic
operation.
- The fluent builder is configurable:
endpoint_group_arn(impl Into<String>)
/set_endpoint_group_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the endpoint group.
endpoint_id(impl Into<String>)
/set_endpoint_id(Option<String>)
:
required: trueAn ID for the endpoint. For custom routing accelerators, this is the virtual private cloud (VPC) subnet ID.
destination_addresses(impl Into<String>)
/set_destination_addresses(Option<Vec::<String>>)
:
required: falseA list of specific Amazon EC2 instance IP addresses (destination addresses) in a subnet that you want to allow to receive traffic. The IP addresses must be a subset of the IP addresses that you specified for the endpoint group.
DestinationAddresses
is required ifAllowAllTrafficToEndpoint
isFALSE
or is not specified.destination_ports(i32)
/set_destination_ports(Option<Vec::<i32>>)
:
required: falseA list of specific Amazon EC2 instance ports (destination ports) that you want to allow to receive traffic.
allow_all_traffic_to_endpoint(bool)
/set_allow_all_traffic_to_endpoint(Option<bool>)
:
required: falseIndicates whether all destination IP addresses and ports for a specified VPC subnet endpoint can receive traffic from a custom routing accelerator. The value is TRUE or FALSE.
When set to TRUE, all destinations in the custom routing VPC subnet can receive traffic. Note that you cannot specify destination IP addresses and ports when the value is set to TRUE.
When set to FALSE (or not specified), you must specify a list of destination IP addresses that are allowed to receive traffic. A list of ports is optional. If you don’t specify a list of ports, the ports that can accept traffic is the same as the ports configured for the endpoint group.
The default value is FALSE.
- On success, responds with
AllowCustomRoutingTrafficOutput
- On failure, responds with
SdkError<AllowCustomRoutingTrafficError>
Source§impl Client
impl Client
Sourcepub fn create_accelerator(&self) -> CreateAcceleratorFluentBuilder
pub fn create_accelerator(&self) -> CreateAcceleratorFluentBuilder
Constructs a fluent builder for the CreateAccelerator
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the accelerator. The name can have a maximum of 64 characters, must contain only alphanumeric characters, periods (.), or hyphens (-), and must not begin or end with a hyphen or period.
ip_address_type(IpAddressType)
/set_ip_address_type(Option<IpAddressType>)
:
required: falseThe IP address type that an accelerator supports. For a standard accelerator, the value can be IPV4 or DUAL_STACK.
ip_addresses(impl Into<String>)
/set_ip_addresses(Option<Vec::<String>>)
:
required: falseOptionally, if you’ve added your own IP address pool to Global Accelerator (BYOIP), you can choose an IPv4 address from your own pool to use for the accelerator’s static IPv4 address when you create an accelerator.
After you bring an address range to Amazon Web Services, it appears in your account as an address pool. When you create an accelerator, you can assign one IPv4 address from your range to it. Global Accelerator assigns you a second static IPv4 address from an Amazon IP address range. If you bring two IPv4 address ranges to Amazon Web Services, you can assign one IPv4 address from each range to your accelerator. This restriction is because Global Accelerator assigns each address range to a different network zone, for high availability.
You can specify one or two addresses, separated by a space. Do not include the /32 suffix.
Note that you can’t update IP addresses for an existing accelerator. To change them, you must create a new accelerator with the new addresses.
For more information, see Bring your own IP addresses (BYOIP) in the Global Accelerator Developer Guide.
enabled(bool)
/set_enabled(Option<bool>)
:
required: falseIndicates whether an accelerator is enabled. The value is true or false. The default value is true.
If the value is set to true, an accelerator cannot be deleted. If set to false, the accelerator can be deleted.
idempotency_token(impl Into<String>)
/set_idempotency_token(Option<String>)
:
required: trueA unique, case-sensitive identifier that you provide to ensure the idempotency—that is, the uniqueness—of an accelerator.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseCreate tags for an accelerator.
For more information, see Tagging in Global Accelerator in the Global Accelerator Developer Guide.
- On success, responds with
CreateAcceleratorOutput
with field(s):accelerator(Option<Accelerator>)
:The accelerator that is created by specifying a listener and the supported IP address types.
- On failure, responds with
SdkError<CreateAcceleratorError>
Source§impl Client
impl Client
Sourcepub fn create_cross_account_attachment(
&self,
) -> CreateCrossAccountAttachmentFluentBuilder
pub fn create_cross_account_attachment( &self, ) -> CreateCrossAccountAttachmentFluentBuilder
Constructs a fluent builder for the CreateCrossAccountAttachment
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the cross-account attachment.
principals(impl Into<String>)
/set_principals(Option<Vec::<String>>)
:
required: falseThe principals to include in the cross-account attachment. A principal can be an Amazon Web Services account number or the Amazon Resource Name (ARN) for an accelerator.
resources(Resource)
/set_resources(Option<Vec::<Resource>>)
:
required: falseThe Amazon Resource Names (ARNs) for the resources to include in the cross-account attachment. A resource can be any supported Amazon Web Services resource type for Global Accelerator or a CIDR range for a bring your own IP address (BYOIP) address pool.
idempotency_token(impl Into<String>)
/set_idempotency_token(Option<String>)
:
required: trueA unique, case-sensitive identifier that you provide to ensure the idempotency—that is, the uniqueness—of the request.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseAdd tags for a cross-account attachment.
For more information, see Tagging in Global Accelerator in the Global Accelerator Developer Guide.
- On success, responds with
CreateCrossAccountAttachmentOutput
with field(s):cross_account_attachment(Option<Attachment>)
:Information about the cross-account attachment.
- On failure, responds with
SdkError<CreateCrossAccountAttachmentError>
Source§impl Client
impl Client
Sourcepub fn create_custom_routing_accelerator(
&self,
) -> CreateCustomRoutingAcceleratorFluentBuilder
pub fn create_custom_routing_accelerator( &self, ) -> CreateCustomRoutingAcceleratorFluentBuilder
Constructs a fluent builder for the CreateCustomRoutingAccelerator
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of a custom routing accelerator. The name can have a maximum of 64 characters, must contain only alphanumeric characters or hyphens (-), and must not begin or end with a hyphen.
ip_address_type(IpAddressType)
/set_ip_address_type(Option<IpAddressType>)
:
required: falseThe IP address type that an accelerator supports. For a custom routing accelerator, the value must be IPV4.
ip_addresses(impl Into<String>)
/set_ip_addresses(Option<Vec::<String>>)
:
required: falseOptionally, if you’ve added your own IP address pool to Global Accelerator (BYOIP), you can choose an IPv4 address from your own pool to use for the accelerator’s static IPv4 address when you create an accelerator.
After you bring an address range to Amazon Web Services, it appears in your account as an address pool. When you create an accelerator, you can assign one IPv4 address from your range to it. Global Accelerator assigns you a second static IPv4 address from an Amazon IP address range. If you bring two IPv4 address ranges to Amazon Web Services, you can assign one IPv4 address from each range to your accelerator. This restriction is because Global Accelerator assigns each address range to a different network zone, for high availability.
You can specify one or two addresses, separated by a space. Do not include the /32 suffix.
Note that you can’t update IP addresses for an existing accelerator. To change them, you must create a new accelerator with the new addresses.
For more information, see Bring your own IP addresses (BYOIP) in the Global Accelerator Developer Guide.
enabled(bool)
/set_enabled(Option<bool>)
:
required: falseIndicates whether an accelerator is enabled. The value is true or false. The default value is true.
If the value is set to true, an accelerator cannot be deleted. If set to false, the accelerator can be deleted.
idempotency_token(impl Into<String>)
/set_idempotency_token(Option<String>)
:
required: trueA unique, case-sensitive identifier that you provide to ensure the idempotency—that is, the uniqueness—of the request.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseCreate tags for an accelerator.
For more information, see Tagging in Global Accelerator in the Global Accelerator Developer Guide.
- On success, responds with
CreateCustomRoutingAcceleratorOutput
with field(s):accelerator(Option<CustomRoutingAccelerator>)
:The accelerator that is created.
- On failure, responds with
SdkError<CreateCustomRoutingAcceleratorError>
Source§impl Client
impl Client
Sourcepub fn create_custom_routing_endpoint_group(
&self,
) -> CreateCustomRoutingEndpointGroupFluentBuilder
pub fn create_custom_routing_endpoint_group( &self, ) -> CreateCustomRoutingEndpointGroupFluentBuilder
Constructs a fluent builder for the CreateCustomRoutingEndpointGroup
operation.
- The fluent builder is configurable:
listener_arn(impl Into<String>)
/set_listener_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the listener for a custom routing endpoint.
endpoint_group_region(impl Into<String>)
/set_endpoint_group_region(Option<String>)
:
required: trueThe Amazon Web Services Region where the endpoint group is located. A listener can have only one endpoint group in a specific Region.
destination_configurations(CustomRoutingDestinationConfiguration)
/set_destination_configurations(Option<Vec::<CustomRoutingDestinationConfiguration>>)
:
required: trueSets the port range and protocol for all endpoints (virtual private cloud subnets) in a custom routing endpoint group to accept client traffic on.
idempotency_token(impl Into<String>)
/set_idempotency_token(Option<String>)
:
required: trueA unique, case-sensitive identifier that you provide to ensure the idempotency—that is, the uniqueness—of the request.
- On success, responds with
CreateCustomRoutingEndpointGroupOutput
with field(s):endpoint_group(Option<CustomRoutingEndpointGroup>)
:The information about the endpoint group created for a custom routing accelerator.
- On failure, responds with
SdkError<CreateCustomRoutingEndpointGroupError>
Source§impl Client
impl Client
Sourcepub fn create_custom_routing_listener(
&self,
) -> CreateCustomRoutingListenerFluentBuilder
pub fn create_custom_routing_listener( &self, ) -> CreateCustomRoutingListenerFluentBuilder
Constructs a fluent builder for the CreateCustomRoutingListener
operation.
- The fluent builder is configurable:
accelerator_arn(impl Into<String>)
/set_accelerator_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the accelerator for a custom routing listener.
port_ranges(PortRange)
/set_port_ranges(Option<Vec::<PortRange>>)
:
required: trueThe port range to support for connections from clients to your accelerator.
Separately, you set port ranges for endpoints. For more information, see About endpoints for custom routing accelerators.
idempotency_token(impl Into<String>)
/set_idempotency_token(Option<String>)
:
required: trueA unique, case-sensitive identifier that you provide to ensure the idempotency—that is, the uniqueness—of the request.
- On success, responds with
CreateCustomRoutingListenerOutput
with field(s):listener(Option<CustomRoutingListener>)
:The listener that you’ve created for a custom routing accelerator.
- On failure, responds with
SdkError<CreateCustomRoutingListenerError>
Source§impl Client
impl Client
Sourcepub fn create_endpoint_group(&self) -> CreateEndpointGroupFluentBuilder
pub fn create_endpoint_group(&self) -> CreateEndpointGroupFluentBuilder
Constructs a fluent builder for the CreateEndpointGroup
operation.
- The fluent builder is configurable:
listener_arn(impl Into<String>)
/set_listener_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the listener.
endpoint_group_region(impl Into<String>)
/set_endpoint_group_region(Option<String>)
:
required: trueThe Amazon Web Services Region where the endpoint group is located. A listener can have only one endpoint group in a specific Region.
endpoint_configurations(EndpointConfiguration)
/set_endpoint_configurations(Option<Vec::<EndpointConfiguration>>)
:
required: falseThe list of endpoint objects.
traffic_dial_percentage(f32)
/set_traffic_dial_percentage(Option<f32>)
:
required: falseThe percentage of traffic to send to an Amazon Web Services Region. Additional traffic is distributed to other endpoint groups for this listener.
Use this action to increase (dial up) or decrease (dial down) traffic to a specific Region. The percentage is applied to the traffic that would otherwise have been routed to the Region based on optimal routing.
The default value is 100.
health_check_port(i32)
/set_health_check_port(Option<i32>)
:
required: falseThe port that Global Accelerator uses to check the health of endpoints that are part of this endpoint group. The default port is the listener port that this endpoint group is associated with. If listener port is a list of ports, Global Accelerator uses the first port in the list.
health_check_protocol(HealthCheckProtocol)
/set_health_check_protocol(Option<HealthCheckProtocol>)
:
required: falseThe protocol that Global Accelerator uses to check the health of endpoints that are part of this endpoint group. The default value is TCP.
health_check_path(impl Into<String>)
/set_health_check_path(Option<String>)
:
required: falseIf the protocol is HTTP/S, then this specifies the path that is the destination for health check targets. The default value is slash (/).
health_check_interval_seconds(i32)
/set_health_check_interval_seconds(Option<i32>)
:
required: falseThe time—10 seconds or 30 seconds—between each health check for an endpoint. The default value is 30.
threshold_count(i32)
/set_threshold_count(Option<i32>)
:
required: falseThe number of consecutive health checks required to set the state of a healthy endpoint to unhealthy, or to set an unhealthy endpoint to healthy. The default value is 3.
idempotency_token(impl Into<String>)
/set_idempotency_token(Option<String>)
:
required: trueA unique, case-sensitive identifier that you provide to ensure the idempotency—that is, the uniqueness—of the request.
port_overrides(PortOverride)
/set_port_overrides(Option<Vec::<PortOverride>>)
:
required: falseOverride specific listener ports used to route traffic to endpoints that are part of this endpoint group. For example, you can create a port override in which the listener receives user traffic on ports 80 and 443, but your accelerator routes that traffic to ports 1080 and 1443, respectively, on the endpoints.
For more information, see Overriding listener ports in the Global Accelerator Developer Guide.
- On success, responds with
CreateEndpointGroupOutput
with field(s):endpoint_group(Option<EndpointGroup>)
:The information about the endpoint group that was created.
- On failure, responds with
SdkError<CreateEndpointGroupError>
Source§impl Client
impl Client
Sourcepub fn create_listener(&self) -> CreateListenerFluentBuilder
pub fn create_listener(&self) -> CreateListenerFluentBuilder
Constructs a fluent builder for the CreateListener
operation.
- The fluent builder is configurable:
accelerator_arn(impl Into<String>)
/set_accelerator_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of your accelerator.
port_ranges(PortRange)
/set_port_ranges(Option<Vec::<PortRange>>)
:
required: trueThe list of port ranges to support for connections from clients to your accelerator.
protocol(Protocol)
/set_protocol(Option<Protocol>)
:
required: trueThe protocol for connections from clients to your accelerator.
client_affinity(ClientAffinity)
/set_client_affinity(Option<ClientAffinity>)
:
required: falseClient affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications, regardless of the port and protocol of the client request. Client affinity gives you control over whether to always route each client to the same specific endpoint.
Global Accelerator uses a consistent-flow hashing algorithm to choose the optimal endpoint for a connection. If client affinity is
NONE
, Global Accelerator uses the “five-tuple” (5-tuple) properties—source IP address, source port, destination IP address, destination port, and protocol—to select the hash value, and then chooses the best endpoint. However, with this setting, if someone uses different ports to connect to Global Accelerator, their connections might not be always routed to the same endpoint because the hash value changes.If you want a given client to always be routed to the same endpoint, set client affinity to
SOURCE_IP
instead. When you use theSOURCE_IP
setting, Global Accelerator uses the “two-tuple” (2-tuple) properties— source (client) IP address and destination IP address—to select the hash value.The default value is
NONE
.idempotency_token(impl Into<String>)
/set_idempotency_token(Option<String>)
:
required: trueA unique, case-sensitive identifier that you provide to ensure the idempotency—that is, the uniqueness—of the request.
- On success, responds with
CreateListenerOutput
with field(s):listener(Option<Listener>)
:The listener that you’ve created.
- On failure, responds with
SdkError<CreateListenerError>
Source§impl Client
impl Client
Sourcepub fn delete_accelerator(&self) -> DeleteAcceleratorFluentBuilder
pub fn delete_accelerator(&self) -> DeleteAcceleratorFluentBuilder
Constructs a fluent builder for the DeleteAccelerator
operation.
- The fluent builder is configurable:
accelerator_arn(impl Into<String>)
/set_accelerator_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of an accelerator.
- On success, responds with
DeleteAcceleratorOutput
- On failure, responds with
SdkError<DeleteAcceleratorError>
Source§impl Client
impl Client
Sourcepub fn delete_cross_account_attachment(
&self,
) -> DeleteCrossAccountAttachmentFluentBuilder
pub fn delete_cross_account_attachment( &self, ) -> DeleteCrossAccountAttachmentFluentBuilder
Constructs a fluent builder for the DeleteCrossAccountAttachment
operation.
- The fluent builder is configurable:
attachment_arn(impl Into<String>)
/set_attachment_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) for the cross-account attachment to delete.
- On success, responds with
DeleteCrossAccountAttachmentOutput
- On failure, responds with
SdkError<DeleteCrossAccountAttachmentError>
Source§impl Client
impl Client
Sourcepub fn delete_custom_routing_accelerator(
&self,
) -> DeleteCustomRoutingAcceleratorFluentBuilder
pub fn delete_custom_routing_accelerator( &self, ) -> DeleteCustomRoutingAcceleratorFluentBuilder
Constructs a fluent builder for the DeleteCustomRoutingAccelerator
operation.
- The fluent builder is configurable:
accelerator_arn(impl Into<String>)
/set_accelerator_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the custom routing accelerator to delete.
- On success, responds with
DeleteCustomRoutingAcceleratorOutput
- On failure, responds with
SdkError<DeleteCustomRoutingAcceleratorError>
Source§impl Client
impl Client
Sourcepub fn delete_custom_routing_endpoint_group(
&self,
) -> DeleteCustomRoutingEndpointGroupFluentBuilder
pub fn delete_custom_routing_endpoint_group( &self, ) -> DeleteCustomRoutingEndpointGroupFluentBuilder
Constructs a fluent builder for the DeleteCustomRoutingEndpointGroup
operation.
- The fluent builder is configurable:
endpoint_group_arn(impl Into<String>)
/set_endpoint_group_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the endpoint group to delete.
- On success, responds with
DeleteCustomRoutingEndpointGroupOutput
- On failure, responds with
SdkError<DeleteCustomRoutingEndpointGroupError>
Source§impl Client
impl Client
Sourcepub fn delete_custom_routing_listener(
&self,
) -> DeleteCustomRoutingListenerFluentBuilder
pub fn delete_custom_routing_listener( &self, ) -> DeleteCustomRoutingListenerFluentBuilder
Constructs a fluent builder for the DeleteCustomRoutingListener
operation.
- The fluent builder is configurable:
listener_arn(impl Into<String>)
/set_listener_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the listener to delete.
- On success, responds with
DeleteCustomRoutingListenerOutput
- On failure, responds with
SdkError<DeleteCustomRoutingListenerError>
Source§impl Client
impl Client
Sourcepub fn delete_endpoint_group(&self) -> DeleteEndpointGroupFluentBuilder
pub fn delete_endpoint_group(&self) -> DeleteEndpointGroupFluentBuilder
Constructs a fluent builder for the DeleteEndpointGroup
operation.
- The fluent builder is configurable:
endpoint_group_arn(impl Into<String>)
/set_endpoint_group_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the endpoint group to delete.
- On success, responds with
DeleteEndpointGroupOutput
- On failure, responds with
SdkError<DeleteEndpointGroupError>
Source§impl Client
impl Client
Sourcepub fn delete_listener(&self) -> DeleteListenerFluentBuilder
pub fn delete_listener(&self) -> DeleteListenerFluentBuilder
Constructs a fluent builder for the DeleteListener
operation.
- The fluent builder is configurable:
listener_arn(impl Into<String>)
/set_listener_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the listener.
- On success, responds with
DeleteListenerOutput
- On failure, responds with
SdkError<DeleteListenerError>
Source§impl Client
impl Client
Sourcepub fn deny_custom_routing_traffic(
&self,
) -> DenyCustomRoutingTrafficFluentBuilder
pub fn deny_custom_routing_traffic( &self, ) -> DenyCustomRoutingTrafficFluentBuilder
Constructs a fluent builder for the DenyCustomRoutingTraffic
operation.
- The fluent builder is configurable:
endpoint_group_arn(impl Into<String>)
/set_endpoint_group_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the endpoint group.
endpoint_id(impl Into<String>)
/set_endpoint_id(Option<String>)
:
required: trueAn ID for the endpoint. For custom routing accelerators, this is the virtual private cloud (VPC) subnet ID.
destination_addresses(impl Into<String>)
/set_destination_addresses(Option<Vec::<String>>)
:
required: falseA list of specific Amazon EC2 instance IP addresses (destination addresses) in a subnet that you want to prevent from receiving traffic. The IP addresses must be a subset of the IP addresses allowed for the VPC subnet associated with the endpoint group.
destination_ports(i32)
/set_destination_ports(Option<Vec::<i32>>)
:
required: falseA list of specific Amazon EC2 instance ports (destination ports) in a subnet endpoint that you want to prevent from receiving traffic.
deny_all_traffic_to_endpoint(bool)
/set_deny_all_traffic_to_endpoint(Option<bool>)
:
required: falseIndicates whether all destination IP addresses and ports for a specified VPC subnet endpoint cannot receive traffic from a custom routing accelerator. The value is TRUE or FALSE.
When set to TRUE, no destinations in the custom routing VPC subnet can receive traffic. Note that you cannot specify destination IP addresses and ports when the value is set to TRUE.
When set to FALSE (or not specified), you must specify a list of destination IP addresses that cannot receive traffic. A list of ports is optional. If you don’t specify a list of ports, the ports that can accept traffic is the same as the ports configured for the endpoint group.
The default value is FALSE.
- On success, responds with
DenyCustomRoutingTrafficOutput
- On failure, responds with
SdkError<DenyCustomRoutingTrafficError>
Source§impl Client
impl Client
Sourcepub fn deprovision_byoip_cidr(&self) -> DeprovisionByoipCidrFluentBuilder
pub fn deprovision_byoip_cidr(&self) -> DeprovisionByoipCidrFluentBuilder
Constructs a fluent builder for the DeprovisionByoipCidr
operation.
- The fluent builder is configurable:
cidr(impl Into<String>)
/set_cidr(Option<String>)
:
required: trueThe address range, in CIDR notation. The prefix must be the same prefix that you specified when you provisioned the address range.
For more information, see Bring your own IP addresses (BYOIP) in the Global Accelerator Developer Guide.
- On success, responds with
DeprovisionByoipCidrOutput
with field(s):byoip_cidr(Option<ByoipCidr>)
:Information about the address range.
- On failure, responds with
SdkError<DeprovisionByoipCidrError>
Source§impl Client
impl Client
Sourcepub fn describe_accelerator(&self) -> DescribeAcceleratorFluentBuilder
pub fn describe_accelerator(&self) -> DescribeAcceleratorFluentBuilder
Constructs a fluent builder for the DescribeAccelerator
operation.
- The fluent builder is configurable:
accelerator_arn(impl Into<String>)
/set_accelerator_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the accelerator to describe.
- On success, responds with
DescribeAcceleratorOutput
with field(s):accelerator(Option<Accelerator>)
:The description of the accelerator.
- On failure, responds with
SdkError<DescribeAcceleratorError>
Source§impl Client
impl Client
Sourcepub fn describe_accelerator_attributes(
&self,
) -> DescribeAcceleratorAttributesFluentBuilder
pub fn describe_accelerator_attributes( &self, ) -> DescribeAcceleratorAttributesFluentBuilder
Constructs a fluent builder for the DescribeAcceleratorAttributes
operation.
- The fluent builder is configurable:
accelerator_arn(impl Into<String>)
/set_accelerator_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the accelerator with the attributes that you want to describe.
- On success, responds with
DescribeAcceleratorAttributesOutput
with field(s):accelerator_attributes(Option<AcceleratorAttributes>)
:The attributes of the accelerator.
- On failure, responds with
SdkError<DescribeAcceleratorAttributesError>
Source§impl Client
impl Client
Sourcepub fn describe_cross_account_attachment(
&self,
) -> DescribeCrossAccountAttachmentFluentBuilder
pub fn describe_cross_account_attachment( &self, ) -> DescribeCrossAccountAttachmentFluentBuilder
Constructs a fluent builder for the DescribeCrossAccountAttachment
operation.
- The fluent builder is configurable:
attachment_arn(impl Into<String>)
/set_attachment_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) for the cross-account attachment to describe.
- On success, responds with
DescribeCrossAccountAttachmentOutput
with field(s):cross_account_attachment(Option<Attachment>)
:Information about the cross-account attachment.
- On failure, responds with
SdkError<DescribeCrossAccountAttachmentError>
Source§impl Client
impl Client
Sourcepub fn describe_custom_routing_accelerator(
&self,
) -> DescribeCustomRoutingAcceleratorFluentBuilder
pub fn describe_custom_routing_accelerator( &self, ) -> DescribeCustomRoutingAcceleratorFluentBuilder
Constructs a fluent builder for the DescribeCustomRoutingAccelerator
operation.
- The fluent builder is configurable:
accelerator_arn(impl Into<String>)
/set_accelerator_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the accelerator to describe.
- On success, responds with
DescribeCustomRoutingAcceleratorOutput
with field(s):accelerator(Option<CustomRoutingAccelerator>)
:The description of the custom routing accelerator.
- On failure, responds with
SdkError<DescribeCustomRoutingAcceleratorError>
Source§impl Client
impl Client
Sourcepub fn describe_custom_routing_accelerator_attributes(
&self,
) -> DescribeCustomRoutingAcceleratorAttributesFluentBuilder
pub fn describe_custom_routing_accelerator_attributes( &self, ) -> DescribeCustomRoutingAcceleratorAttributesFluentBuilder
Constructs a fluent builder for the DescribeCustomRoutingAcceleratorAttributes
operation.
- The fluent builder is configurable:
accelerator_arn(impl Into<String>)
/set_accelerator_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the custom routing accelerator to describe the attributes for.
- On success, responds with
DescribeCustomRoutingAcceleratorAttributesOutput
with field(s):accelerator_attributes(Option<CustomRoutingAcceleratorAttributes>)
:The attributes of the custom routing accelerator.
- On failure, responds with
SdkError<DescribeCustomRoutingAcceleratorAttributesError>
Source§impl Client
impl Client
Sourcepub fn describe_custom_routing_endpoint_group(
&self,
) -> DescribeCustomRoutingEndpointGroupFluentBuilder
pub fn describe_custom_routing_endpoint_group( &self, ) -> DescribeCustomRoutingEndpointGroupFluentBuilder
Constructs a fluent builder for the DescribeCustomRoutingEndpointGroup
operation.
- The fluent builder is configurable:
endpoint_group_arn(impl Into<String>)
/set_endpoint_group_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the endpoint group to describe.
- On success, responds with
DescribeCustomRoutingEndpointGroupOutput
with field(s):endpoint_group(Option<CustomRoutingEndpointGroup>)
:The description of an endpoint group for a custom routing accelerator.
- On failure, responds with
SdkError<DescribeCustomRoutingEndpointGroupError>
Source§impl Client
impl Client
Sourcepub fn describe_custom_routing_listener(
&self,
) -> DescribeCustomRoutingListenerFluentBuilder
pub fn describe_custom_routing_listener( &self, ) -> DescribeCustomRoutingListenerFluentBuilder
Constructs a fluent builder for the DescribeCustomRoutingListener
operation.
- The fluent builder is configurable:
listener_arn(impl Into<String>)
/set_listener_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the listener to describe.
- On success, responds with
DescribeCustomRoutingListenerOutput
with field(s):listener(Option<CustomRoutingListener>)
:The description of a listener for a custom routing accelerator.
- On failure, responds with
SdkError<DescribeCustomRoutingListenerError>
Source§impl Client
impl Client
Sourcepub fn describe_endpoint_group(&self) -> DescribeEndpointGroupFluentBuilder
pub fn describe_endpoint_group(&self) -> DescribeEndpointGroupFluentBuilder
Constructs a fluent builder for the DescribeEndpointGroup
operation.
- The fluent builder is configurable:
endpoint_group_arn(impl Into<String>)
/set_endpoint_group_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the endpoint group to describe.
- On success, responds with
DescribeEndpointGroupOutput
with field(s):endpoint_group(Option<EndpointGroup>)
:The description of an endpoint group.
- On failure, responds with
SdkError<DescribeEndpointGroupError>
Source§impl Client
impl Client
Sourcepub fn describe_listener(&self) -> DescribeListenerFluentBuilder
pub fn describe_listener(&self) -> DescribeListenerFluentBuilder
Constructs a fluent builder for the DescribeListener
operation.
- The fluent builder is configurable:
listener_arn(impl Into<String>)
/set_listener_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the listener to describe.
- On success, responds with
DescribeListenerOutput
with field(s):listener(Option<Listener>)
:The description of a listener.
- On failure, responds with
SdkError<DescribeListenerError>
Source§impl Client
impl Client
Sourcepub fn list_accelerators(&self) -> ListAcceleratorsFluentBuilder
pub fn list_accelerators(&self) -> ListAcceleratorsFluentBuilder
Constructs a fluent builder for the ListAccelerators
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of Global Accelerator objects that you want to return with this call. The default value is 10.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
- On success, responds with
ListAcceleratorsOutput
with field(s):accelerators(Option<Vec::<Accelerator>>)
:The list of accelerators for a customer account.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<ListAcceleratorsError>
Source§impl Client
impl Client
Sourcepub fn list_byoip_cidrs(&self) -> ListByoipCidrsFluentBuilder
pub fn list_byoip_cidrs(&self) -> ListByoipCidrsFluentBuilder
Constructs a fluent builder for the ListByoipCidrs
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 return with a single call. To retrieve the remaining results, make another call with the returned
nextToken
value.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next page of results.
- On success, responds with
ListByoipCidrsOutput
with field(s):byoip_cidrs(Option<Vec::<ByoipCidr>>)
:Information about your address ranges.
next_token(Option<String>)
:The token for the next page of results.
- On failure, responds with
SdkError<ListByoipCidrsError>
Source§impl Client
impl Client
Sourcepub fn list_cross_account_attachments(
&self,
) -> ListCrossAccountAttachmentsFluentBuilder
pub fn list_cross_account_attachments( &self, ) -> ListCrossAccountAttachmentsFluentBuilder
Constructs a fluent builder for the ListCrossAccountAttachments
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of cross-account attachment objects that you want to return with this call. The default value is 10.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
- On success, responds with
ListCrossAccountAttachmentsOutput
with field(s):cross_account_attachments(Option<Vec::<Attachment>>)
:Information about the cross-account attachments.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<ListCrossAccountAttachmentsError>
Source§impl Client
impl Client
Sourcepub fn list_cross_account_resource_accounts(
&self,
) -> ListCrossAccountResourceAccountsFluentBuilder
pub fn list_cross_account_resource_accounts( &self, ) -> ListCrossAccountResourceAccountsFluentBuilder
Constructs a fluent builder for the ListCrossAccountResourceAccounts
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
ListCrossAccountResourceAccountsOutput
with field(s):resource_owner_aws_account_ids(Option<Vec::<String>>)
:The account IDs of principals (resource owners) in a cross-account attachment who can work with resources listed in the same attachment.
- On failure, responds with
SdkError<ListCrossAccountResourceAccountsError>
Source§impl Client
impl Client
Sourcepub fn list_cross_account_resources(
&self,
) -> ListCrossAccountResourcesFluentBuilder
pub fn list_cross_account_resources( &self, ) -> ListCrossAccountResourcesFluentBuilder
Constructs a fluent builder for the ListCrossAccountResources
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
accelerator_arn(impl Into<String>)
/set_accelerator_arn(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of an accelerator in a cross-account attachment.
resource_owner_aws_account_id(impl Into<String>)
/set_resource_owner_aws_account_id(Option<String>)
:
required: trueThe account ID of a resource owner in a cross-account attachment.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of cross-account resource objects that you want to return with this call. The default value is 10.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
- On success, responds with
ListCrossAccountResourcesOutput
with field(s):cross_account_resources(Option<Vec::<CrossAccountResource>>)
:The cross-account resources used with an accelerator.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<ListCrossAccountResourcesError>
Source§impl Client
impl Client
Sourcepub fn list_custom_routing_accelerators(
&self,
) -> ListCustomRoutingAcceleratorsFluentBuilder
pub fn list_custom_routing_accelerators( &self, ) -> ListCustomRoutingAcceleratorsFluentBuilder
Constructs a fluent builder for the ListCustomRoutingAccelerators
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of custom routing Global Accelerator objects that you want to return with this call. The default value is 10.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
- On success, responds with
ListCustomRoutingAcceleratorsOutput
with field(s):accelerators(Option<Vec::<CustomRoutingAccelerator>>)
:The list of custom routing accelerators for a customer account.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<ListCustomRoutingAcceleratorsError>
Source§impl Client
impl Client
Sourcepub fn list_custom_routing_endpoint_groups(
&self,
) -> ListCustomRoutingEndpointGroupsFluentBuilder
pub fn list_custom_routing_endpoint_groups( &self, ) -> ListCustomRoutingEndpointGroupsFluentBuilder
Constructs a fluent builder for the ListCustomRoutingEndpointGroups
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
listener_arn(impl Into<String>)
/set_listener_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the listener to list endpoint groups for.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of endpoint group objects that you want to return with this call. The default value is 10.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
- On success, responds with
ListCustomRoutingEndpointGroupsOutput
with field(s):endpoint_groups(Option<Vec::<CustomRoutingEndpointGroup>>)
:The list of the endpoint groups associated with a listener for a custom routing accelerator.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<ListCustomRoutingEndpointGroupsError>
Source§impl Client
impl Client
Sourcepub fn list_custom_routing_listeners(
&self,
) -> ListCustomRoutingListenersFluentBuilder
pub fn list_custom_routing_listeners( &self, ) -> ListCustomRoutingListenersFluentBuilder
Constructs a fluent builder for the ListCustomRoutingListeners
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
accelerator_arn(impl Into<String>)
/set_accelerator_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the accelerator to list listeners for.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of listener objects that you want to return with this call. The default value is 10.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
- On success, responds with
ListCustomRoutingListenersOutput
with field(s):listeners(Option<Vec::<CustomRoutingListener>>)
:The list of listeners for a custom routing accelerator.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<ListCustomRoutingListenersError>
Source§impl Client
impl Client
Sourcepub fn list_custom_routing_port_mappings(
&self,
) -> ListCustomRoutingPortMappingsFluentBuilder
pub fn list_custom_routing_port_mappings( &self, ) -> ListCustomRoutingPortMappingsFluentBuilder
Constructs a fluent builder for the ListCustomRoutingPortMappings
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
accelerator_arn(impl Into<String>)
/set_accelerator_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the accelerator to list the custom routing port mappings for.
endpoint_group_arn(impl Into<String>)
/set_endpoint_group_arn(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of the endpoint group to list the custom routing port mappings for.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of destination port mappings that you want to return with this call. The default value is 10.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
- On success, responds with
ListCustomRoutingPortMappingsOutput
with field(s):port_mappings(Option<Vec::<PortMapping>>)
:The port mappings for a custom routing accelerator.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<ListCustomRoutingPortMappingsError>
Source§impl Client
impl Client
Sourcepub fn list_custom_routing_port_mappings_by_destination(
&self,
) -> ListCustomRoutingPortMappingsByDestinationFluentBuilder
pub fn list_custom_routing_port_mappings_by_destination( &self, ) -> ListCustomRoutingPortMappingsByDestinationFluentBuilder
Constructs a fluent builder for the ListCustomRoutingPortMappingsByDestination
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
endpoint_id(impl Into<String>)
/set_endpoint_id(Option<String>)
:
required: trueThe ID for the virtual private cloud (VPC) subnet.
destination_address(impl Into<String>)
/set_destination_address(Option<String>)
:
required: trueThe endpoint IP address in a virtual private cloud (VPC) subnet for which you want to receive back port mappings.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of destination port mappings that you want to return with this call. The default value is 10.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
- On success, responds with
ListCustomRoutingPortMappingsByDestinationOutput
with field(s):destination_port_mappings(Option<Vec::<DestinationPortMapping>>)
:The port mappings for the endpoint IP address that you specified in the request.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<ListCustomRoutingPortMappingsByDestinationError>
Source§impl Client
impl Client
Sourcepub fn list_endpoint_groups(&self) -> ListEndpointGroupsFluentBuilder
pub fn list_endpoint_groups(&self) -> ListEndpointGroupsFluentBuilder
Constructs a fluent builder for the ListEndpointGroups
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
listener_arn(impl Into<String>)
/set_listener_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the listener.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of endpoint group objects that you want to return with this call. The default value is 10.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
- On success, responds with
ListEndpointGroupsOutput
with field(s):endpoint_groups(Option<Vec::<EndpointGroup>>)
:The list of the endpoint groups associated with a listener.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<ListEndpointGroupsError>
Source§impl Client
impl Client
Sourcepub fn list_listeners(&self) -> ListListenersFluentBuilder
pub fn list_listeners(&self) -> ListListenersFluentBuilder
Constructs a fluent builder for the ListListeners
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
accelerator_arn(impl Into<String>)
/set_accelerator_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the accelerator for which you want to list listener objects.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of listener objects that you want to return with this call. The default value is 10.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
- On success, responds with
ListListenersOutput
with field(s):listeners(Option<Vec::<Listener>>)
:The list of listeners for an accelerator.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<ListListenersError>
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: trueThe Amazon Resource Name (ARN) of the accelerator to list tags for. An ARN uniquely identifies an accelerator.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<Vec::<Tag>>)
:Root level tag for the Tags parameters.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn provision_byoip_cidr(&self) -> ProvisionByoipCidrFluentBuilder
pub fn provision_byoip_cidr(&self) -> ProvisionByoipCidrFluentBuilder
Constructs a fluent builder for the ProvisionByoipCidr
operation.
- The fluent builder is configurable:
cidr(impl Into<String>)
/set_cidr(Option<String>)
:
required: trueThe public IPv4 address range, in CIDR notation. The most specific IP prefix that you can specify is /24. The address range cannot overlap with another address range that you’ve brought to this Amazon Web Services Region or another Region.
For more information, see Bring your own IP addresses (BYOIP) in the Global Accelerator Developer Guide.
cidr_authorization_context(CidrAuthorizationContext)
/set_cidr_authorization_context(Option<CidrAuthorizationContext>)
:
required: trueA signed document that proves that you are authorized to bring the specified IP address range to Amazon using BYOIP.
- On success, responds with
ProvisionByoipCidrOutput
with field(s):byoip_cidr(Option<ByoipCidr>)
:Information about the address range.
- On failure, responds with
SdkError<ProvisionByoipCidrError>
Source§impl Client
impl Client
Sourcepub fn remove_custom_routing_endpoints(
&self,
) -> RemoveCustomRoutingEndpointsFluentBuilder
pub fn remove_custom_routing_endpoints( &self, ) -> RemoveCustomRoutingEndpointsFluentBuilder
Constructs a fluent builder for the RemoveCustomRoutingEndpoints
operation.
- The fluent builder is configurable:
endpoint_ids(impl Into<String>)
/set_endpoint_ids(Option<Vec::<String>>)
:
required: trueThe IDs for the endpoints. For custom routing accelerators, endpoint IDs are the virtual private cloud (VPC) subnet IDs.
endpoint_group_arn(impl Into<String>)
/set_endpoint_group_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the endpoint group to remove endpoints from.
- On success, responds with
RemoveCustomRoutingEndpointsOutput
- On failure, responds with
SdkError<RemoveCustomRoutingEndpointsError>
Source§impl Client
impl Client
Sourcepub fn remove_endpoints(&self) -> RemoveEndpointsFluentBuilder
pub fn remove_endpoints(&self) -> RemoveEndpointsFluentBuilder
Constructs a fluent builder for the RemoveEndpoints
operation.
- The fluent builder is configurable:
endpoint_identifiers(EndpointIdentifier)
/set_endpoint_identifiers(Option<Vec::<EndpointIdentifier>>)
:
required: trueThe identifiers of the endpoints that you want to remove.
endpoint_group_arn(impl Into<String>)
/set_endpoint_group_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the endpoint group.
- On success, responds with
RemoveEndpointsOutput
- On failure, responds with
SdkError<RemoveEndpointsError>
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 Global Accelerator resource to add tags to. An ARN uniquely identifies a resource.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: trueThe tags to add to a resource. A tag consists of a key and a value that you define.
- 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 Global Accelerator resource to remove tags from. An ARN uniquely identifies a resource.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe tag key pairs that you want to remove from the specified resources.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_accelerator(&self) -> UpdateAcceleratorFluentBuilder
pub fn update_accelerator(&self) -> UpdateAcceleratorFluentBuilder
Constructs a fluent builder for the UpdateAccelerator
operation.
- The fluent builder is configurable:
accelerator_arn(impl Into<String>)
/set_accelerator_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the accelerator to update.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseThe name of the accelerator. The name can have a maximum of 64 characters, must contain only alphanumeric characters, periods (.), or hyphens (-), and must not begin or end with a hyphen or period.
ip_address_type(IpAddressType)
/set_ip_address_type(Option<IpAddressType>)
:
required: falseThe IP address type that an accelerator supports. For a standard accelerator, the value can be IPV4 or DUAL_STACK.
ip_addresses(impl Into<String>)
/set_ip_addresses(Option<Vec::<String>>)
:
required: falseThe IP addresses for an accelerator.
enabled(bool)
/set_enabled(Option<bool>)
:
required: falseIndicates whether an accelerator is enabled. The value is true or false. The default value is true.
If the value is set to true, the accelerator cannot be deleted. If set to false, the accelerator can be deleted.
- On success, responds with
UpdateAcceleratorOutput
with field(s):accelerator(Option<Accelerator>)
:Information about the updated accelerator.
- On failure, responds with
SdkError<UpdateAcceleratorError>
Source§impl Client
impl Client
Sourcepub fn update_accelerator_attributes(
&self,
) -> UpdateAcceleratorAttributesFluentBuilder
pub fn update_accelerator_attributes( &self, ) -> UpdateAcceleratorAttributesFluentBuilder
Constructs a fluent builder for the UpdateAcceleratorAttributes
operation.
- The fluent builder is configurable:
accelerator_arn(impl Into<String>)
/set_accelerator_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the accelerator that you want to update.
flow_logs_enabled(bool)
/set_flow_logs_enabled(Option<bool>)
:
required: falseUpdate whether flow logs are enabled. The default value is false. If the value is true,
FlowLogsS3Bucket
andFlowLogsS3Prefix
must be specified.For more information, see Flow Logs in the Global Accelerator Developer Guide.
flow_logs_s3_bucket(impl Into<String>)
/set_flow_logs_s3_bucket(Option<String>)
:
required: falseThe name of the Amazon S3 bucket for the flow logs. Attribute is required if
FlowLogsEnabled
istrue
. The bucket must exist and have a bucket policy that grants Global Accelerator permission to write to the bucket.flow_logs_s3_prefix(impl Into<String>)
/set_flow_logs_s3_prefix(Option<String>)
:
required: falseUpdate the prefix for the location in the Amazon S3 bucket for the flow logs. Attribute is required if
FlowLogsEnabled
istrue
.If you specify slash (/) for the S3 bucket prefix, the log file bucket folder structure will include a double slash (//), like the following:
s3-bucket_name//AWSLogs/aws_account_id
- On success, responds with
UpdateAcceleratorAttributesOutput
with field(s):accelerator_attributes(Option<AcceleratorAttributes>)
:Updated attributes for the accelerator.
- On failure, responds with
SdkError<UpdateAcceleratorAttributesError>
Source§impl Client
impl Client
Sourcepub fn update_cross_account_attachment(
&self,
) -> UpdateCrossAccountAttachmentFluentBuilder
pub fn update_cross_account_attachment( &self, ) -> UpdateCrossAccountAttachmentFluentBuilder
Constructs a fluent builder for the UpdateCrossAccountAttachment
operation.
- The fluent builder is configurable:
attachment_arn(impl Into<String>)
/set_attachment_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the cross-account attachment to update.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseThe name of the cross-account attachment.
add_principals(impl Into<String>)
/set_add_principals(Option<Vec::<String>>)
:
required: falseThe principals to add to the cross-account attachment. A principal is an account or the Amazon Resource Name (ARN) of an accelerator that the attachment gives permission to work with resources from another account. The resources are also listed in the attachment.
To add more than one principal, separate the account numbers or accelerator ARNs, or both, with commas.
remove_principals(impl Into<String>)
/set_remove_principals(Option<Vec::<String>>)
:
required: falseThe principals to remove from the cross-account attachment. A principal is an account or the Amazon Resource Name (ARN) of an accelerator that the attachment gives permission to work with resources from another account. The resources are also listed in the attachment.
To remove more than one principal, separate the account numbers or accelerator ARNs, or both, with commas.
add_resources(Resource)
/set_add_resources(Option<Vec::<Resource>>)
:
required: falseThe resources to add to the cross-account attachment. A resource listed in a cross-account attachment can be used with an accelerator by the principals that are listed in the attachment.
To add more than one resource, separate the resource ARNs with commas.
remove_resources(Resource)
/set_remove_resources(Option<Vec::<Resource>>)
:
required: falseThe resources to remove from the cross-account attachment. A resource listed in a cross-account attachment can be used with an accelerator by the principals that are listed in the attachment.
To remove more than one resource, separate the resource ARNs with commas.
- On success, responds with
UpdateCrossAccountAttachmentOutput
with field(s):cross_account_attachment(Option<Attachment>)
:Information about the updated cross-account attachment.
- On failure, responds with
SdkError<UpdateCrossAccountAttachmentError>
Source§impl Client
impl Client
Sourcepub fn update_custom_routing_accelerator(
&self,
) -> UpdateCustomRoutingAcceleratorFluentBuilder
pub fn update_custom_routing_accelerator( &self, ) -> UpdateCustomRoutingAcceleratorFluentBuilder
Constructs a fluent builder for the UpdateCustomRoutingAccelerator
operation.
- The fluent builder is configurable:
accelerator_arn(impl Into<String>)
/set_accelerator_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the accelerator to update.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseThe name of the accelerator. The name can have a maximum of 64 characters, must contain only alphanumeric characters, periods (.), or hyphens (-), and must not begin or end with a hyphen or period.
ip_address_type(IpAddressType)
/set_ip_address_type(Option<IpAddressType>)
:
required: falseThe IP address type that an accelerator supports. For a custom routing accelerator, the value must be IPV4.
ip_addresses(impl Into<String>)
/set_ip_addresses(Option<Vec::<String>>)
:
required: falseThe IP addresses for an accelerator.
enabled(bool)
/set_enabled(Option<bool>)
:
required: falseIndicates whether an accelerator is enabled. The value is true or false. The default value is true.
If the value is set to true, the accelerator cannot be deleted. If set to false, the accelerator can be deleted.
- On success, responds with
UpdateCustomRoutingAcceleratorOutput
with field(s):accelerator(Option<CustomRoutingAccelerator>)
:Information about the updated custom routing accelerator.
- On failure, responds with
SdkError<UpdateCustomRoutingAcceleratorError>
Source§impl Client
impl Client
Sourcepub fn update_custom_routing_accelerator_attributes(
&self,
) -> UpdateCustomRoutingAcceleratorAttributesFluentBuilder
pub fn update_custom_routing_accelerator_attributes( &self, ) -> UpdateCustomRoutingAcceleratorAttributesFluentBuilder
Constructs a fluent builder for the UpdateCustomRoutingAcceleratorAttributes
operation.
- The fluent builder is configurable:
accelerator_arn(impl Into<String>)
/set_accelerator_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the custom routing accelerator to update attributes for.
flow_logs_enabled(bool)
/set_flow_logs_enabled(Option<bool>)
:
required: falseUpdate whether flow logs are enabled. The default value is false. If the value is true,
FlowLogsS3Bucket
andFlowLogsS3Prefix
must be specified.For more information, see Flow logs in the Global Accelerator Developer Guide.
flow_logs_s3_bucket(impl Into<String>)
/set_flow_logs_s3_bucket(Option<String>)
:
required: falseThe name of the Amazon S3 bucket for the flow logs. Attribute is required if
FlowLogsEnabled
istrue
. The bucket must exist and have a bucket policy that grants Global Accelerator permission to write to the bucket.flow_logs_s3_prefix(impl Into<String>)
/set_flow_logs_s3_prefix(Option<String>)
:
required: falseUpdate the prefix for the location in the Amazon S3 bucket for the flow logs. Attribute is required if
FlowLogsEnabled
istrue
.If you don’t specify a prefix, the flow logs are stored in the root of the bucket. If you specify slash (/) for the S3 bucket prefix, the log file bucket folder structure will include a double slash (//), like the following:
DOC-EXAMPLE-BUCKET//AWSLogs/aws_account_id
- On success, responds with
UpdateCustomRoutingAcceleratorAttributesOutput
with field(s):accelerator_attributes(Option<CustomRoutingAcceleratorAttributes>)
:Updated custom routing accelerator.
- On failure, responds with
SdkError<UpdateCustomRoutingAcceleratorAttributesError>
Source§impl Client
impl Client
Sourcepub fn update_custom_routing_listener(
&self,
) -> UpdateCustomRoutingListenerFluentBuilder
pub fn update_custom_routing_listener( &self, ) -> UpdateCustomRoutingListenerFluentBuilder
Constructs a fluent builder for the UpdateCustomRoutingListener
operation.
- The fluent builder is configurable:
listener_arn(impl Into<String>)
/set_listener_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the listener to update.
port_ranges(PortRange)
/set_port_ranges(Option<Vec::<PortRange>>)
:
required: trueThe updated port range to support for connections from clients to your accelerator. If you remove ports that are currently being used by a subnet endpoint, the call fails.
Separately, you set port ranges for endpoints. For more information, see About endpoints for custom routing accelerators.
- On success, responds with
UpdateCustomRoutingListenerOutput
with field(s):listener(Option<CustomRoutingListener>)
:Information for the updated listener for a custom routing accelerator.
- On failure, responds with
SdkError<UpdateCustomRoutingListenerError>
Source§impl Client
impl Client
Sourcepub fn update_endpoint_group(&self) -> UpdateEndpointGroupFluentBuilder
pub fn update_endpoint_group(&self) -> UpdateEndpointGroupFluentBuilder
Constructs a fluent builder for the UpdateEndpointGroup
operation.
- The fluent builder is configurable:
endpoint_group_arn(impl Into<String>)
/set_endpoint_group_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the endpoint group.
endpoint_configurations(EndpointConfiguration)
/set_endpoint_configurations(Option<Vec::<EndpointConfiguration>>)
:
required: falseThe list of endpoint objects. A resource must be valid and active when you add it as an endpoint.
traffic_dial_percentage(f32)
/set_traffic_dial_percentage(Option<f32>)
:
required: falseThe percentage of traffic to send to an Amazon Web Services Region. Additional traffic is distributed to other endpoint groups for this listener.
Use this action to increase (dial up) or decrease (dial down) traffic to a specific Region. The percentage is applied to the traffic that would otherwise have been routed to the Region based on optimal routing.
The default value is 100.
health_check_port(i32)
/set_health_check_port(Option<i32>)
:
required: falseThe port that Global Accelerator uses to check the health of endpoints that are part of this endpoint group. The default port is the listener port that this endpoint group is associated with. If the listener port is a list of ports, Global Accelerator uses the first port in the list.
health_check_protocol(HealthCheckProtocol)
/set_health_check_protocol(Option<HealthCheckProtocol>)
:
required: falseThe protocol that Global Accelerator uses to check the health of endpoints that are part of this endpoint group. The default value is TCP.
health_check_path(impl Into<String>)
/set_health_check_path(Option<String>)
:
required: falseIf the protocol is HTTP/S, then this specifies the path that is the destination for health check targets. The default value is slash (/).
health_check_interval_seconds(i32)
/set_health_check_interval_seconds(Option<i32>)
:
required: falseThe time—10 seconds or 30 seconds—between each health check for an endpoint. The default value is 30.
threshold_count(i32)
/set_threshold_count(Option<i32>)
:
required: falseThe number of consecutive health checks required to set the state of a healthy endpoint to unhealthy, or to set an unhealthy endpoint to healthy. The default value is 3.
port_overrides(PortOverride)
/set_port_overrides(Option<Vec::<PortOverride>>)
:
required: falseOverride specific listener ports used to route traffic to endpoints that are part of this endpoint group. For example, you can create a port override in which the listener receives user traffic on ports 80 and 443, but your accelerator routes that traffic to ports 1080 and 1443, respectively, on the endpoints.
For more information, see Overriding listener ports in the Global Accelerator Developer Guide.
- On success, responds with
UpdateEndpointGroupOutput
with field(s):endpoint_group(Option<EndpointGroup>)
:The information about the endpoint group that was updated.
- On failure, responds with
SdkError<UpdateEndpointGroupError>
Source§impl Client
impl Client
Sourcepub fn update_listener(&self) -> UpdateListenerFluentBuilder
pub fn update_listener(&self) -> UpdateListenerFluentBuilder
Constructs a fluent builder for the UpdateListener
operation.
- The fluent builder is configurable:
listener_arn(impl Into<String>)
/set_listener_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the listener to update.
port_ranges(PortRange)
/set_port_ranges(Option<Vec::<PortRange>>)
:
required: falseThe updated list of port ranges for the connections from clients to the accelerator.
protocol(Protocol)
/set_protocol(Option<Protocol>)
:
required: falseThe updated protocol for the connections from clients to the accelerator.
client_affinity(ClientAffinity)
/set_client_affinity(Option<ClientAffinity>)
:
required: falseClient affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications, regardless of the port and protocol of the client request. Client affinity gives you control over whether to always route each client to the same specific endpoint.
Global Accelerator uses a consistent-flow hashing algorithm to choose the optimal endpoint for a connection. If client affinity is
NONE
, Global Accelerator uses the “five-tuple” (5-tuple) properties—source IP address, source port, destination IP address, destination port, and protocol—to select the hash value, and then chooses the best endpoint. However, with this setting, if someone uses different ports to connect to Global Accelerator, their connections might not be always routed to the same endpoint because the hash value changes.If you want a given client to always be routed to the same endpoint, set client affinity to
SOURCE_IP
instead. When you use theSOURCE_IP
setting, Global Accelerator uses the “two-tuple” (2-tuple) properties— source (client) IP address and destination IP address—to select the hash value.The default value is
NONE
.
- On success, responds with
UpdateListenerOutput
with field(s):listener(Option<Listener>)
:Information for the updated listener.
- On failure, responds with
SdkError<UpdateListenerError>
Source§impl Client
impl Client
Sourcepub fn withdraw_byoip_cidr(&self) -> WithdrawByoipCidrFluentBuilder
pub fn withdraw_byoip_cidr(&self) -> WithdrawByoipCidrFluentBuilder
Constructs a fluent builder for the WithdrawByoipCidr
operation.
- The fluent builder is configurable:
cidr(impl Into<String>)
/set_cidr(Option<String>)
:
required: trueThe address range, in CIDR notation.
For more information, see Bring your own IP addresses (BYOIP) in the Global Accelerator Developer Guide.
- On success, responds with
WithdrawByoipCidrOutput
with field(s):byoip_cidr(Option<ByoipCidr>)
:Information about the BYOIP address pool.
- On failure, responds with
SdkError<WithdrawByoipCidrError>
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);