#[non_exhaustive]pub struct ContainerServiceBuilder { /* private fields */ }
Expand description
A builder for ContainerService
.
Implementations§
Source§impl ContainerServiceBuilder
impl ContainerServiceBuilder
Sourcepub fn container_service_name(self, input: impl Into<String>) -> Self
pub fn container_service_name(self, input: impl Into<String>) -> Self
The name of the container service.
Sourcepub fn set_container_service_name(self, input: Option<String>) -> Self
pub fn set_container_service_name(self, input: Option<String>) -> Self
The name of the container service.
Sourcepub fn get_container_service_name(&self) -> &Option<String>
pub fn get_container_service_name(&self) -> &Option<String>
The name of the container service.
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 container service.
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 container service.
Sourcepub fn get_arn(&self) -> &Option<String>
pub fn get_arn(&self) -> &Option<String>
The Amazon Resource Name (ARN) of the container service.
Sourcepub fn created_at(self, input: DateTime) -> Self
pub fn created_at(self, input: DateTime) -> Self
The timestamp when the container service was created.
Sourcepub fn set_created_at(self, input: Option<DateTime>) -> Self
pub fn set_created_at(self, input: Option<DateTime>) -> Self
The timestamp when the container service was created.
Sourcepub fn get_created_at(&self) -> &Option<DateTime>
pub fn get_created_at(&self) -> &Option<DateTime>
The timestamp when the container service was created.
Sourcepub fn location(self, input: ResourceLocation) -> Self
pub fn location(self, input: ResourceLocation) -> Self
An object that describes the location of the container service, such as the Amazon Web Services Region and Availability Zone.
Sourcepub fn set_location(self, input: Option<ResourceLocation>) -> Self
pub fn set_location(self, input: Option<ResourceLocation>) -> Self
An object that describes the location of the container service, such as the Amazon Web Services Region and Availability Zone.
Sourcepub fn get_location(&self) -> &Option<ResourceLocation>
pub fn get_location(&self) -> &Option<ResourceLocation>
An object that describes the location of the container service, such as the Amazon Web Services Region and Availability Zone.
Sourcepub fn resource_type(self, input: ResourceType) -> Self
pub fn resource_type(self, input: ResourceType) -> Self
The Lightsail resource type of the container service.
Sourcepub fn set_resource_type(self, input: Option<ResourceType>) -> Self
pub fn set_resource_type(self, input: Option<ResourceType>) -> Self
The Lightsail resource type of the container service.
Sourcepub fn get_resource_type(&self) -> &Option<ResourceType>
pub fn get_resource_type(&self) -> &Option<ResourceType>
The Lightsail resource type of the container service.
Appends an item to tags
.
To override the contents of this collection use set_tags
.
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
Sourcepub fn power(self, input: ContainerServicePowerName) -> Self
pub fn power(self, input: ContainerServicePowerName) -> Self
The power specification of the container service.
The power specifies the amount of RAM, the number of vCPUs, and the base price of the container service.
Sourcepub fn set_power(self, input: Option<ContainerServicePowerName>) -> Self
pub fn set_power(self, input: Option<ContainerServicePowerName>) -> Self
The power specification of the container service.
The power specifies the amount of RAM, the number of vCPUs, and the base price of the container service.
Sourcepub fn get_power(&self) -> &Option<ContainerServicePowerName>
pub fn get_power(&self) -> &Option<ContainerServicePowerName>
The power specification of the container service.
The power specifies the amount of RAM, the number of vCPUs, and the base price of the container service.
Sourcepub fn power_id(self, input: impl Into<String>) -> Self
pub fn power_id(self, input: impl Into<String>) -> Self
The ID of the power of the container service.
Sourcepub fn set_power_id(self, input: Option<String>) -> Self
pub fn set_power_id(self, input: Option<String>) -> Self
The ID of the power of the container service.
Sourcepub fn get_power_id(&self) -> &Option<String>
pub fn get_power_id(&self) -> &Option<String>
The ID of the power of the container service.
Sourcepub fn state(self, input: ContainerServiceState) -> Self
pub fn state(self, input: ContainerServiceState) -> Self
The current state of the container service.
The following container service states are possible:
-
PENDING
- The container service is being created. -
READY
- The container service is running but it does not have an active container deployment. -
DEPLOYING
- The container service is launching a container deployment. -
RUNNING
- The container service is running and it has an active container deployment. -
UPDATING
- The container service capacity or its custom domains are being updated. -
DELETING
- The container service is being deleted. -
DISABLED
- The container service is disabled, and its active deployment and containers, if any, are shut down.
Sourcepub fn set_state(self, input: Option<ContainerServiceState>) -> Self
pub fn set_state(self, input: Option<ContainerServiceState>) -> Self
The current state of the container service.
The following container service states are possible:
-
PENDING
- The container service is being created. -
READY
- The container service is running but it does not have an active container deployment. -
DEPLOYING
- The container service is launching a container deployment. -
RUNNING
- The container service is running and it has an active container deployment. -
UPDATING
- The container service capacity or its custom domains are being updated. -
DELETING
- The container service is being deleted. -
DISABLED
- The container service is disabled, and its active deployment and containers, if any, are shut down.
Sourcepub fn get_state(&self) -> &Option<ContainerServiceState>
pub fn get_state(&self) -> &Option<ContainerServiceState>
The current state of the container service.
The following container service states are possible:
-
PENDING
- The container service is being created. -
READY
- The container service is running but it does not have an active container deployment. -
DEPLOYING
- The container service is launching a container deployment. -
RUNNING
- The container service is running and it has an active container deployment. -
UPDATING
- The container service capacity or its custom domains are being updated. -
DELETING
- The container service is being deleted. -
DISABLED
- The container service is disabled, and its active deployment and containers, if any, are shut down.
Sourcepub fn state_detail(self, input: ContainerServiceStateDetail) -> Self
pub fn state_detail(self, input: ContainerServiceStateDetail) -> Self
An object that describes the current state of the container service.
The state detail is populated only when a container service is in a PENDING
, DEPLOYING
, or UPDATING
state.
Sourcepub fn set_state_detail(
self,
input: Option<ContainerServiceStateDetail>,
) -> Self
pub fn set_state_detail( self, input: Option<ContainerServiceStateDetail>, ) -> Self
An object that describes the current state of the container service.
The state detail is populated only when a container service is in a PENDING
, DEPLOYING
, or UPDATING
state.
Sourcepub fn get_state_detail(&self) -> &Option<ContainerServiceStateDetail>
pub fn get_state_detail(&self) -> &Option<ContainerServiceStateDetail>
An object that describes the current state of the container service.
The state detail is populated only when a container service is in a PENDING
, DEPLOYING
, or UPDATING
state.
Sourcepub fn scale(self, input: i32) -> Self
pub fn scale(self, input: i32) -> Self
The scale specification of the container service.
The scale specifies the allocated compute nodes of the container service.
Sourcepub fn set_scale(self, input: Option<i32>) -> Self
pub fn set_scale(self, input: Option<i32>) -> Self
The scale specification of the container service.
The scale specifies the allocated compute nodes of the container service.
Sourcepub fn get_scale(&self) -> &Option<i32>
pub fn get_scale(&self) -> &Option<i32>
The scale specification of the container service.
The scale specifies the allocated compute nodes of the container service.
Sourcepub fn current_deployment(self, input: ContainerServiceDeployment) -> Self
pub fn current_deployment(self, input: ContainerServiceDeployment) -> Self
An object that describes the current container deployment of the container service.
Sourcepub fn set_current_deployment(
self,
input: Option<ContainerServiceDeployment>,
) -> Self
pub fn set_current_deployment( self, input: Option<ContainerServiceDeployment>, ) -> Self
An object that describes the current container deployment of the container service.
Sourcepub fn get_current_deployment(&self) -> &Option<ContainerServiceDeployment>
pub fn get_current_deployment(&self) -> &Option<ContainerServiceDeployment>
An object that describes the current container deployment of the container service.
Sourcepub fn next_deployment(self, input: ContainerServiceDeployment) -> Self
pub fn next_deployment(self, input: ContainerServiceDeployment) -> Self
An object that describes the next deployment of the container service.
This value is null
when there is no deployment in a pending
state.
Sourcepub fn set_next_deployment(
self,
input: Option<ContainerServiceDeployment>,
) -> Self
pub fn set_next_deployment( self, input: Option<ContainerServiceDeployment>, ) -> Self
An object that describes the next deployment of the container service.
This value is null
when there is no deployment in a pending
state.
Sourcepub fn get_next_deployment(&self) -> &Option<ContainerServiceDeployment>
pub fn get_next_deployment(&self) -> &Option<ContainerServiceDeployment>
An object that describes the next deployment of the container service.
This value is null
when there is no deployment in a pending
state.
Sourcepub fn is_disabled(self, input: bool) -> Self
pub fn is_disabled(self, input: bool) -> Self
A Boolean value indicating whether the container service is disabled.
Sourcepub fn set_is_disabled(self, input: Option<bool>) -> Self
pub fn set_is_disabled(self, input: Option<bool>) -> Self
A Boolean value indicating whether the container service is disabled.
Sourcepub fn get_is_disabled(&self) -> &Option<bool>
pub fn get_is_disabled(&self) -> &Option<bool>
A Boolean value indicating whether the container service is disabled.
Sourcepub fn principal_arn(self, input: impl Into<String>) -> Self
pub fn principal_arn(self, input: impl Into<String>) -> Self
The principal ARN of the container service.
The principal ARN can be used to create a trust relationship between your standard Amazon Web Services account and your Lightsail container service. This allows you to give your service permission to access resources in your standard Amazon Web Services account.
Sourcepub fn set_principal_arn(self, input: Option<String>) -> Self
pub fn set_principal_arn(self, input: Option<String>) -> Self
The principal ARN of the container service.
The principal ARN can be used to create a trust relationship between your standard Amazon Web Services account and your Lightsail container service. This allows you to give your service permission to access resources in your standard Amazon Web Services account.
Sourcepub fn get_principal_arn(&self) -> &Option<String>
pub fn get_principal_arn(&self) -> &Option<String>
The principal ARN of the container service.
The principal ARN can be used to create a trust relationship between your standard Amazon Web Services account and your Lightsail container service. This allows you to give your service permission to access resources in your standard Amazon Web Services account.
Sourcepub fn private_domain_name(self, input: impl Into<String>) -> Self
pub fn private_domain_name(self, input: impl Into<String>) -> Self
The private domain name of the container service.
The private domain name is accessible only by other resources within the default virtual private cloud (VPC) of your Lightsail account.
Sourcepub fn set_private_domain_name(self, input: Option<String>) -> Self
pub fn set_private_domain_name(self, input: Option<String>) -> Self
The private domain name of the container service.
The private domain name is accessible only by other resources within the default virtual private cloud (VPC) of your Lightsail account.
Sourcepub fn get_private_domain_name(&self) -> &Option<String>
pub fn get_private_domain_name(&self) -> &Option<String>
The private domain name of the container service.
The private domain name is accessible only by other resources within the default virtual private cloud (VPC) of your Lightsail account.
Sourcepub fn public_domain_names(self, k: impl Into<String>, v: Vec<String>) -> Self
pub fn public_domain_names(self, k: impl Into<String>, v: Vec<String>) -> Self
Adds a key-value pair to public_domain_names
.
To override the contents of this collection use set_public_domain_names
.
The public domain name of the container service, such as example.com
and www.example.com
.
You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container configured as the public endpoint of your container service.
If you don't specify public domain names, then you can use the default domain of the container service.
You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the CreateCertificate
action to create a certificate for the public domain names you want to use with your container service.
See CreateContainerService
or UpdateContainerService
for information about how to specify public domain names for your Lightsail container service.
Sourcepub fn set_public_domain_names(
self,
input: Option<HashMap<String, Vec<String>>>,
) -> Self
pub fn set_public_domain_names( self, input: Option<HashMap<String, Vec<String>>>, ) -> Self
The public domain name of the container service, such as example.com
and www.example.com
.
You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container configured as the public endpoint of your container service.
If you don't specify public domain names, then you can use the default domain of the container service.
You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the CreateCertificate
action to create a certificate for the public domain names you want to use with your container service.
See CreateContainerService
or UpdateContainerService
for information about how to specify public domain names for your Lightsail container service.
Sourcepub fn get_public_domain_names(&self) -> &Option<HashMap<String, Vec<String>>>
pub fn get_public_domain_names(&self) -> &Option<HashMap<String, Vec<String>>>
The public domain name of the container service, such as example.com
and www.example.com
.
You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container configured as the public endpoint of your container service.
If you don't specify public domain names, then you can use the default domain of the container service.
You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the CreateCertificate
action to create a certificate for the public domain names you want to use with your container service.
See CreateContainerService
or UpdateContainerService
for information about how to specify public domain names for your Lightsail container service.
Sourcepub fn url(self, input: impl Into<String>) -> Self
pub fn url(self, input: impl Into<String>) -> Self
The publicly accessible URL of the container service.
If no public endpoint is specified in the currentDeployment
, this URL returns a 404 response.
Sourcepub fn set_url(self, input: Option<String>) -> Self
pub fn set_url(self, input: Option<String>) -> Self
The publicly accessible URL of the container service.
If no public endpoint is specified in the currentDeployment
, this URL returns a 404 response.
Sourcepub fn get_url(&self) -> &Option<String>
pub fn get_url(&self) -> &Option<String>
The publicly accessible URL of the container service.
If no public endpoint is specified in the currentDeployment
, this URL returns a 404 response.
Sourcepub fn private_registry_access(self, input: PrivateRegistryAccess) -> Self
pub fn private_registry_access(self, input: PrivateRegistryAccess) -> Self
An object that describes the configuration for the container service to access private container image repositories, such as Amazon Elastic Container Registry (Amazon ECR) private repositories.
For more information, see Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service in the Amazon Lightsail Developer Guide.
Sourcepub fn set_private_registry_access(
self,
input: Option<PrivateRegistryAccess>,
) -> Self
pub fn set_private_registry_access( self, input: Option<PrivateRegistryAccess>, ) -> Self
An object that describes the configuration for the container service to access private container image repositories, such as Amazon Elastic Container Registry (Amazon ECR) private repositories.
For more information, see Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service in the Amazon Lightsail Developer Guide.
Sourcepub fn get_private_registry_access(&self) -> &Option<PrivateRegistryAccess>
pub fn get_private_registry_access(&self) -> &Option<PrivateRegistryAccess>
An object that describes the configuration for the container service to access private container image repositories, such as Amazon Elastic Container Registry (Amazon ECR) private repositories.
For more information, see Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service in the Amazon Lightsail Developer Guide.
Sourcepub fn build(self) -> ContainerService
pub fn build(self) -> ContainerService
Consumes the builder and constructs a ContainerService
.
Trait Implementations§
Source§impl Clone for ContainerServiceBuilder
impl Clone for ContainerServiceBuilder
Source§fn clone(&self) -> ContainerServiceBuilder
fn clone(&self) -> ContainerServiceBuilder
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ContainerServiceBuilder
impl Debug for ContainerServiceBuilder
Source§impl Default for ContainerServiceBuilder
impl Default for ContainerServiceBuilder
Source§fn default() -> ContainerServiceBuilder
fn default() -> ContainerServiceBuilder
Source§impl PartialEq for ContainerServiceBuilder
impl PartialEq for ContainerServiceBuilder
Source§fn eq(&self, other: &ContainerServiceBuilder) -> bool
fn eq(&self, other: &ContainerServiceBuilder) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for ContainerServiceBuilder
Auto Trait Implementations§
impl Freeze for ContainerServiceBuilder
impl RefUnwindSafe for ContainerServiceBuilder
impl Send for ContainerServiceBuilder
impl Sync for ContainerServiceBuilder
impl Unpin for ContainerServiceBuilder
impl UnwindSafe for ContainerServiceBuilder
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);