Struct aws_sdk_opsworkscm::Client
source · pub struct Client { /* private fields */ }
Expand description
Client for AWS OpsWorks CM
Client for invoking operations on AWS OpsWorks CM. Each operation on AWS OpsWorks CM 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_opsworkscm::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 Config
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_opsworkscm::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 AssociateNode
operation has
a Client::associate_node
, 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.associate_node()
.server_name("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.
§Waiters
This client provides wait_until
methods behind the Waiters
trait.
To use them, simply import the trait, and then call one of the wait_until
methods. This will
return a waiter fluent builder that takes various parameters, which are documented on the builder
type. Once parameters have been provided, the wait
method can be called to initiate waiting.
For example, if there was a wait_until_thing
method, it could look like:
let result = client.wait_until_thing()
.thing_id("someId")
.wait(Duration::from_secs(120))
.await;
Implementations§
source§impl Client
impl Client
sourcepub fn associate_node(&self) -> AssociateNodeFluentBuilder
pub fn associate_node(&self) -> AssociateNodeFluentBuilder
Constructs a fluent builder for the AssociateNode
operation.
- The fluent builder is configurable:
server_name(impl Into<String>)
/set_server_name(Option<String>)
:
required: trueThe name of the server with which to associate the node.
node_name(impl Into<String>)
/set_node_name(Option<String>)
:
required: trueThe name of the node.
engine_attributes(EngineAttribute)
/set_engine_attributes(Option<Vec::<EngineAttribute>>)
:
required: trueEngine attributes used for associating the node.
Attributes accepted in a AssociateNode request for Chef
-
CHEF_ORGANIZATION
: The Chef organization with which the node is associated. By default only one organization nameddefault
can exist. -
CHEF_NODE_PUBLIC_KEY
: A PEM-formatted public key. This key is required for thechef-client
agent to access the Chef API.
Attributes accepted in a AssociateNode request for Puppet
-
PUPPET_NODE_CSR
: A PEM-formatted certificate-signing request (CSR) that is created by the node.
-
- On success, responds with
AssociateNodeOutput
with field(s):node_association_status_token(Option<String>)
:Contains a token which can be passed to the
DescribeNodeAssociationStatus
API call to get the status of the association request.
- On failure, responds with
SdkError<AssociateNodeError>
source§impl Client
impl Client
sourcepub fn create_backup(&self) -> CreateBackupFluentBuilder
pub fn create_backup(&self) -> CreateBackupFluentBuilder
Constructs a fluent builder for the CreateBackup
operation.
- The fluent builder is configurable:
server_name(impl Into<String>)
/set_server_name(Option<String>)
:
required: trueThe name of the server that you want to back up.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA user-defined description of the backup.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseA map that contains tag keys and tag values to attach to an AWS OpsWorks-CM server backup.
-
The key cannot be empty.
-
The key can be a maximum of 127 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters:
+ - = . _ : /
-
The value can be a maximum 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters:
+ - = . _ : /
-
Leading and trailing white spaces are trimmed from both the key and value.
-
A maximum of 50 user-applied tags is allowed for tag-supported AWS OpsWorks-CM resources.
-
- On success, responds with
CreateBackupOutput
with field(s):backup(Option<Backup>)
:Backup created by request.
- On failure, responds with
SdkError<CreateBackupError>
source§impl Client
impl Client
sourcepub fn create_server(&self) -> CreateServerFluentBuilder
pub fn create_server(&self) -> CreateServerFluentBuilder
Constructs a fluent builder for the CreateServer
operation.
- The fluent builder is configurable:
associate_public_ip_address(bool)
/set_associate_public_ip_address(Option<bool>)
:
required: falseAssociate a public IP address with a server that you are launching. Valid values are
true
orfalse
. The default value istrue
.custom_domain(impl Into<String>)
/set_custom_domain(Option<String>)
:
required: falseAn optional public endpoint of a server, such as
https://aws.my-company.com
. To access the server, create a CNAME DNS record in your preferred DNS service that points the custom domain to the endpoint that is generated when the server is created (the value of the CreateServer Endpoint attribute). You cannot access the server by using the generatedEndpoint
value if the server is using a custom domain. If you specify a custom domain, you must also specify values forCustomCertificate
andCustomPrivateKey
.custom_certificate(impl Into<String>)
/set_custom_certificate(Option<String>)
:
required: falseA PEM-formatted HTTPS certificate. The value can be be a single, self-signed certificate, or a certificate chain. If you specify a custom certificate, you must also specify values for
CustomDomain
andCustomPrivateKey
. The following are requirements for theCustomCertificate
value:-
You can provide either a self-signed, custom certificate, or the full certificate chain.
-
The certificate must be a valid X509 certificate, or a certificate chain in PEM format.
-
The certificate must be valid at the time of upload. A certificate can’t be used before its validity period begins (the certificate’s
NotBefore
date), or after it expires (the certificate’sNotAfter
date). -
The certificate’s common name or subject alternative names (SANs), if present, must match the value of
CustomDomain
. -
The certificate must match the value of
CustomPrivateKey
.
-
custom_private_key(impl Into<String>)
/set_custom_private_key(Option<String>)
:
required: falseA private key in PEM format for connecting to the server by using HTTPS. The private key must not be encrypted; it cannot be protected by a password or passphrase. If you specify a custom private key, you must also specify values for
CustomDomain
andCustomCertificate
.disable_automated_backup(bool)
/set_disable_automated_backup(Option<bool>)
:
required: falseEnable or disable scheduled backups. Valid values are
true
orfalse
. The default value istrue
.engine(impl Into<String>)
/set_engine(Option<String>)
:
required: trueThe configuration management engine to use. Valid values include
ChefAutomate
andPuppet
.engine_model(impl Into<String>)
/set_engine_model(Option<String>)
:
required: falseThe engine model of the server. Valid values in this release include
Monolithic
for Puppet andSingle
for Chef.engine_version(impl Into<String>)
/set_engine_version(Option<String>)
:
required: falseThe major release version of the engine that you want to use. For a Chef server, the valid value for EngineVersion is currently
2
. For a Puppet server, valid values are2019
or2017
.engine_attributes(EngineAttribute)
/set_engine_attributes(Option<Vec::<EngineAttribute>>)
:
required: falseOptional engine attributes on a specified server.
Attributes accepted in a Chef createServer request:
-
CHEF_AUTOMATE_PIVOTAL_KEY
: A base64-encoded RSA public key. The corresponding private key is required to access the Chef API. When no CHEF_AUTOMATE_PIVOTAL_KEY is set, a private key is generated and returned in the response. -
CHEF_AUTOMATE_ADMIN_PASSWORD
: The password for the administrative user in the Chef Automate web-based dashboard. The password length is a minimum of eight characters, and a maximum of 32. The password can contain letters, numbers, and special characters (!/@#$%^&+=_). The password must contain at least one lower case letter, one upper case letter, one number, and one special character. When no CHEF_AUTOMATE_ADMIN_PASSWORD is set, one is generated and returned in the response.
Attributes accepted in a Puppet createServer request:
-
PUPPET_ADMIN_PASSWORD
: To work with the Puppet Enterprise console, a password must use ASCII characters. -
PUPPET_R10K_REMOTE
: The r10k remote is the URL of your control repository (for example, ssh://git@your.git-repo.com:user/control-repo.git). Specifying an r10k remote opens TCP port 8170. -
PUPPET_R10K_PRIVATE_KEY
: If you are using a private Git repository, add PUPPET_R10K_PRIVATE_KEY to specify a PEM-encoded private SSH key.
-
backup_retention_count(i32)
/set_backup_retention_count(Option<i32>)
:
required: falseThe number of automated backups that you want to keep. Whenever a new backup is created, AWS OpsWorks CM deletes the oldest backups if this number is exceeded. The default value is
1
.server_name(impl Into<String>)
/set_server_name(Option<String>)
:
required: trueThe name of the server. The server name must be unique within your AWS account, within each region. Server names must start with a letter; then letters, numbers, or hyphens (-) are allowed, up to a maximum of 40 characters.
instance_profile_arn(impl Into<String>)
/set_instance_profile_arn(Option<String>)
:
required: trueThe ARN of the instance profile that your Amazon EC2 instances use. Although the AWS OpsWorks console typically creates the instance profile for you, if you are using API commands instead, run the service-role-creation.yaml AWS CloudFormation template, located at https://s3.amazonaws.com/opsworks-cm-us-east-1-prod-default-assets/misc/opsworks-cm-roles.yaml. This template creates a CloudFormation stack that includes the instance profile you need.
instance_type(impl Into<String>)
/set_instance_type(Option<String>)
:
required: trueThe Amazon EC2 instance type to use. For example,
m5.large
.key_pair(impl Into<String>)
/set_key_pair(Option<String>)
:
required: falseThe Amazon EC2 key pair to set for the instance. This parameter is optional; if desired, you may specify this parameter to connect to your instances by using SSH.
preferred_maintenance_window(impl Into<String>)
/set_preferred_maintenance_window(Option<String>)
:
required: falseThe start time for a one-hour period each week during which AWS OpsWorks CM performs maintenance on the instance. Valid values must be specified in the following format:
DDD:HH:MM
.MM
must be specified as00
. The specified time is in coordinated universal time (UTC). The default value is a random one-hour period on Tuesday, Wednesday, or Friday. SeeTimeWindowDefinition
for more information.Example:
Mon:08:00
, which represents a start time of every Monday at 08:00 UTC. (8:00 a.m.)preferred_backup_window(impl Into<String>)
/set_preferred_backup_window(Option<String>)
:
required: falseThe start time for a one-hour period during which AWS OpsWorks CM backs up application-level data on your server if automated backups are enabled. Valid values must be specified in one of the following formats:
-
HH:MM
for daily backups -
DDD:HH:MM
for weekly backups
MM
must be specified as00
. The specified time is in coordinated universal time (UTC). The default value is a random, daily start time.Example:
08:00
, which represents a daily start time of 08:00 UTC.Example:
Mon:08:00
, which represents a start time of every Monday at 08:00 UTC. (8:00 a.m.)-
security_group_ids(impl Into<String>)
/set_security_group_ids(Option<Vec::<String>>)
:
required: falseA list of security group IDs to attach to the Amazon EC2 instance. If you add this parameter, the specified security groups must be within the VPC that is specified by
SubnetIds
.If you do not specify this parameter, AWS OpsWorks CM creates one new security group that uses TCP ports 22 and 443, open to 0.0.0.0/0 (everyone).
service_role_arn(impl Into<String>)
/set_service_role_arn(Option<String>)
:
required: trueThe service role that the AWS OpsWorks CM service backend uses to work with your account. Although the AWS OpsWorks management console typically creates the service role for you, if you are using the AWS CLI or API commands, run the service-role-creation.yaml AWS CloudFormation template, located at https://s3.amazonaws.com/opsworks-cm-us-east-1-prod-default-assets/misc/opsworks-cm-roles.yaml. This template creates a CloudFormation stack that includes the service role and instance profile that you need.
subnet_ids(impl Into<String>)
/set_subnet_ids(Option<Vec::<String>>)
:
required: falseThe IDs of subnets in which to launch the server EC2 instance.
Amazon EC2-Classic customers: This field is required. All servers must run within a VPC. The VPC must have “Auto Assign Public IP” enabled.
EC2-VPC customers: This field is optional. If you do not specify subnet IDs, your EC2 instances are created in a default subnet that is selected by Amazon EC2. If you specify subnet IDs, the VPC must have “Auto Assign Public IP” enabled.
For more information about supported Amazon EC2 platforms, see Supported Platforms.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseA map that contains tag keys and tag values to attach to an AWS OpsWorks for Chef Automate or AWS OpsWorks for Puppet Enterprise server.
-
The key cannot be empty.
-
The key can be a maximum of 127 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters:
+ - = . _ : / @
-
The value can be a maximum 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters:
+ - = . _ : / @
-
Leading and trailing white spaces are trimmed from both the key and value.
-
A maximum of 50 user-applied tags is allowed for any AWS OpsWorks-CM server.
-
backup_id(impl Into<String>)
/set_backup_id(Option<String>)
:
required: falseIf you specify this field, AWS OpsWorks CM creates the server by using the backup represented by BackupId.
- On success, responds with
CreateServerOutput
with field(s):server(Option<Server>)
:The server that is created by the request.
- On failure, responds with
SdkError<CreateServerError>
source§impl Client
impl Client
sourcepub fn delete_backup(&self) -> DeleteBackupFluentBuilder
pub fn delete_backup(&self) -> DeleteBackupFluentBuilder
Constructs a fluent builder for the DeleteBackup
operation.
- The fluent builder is configurable:
backup_id(impl Into<String>)
/set_backup_id(Option<String>)
:
required: trueThe ID of the backup to delete. Run the DescribeBackups command to get a list of backup IDs. Backup IDs are in the format
ServerName-yyyyMMddHHmmssSSS
.
- On success, responds with
DeleteBackupOutput
- On failure, responds with
SdkError<DeleteBackupError>
source§impl Client
impl Client
sourcepub fn delete_server(&self) -> DeleteServerFluentBuilder
pub fn delete_server(&self) -> DeleteServerFluentBuilder
Constructs a fluent builder for the DeleteServer
operation.
- The fluent builder is configurable:
server_name(impl Into<String>)
/set_server_name(Option<String>)
:
required: trueThe ID of the server to delete.
- On success, responds with
DeleteServerOutput
- On failure, responds with
SdkError<DeleteServerError>
source§impl Client
impl Client
sourcepub fn describe_account_attributes(
&self
) -> DescribeAccountAttributesFluentBuilder
pub fn describe_account_attributes( &self ) -> DescribeAccountAttributesFluentBuilder
Constructs a fluent builder for the DescribeAccountAttributes
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
DescribeAccountAttributesOutput
with field(s):attributes(Option<Vec::<AccountAttribute>>)
:The attributes that are currently set for the account.
- On failure, responds with
SdkError<DescribeAccountAttributesError>
source§impl Client
impl Client
sourcepub fn describe_backups(&self) -> DescribeBackupsFluentBuilder
pub fn describe_backups(&self) -> DescribeBackupsFluentBuilder
Constructs a fluent builder for the DescribeBackups
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
backup_id(impl Into<String>)
/set_backup_id(Option<String>)
:
required: falseDescribes a single backup.
server_name(impl Into<String>)
/set_server_name(Option<String>)
:
required: falseReturns backups for the server with the specified ServerName.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThis is not currently implemented for
DescribeBackups
requests.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThis is not currently implemented for
DescribeBackups
requests.
- On success, responds with
DescribeBackupsOutput
with field(s):backups(Option<Vec::<Backup>>)
:Contains the response to a
DescribeBackups
request.next_token(Option<String>)
:This is not currently implemented for
DescribeBackups
requests.
- On failure, responds with
SdkError<DescribeBackupsError>
source§impl Client
impl Client
sourcepub fn describe_events(&self) -> DescribeEventsFluentBuilder
pub fn describe_events(&self) -> DescribeEventsFluentBuilder
Constructs a fluent builder for the DescribeEvents
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
server_name(impl Into<String>)
/set_server_name(Option<String>)
:
required: trueThe name of the server for which you want to view events.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseNextToken is a string that is returned in some command responses. It indicates that not all entries have been returned, and that you must run at least one more request to get remaining items. To get remaining results, call
DescribeEvents
again, and assign the token from the previous results as the value of thenextToken
parameter. If there are no more results, the response object’snextToken
parameter value isnull
. Setting anextToken
value that was not returned in your previous results causes anInvalidNextTokenException
to occur.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseTo receive a paginated response, use this parameter to specify the maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a
NextToken
value that you can assign to theNextToken
request parameter to get the next set of results.
- On success, responds with
DescribeEventsOutput
with field(s):server_events(Option<Vec::<ServerEvent>>)
:Contains the response to a
DescribeEvents
request.next_token(Option<String>)
:NextToken is a string that is returned in some command responses. It indicates that not all entries have been returned, and that you must run at least one more request to get remaining items. To get remaining results, call
DescribeEvents
again, and assign the token from the previous results as the value of thenextToken
parameter. If there are no more results, the response object’snextToken
parameter value isnull
. Setting anextToken
value that was not returned in your previous results causes anInvalidNextTokenException
to occur.
- On failure, responds with
SdkError<DescribeEventsError>
source§impl Client
impl Client
sourcepub fn describe_node_association_status(
&self
) -> DescribeNodeAssociationStatusFluentBuilder
pub fn describe_node_association_status( &self ) -> DescribeNodeAssociationStatusFluentBuilder
Constructs a fluent builder for the DescribeNodeAssociationStatus
operation.
- The fluent builder is configurable:
node_association_status_token(impl Into<String>)
/set_node_association_status_token(Option<String>)
:
required: trueThe token returned in either the AssociateNodeResponse or the DisassociateNodeResponse.
server_name(impl Into<String>)
/set_server_name(Option<String>)
:
required: trueThe name of the server from which to disassociate the node.
- On success, responds with
DescribeNodeAssociationStatusOutput
with field(s):node_association_status(Option<NodeAssociationStatus>)
:The status of the association or disassociation request.
Possible values:
-
SUCCESS
: The association or disassociation succeeded. -
FAILED
: The association or disassociation failed. -
IN_PROGRESS
: The association or disassociation is still in progress.
-
engine_attributes(Option<Vec::<EngineAttribute>>)
:Attributes specific to the node association. In Puppet, the attibute PUPPET_NODE_CERT contains the signed certificate (the result of the CSR).
- On failure, responds with
SdkError<DescribeNodeAssociationStatusError>
source§impl Client
impl Client
sourcepub fn describe_servers(&self) -> DescribeServersFluentBuilder
pub fn describe_servers(&self) -> DescribeServersFluentBuilder
Constructs a fluent builder for the DescribeServers
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
server_name(impl Into<String>)
/set_server_name(Option<String>)
:
required: falseDescribes the server with the specified ServerName.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThis is not currently implemented for
DescribeServers
requests.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThis is not currently implemented for
DescribeServers
requests.
- On success, responds with
DescribeServersOutput
with field(s):servers(Option<Vec::<Server>>)
:Contains the response to a
DescribeServers
request.For Chef Automate servers: If
DescribeServersResponse$Servers$EngineAttributes
includes CHEF_MAJOR_UPGRADE_AVAILABLE, you can upgrade the Chef Automate server to Chef Automate 2. To be eligible for upgrade, a server running Chef Automate 1 must have had at least one successful maintenance run after November 1, 2019.For Puppet servers:
DescribeServersResponse$Servers$EngineAttributes
contains the following two responses:-
PUPPET_API_CA_CERT
, the PEM-encoded CA certificate that is used by the Puppet API over TCP port number 8140. The CA certificate is also used to sign node certificates. -
PUPPET_API_CRL
, a certificate revocation list. The certificate revocation list is for internal maintenance purposes only. For more information about the Puppet certificate revocation list, see Man Page: puppet certificate_revocation_list in the Puppet documentation.
-
next_token(Option<String>)
:This is not currently implemented for
DescribeServers
requests.
- On failure, responds with
SdkError<DescribeServersError>
source§impl Client
impl Client
sourcepub fn disassociate_node(&self) -> DisassociateNodeFluentBuilder
pub fn disassociate_node(&self) -> DisassociateNodeFluentBuilder
Constructs a fluent builder for the DisassociateNode
operation.
- The fluent builder is configurable:
server_name(impl Into<String>)
/set_server_name(Option<String>)
:
required: trueThe name of the server from which to disassociate the node.
node_name(impl Into<String>)
/set_node_name(Option<String>)
:
required: trueThe name of the client node.
engine_attributes(EngineAttribute)
/set_engine_attributes(Option<Vec::<EngineAttribute>>)
:
required: falseEngine attributes that are used for disassociating the node. No attributes are required for Puppet.
Attributes required in a DisassociateNode request for Chef
-
CHEF_ORGANIZATION
: The Chef organization with which the node was associated. By default only one organization nameddefault
can exist.
-
- On success, responds with
DisassociateNodeOutput
with field(s):node_association_status_token(Option<String>)
:Contains a token which can be passed to the
DescribeNodeAssociationStatus
API call to get the status of the disassociation request.
- On failure, responds with
SdkError<DisassociateNodeError>
source§impl Client
impl Client
sourcepub fn export_server_engine_attribute(
&self
) -> ExportServerEngineAttributeFluentBuilder
pub fn export_server_engine_attribute( &self ) -> ExportServerEngineAttributeFluentBuilder
Constructs a fluent builder for the ExportServerEngineAttribute
operation.
- The fluent builder is configurable:
export_attribute_name(impl Into<String>)
/set_export_attribute_name(Option<String>)
:
required: trueThe name of the export attribute. Currently, the supported export attribute is
Userdata
. This exports a user data script that includes parameters and values provided in theInputAttributes
list.server_name(impl Into<String>)
/set_server_name(Option<String>)
:
required: trueThe name of the server from which you are exporting the attribute.
input_attributes(EngineAttribute)
/set_input_attributes(Option<Vec::<EngineAttribute>>)
:
required: falseThe list of engine attributes. The list type is
EngineAttribute
. AnEngineAttribute
list item is a pair that includes an attribute name and its value. For theUserdata
ExportAttributeName, the following are supported engine attribute names.-
RunList In Chef, a list of roles or recipes that are run in the specified order. In Puppet, this parameter is ignored.
-
OrganizationName In Chef, an organization name. AWS OpsWorks for Chef Automate always creates the organization
default
. In Puppet, this parameter is ignored. -
NodeEnvironment In Chef, a node environment (for example, development, staging, or one-box). In Puppet, this parameter is ignored.
-
NodeClientVersion In Chef, the version of the Chef engine (three numbers separated by dots, such as 13.8.5). If this attribute is empty, OpsWorks for Chef Automate uses the most current version. In Puppet, this parameter is ignored.
-
- On success, responds with
ExportServerEngineAttributeOutput
with field(s):engine_attribute(Option<EngineAttribute>)
:The requested engine attribute pair with attribute name and value.
server_name(Option<String>)
:The server name used in the request.
- On failure, responds with
SdkError<ExportServerEngineAttributeError>
source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Number (ARN) of an AWS OpsWorks for Chef Automate or AWS OpsWorks for Puppet Enterprise server for which you want to show applied tags. For example,
arn:aws:opsworks-cm:us-west-2:123456789012:server/test-owcm-server/EXAMPLE-66b0-4196-8274-d1a2bEXAMPLE
.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseNextToken is a string that is returned in some command responses. It indicates that not all entries have been returned, and that you must run at least one more request to get remaining items. To get remaining results, call
ListTagsForResource
again, and assign the token from the previous results as the value of thenextToken
parameter. If there are no more results, the response object’snextToken
parameter value isnull
. Setting anextToken
value that was not returned in your previous results causes anInvalidNextTokenException
to occur.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseTo receive a paginated response, use this parameter to specify the maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a
NextToken
value that you can assign to theNextToken
request parameter to get the next set of results.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<Vec::<Tag>>)
:Tags that have been applied to the resource.
next_token(Option<String>)
:A token that you can use as the value of
NextToken
in subsequent calls to the API to show more results.
- On failure, responds with
SdkError<ListTagsForResourceError>
source§impl Client
impl Client
sourcepub fn restore_server(&self) -> RestoreServerFluentBuilder
pub fn restore_server(&self) -> RestoreServerFluentBuilder
Constructs a fluent builder for the RestoreServer
operation.
- The fluent builder is configurable:
backup_id(impl Into<String>)
/set_backup_id(Option<String>)
:
required: trueThe ID of the backup that you want to use to restore a server.
server_name(impl Into<String>)
/set_server_name(Option<String>)
:
required: trueThe name of the server that you want to restore.
instance_type(impl Into<String>)
/set_instance_type(Option<String>)
:
required: falseThe type of instance to restore. Valid values must be specified in the following format:
^([cm][34]|t2).*
For example,m5.large
. Valid values arem5.large
,r5.xlarge
, andr5.2xlarge
. If you do not specify this parameter, RestoreServer uses the instance type from the specified backup.key_pair(impl Into<String>)
/set_key_pair(Option<String>)
:
required: falseThe name of the key pair to set on the new EC2 instance. This can be helpful if the administrator no longer has the SSH key.
- On success, responds with
RestoreServerOutput
with field(s):server(Option<Server>)
:Describes a configuration management server.
- On failure, responds with
SdkError<RestoreServerError>
source§impl Client
impl Client
sourcepub fn start_maintenance(&self) -> StartMaintenanceFluentBuilder
pub fn start_maintenance(&self) -> StartMaintenanceFluentBuilder
Constructs a fluent builder for the StartMaintenance
operation.
- The fluent builder is configurable:
server_name(impl Into<String>)
/set_server_name(Option<String>)
:
required: trueThe name of the server on which to run maintenance.
engine_attributes(EngineAttribute)
/set_engine_attributes(Option<Vec::<EngineAttribute>>)
:
required: falseEngine attributes that are specific to the server on which you want to run maintenance.
Attributes accepted in a StartMaintenance request for Chef
-
CHEF_MAJOR_UPGRADE
: If a Chef Automate server is eligible for upgrade to Chef Automate 2, add this engine attribute to aStartMaintenance
request and set the value totrue
to upgrade the server to Chef Automate 2. For more information, see Upgrade an AWS OpsWorks for Chef Automate Server to Chef Automate 2.
-
- On success, responds with
StartMaintenanceOutput
with field(s):server(Option<Server>)
:Contains the response to a
StartMaintenance
request.
- On failure, responds with
SdkError<StartMaintenanceError>
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 Number (ARN) of a resource to which you want to apply tags. For example,
arn:aws:opsworks-cm:us-west-2:123456789012:server/test-owcm-server/EXAMPLE-66b0-4196-8274-d1a2bEXAMPLE
.tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: trueA map that contains tag keys and tag values to attach to AWS OpsWorks-CM servers or backups.
-
The key cannot be empty.
-
The key can be a maximum of 127 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters:
+ - = . _ : /
-
The value can be a maximum 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters:
+ - = . _ : /
-
Leading and trailing white spaces are trimmed from both the key and value.
-
A maximum of 50 user-applied tags is allowed for any AWS OpsWorks-CM server or backup.
-
- 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 Number (ARN) of a resource from which you want to remove tags. For example,
arn:aws:opsworks-cm:us-west-2:123456789012:server/test-owcm-server/EXAMPLE-66b0-4196-8274-d1a2bEXAMPLE
.tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe keys of tags that you want to remove.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
source§impl Client
impl Client
sourcepub fn update_server(&self) -> UpdateServerFluentBuilder
pub fn update_server(&self) -> UpdateServerFluentBuilder
Constructs a fluent builder for the UpdateServer
operation.
- The fluent builder is configurable:
disable_automated_backup(bool)
/set_disable_automated_backup(Option<bool>)
:
required: falseSetting DisableAutomatedBackup to
true
disables automated or scheduled backups. Automated backups are enabled by default.backup_retention_count(i32)
/set_backup_retention_count(Option<i32>)
:
required: falseSets the number of automated backups that you want to keep.
server_name(impl Into<String>)
/set_server_name(Option<String>)
:
required: trueThe name of the server to update.
preferred_maintenance_window(impl Into<String>)
/set_preferred_maintenance_window(Option<String>)
:
required: falseDDD:HH:MM
(weekly start time) orHH:MM
(daily start time).Time windows always use coordinated universal time (UTC). Valid strings for day of week (
DDD
) are:Mon
,Tue
,Wed
,Thr
,Fri
,Sat
, orSun
.preferred_backup_window(impl Into<String>)
/set_preferred_backup_window(Option<String>)
:
required: falseDDD:HH:MM
(weekly start time) orHH:MM
(daily start time).Time windows always use coordinated universal time (UTC). Valid strings for day of week (
DDD
) are:Mon
,Tue
,Wed
,Thr
,Fri
,Sat
, orSun
.
- On success, responds with
UpdateServerOutput
with field(s):server(Option<Server>)
:Contains the response to a
UpdateServer
request.
- On failure, responds with
SdkError<UpdateServerError>
source§impl Client
impl Client
sourcepub fn update_server_engine_attributes(
&self
) -> UpdateServerEngineAttributesFluentBuilder
pub fn update_server_engine_attributes( &self ) -> UpdateServerEngineAttributesFluentBuilder
Constructs a fluent builder for the UpdateServerEngineAttributes
operation.
- The fluent builder is configurable:
server_name(impl Into<String>)
/set_server_name(Option<String>)
:
required: trueThe name of the server to update.
attribute_name(impl Into<String>)
/set_attribute_name(Option<String>)
:
required: trueThe name of the engine attribute to update.
attribute_value(impl Into<String>)
/set_attribute_value(Option<String>)
:
required: falseThe value to set for the attribute.
- On success, responds with
UpdateServerEngineAttributesOutput
with field(s):server(Option<Server>)
:Contains the response to an
UpdateServerEngineAttributes
request.
- On failure, responds with
SdkError<UpdateServerEngineAttributesError>
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§
source§impl Waiters for Client
impl Waiters for Client
source§fn wait_until_node_associated(&self) -> NodeAssociatedFluentBuilder
fn wait_until_node_associated(&self) -> NodeAssociatedFluentBuilder
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> 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 more