pub struct Client { /* private fields */ }
Expand description
Client for AWS Parallel Computing Service
Client for invoking operations on AWS Parallel Computing Service. Each operation on AWS Parallel Computing Service 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_pcs::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_pcs::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 CreateCluster
operation has
a Client::create_cluster
, 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.create_cluster()
.cluster_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.
Implementations§
Source§impl Client
impl Client
Sourcepub fn create_cluster(&self) -> CreateClusterFluentBuilder
pub fn create_cluster(&self) -> CreateClusterFluentBuilder
Constructs a fluent builder for the CreateCluster
operation.
- The fluent builder is configurable:
cluster_name(impl Into<String>)
/set_cluster_name(Option<String>)
:
required: trueA name to identify the cluster. Example:
MyCluster
scheduler(SchedulerRequest)
/set_scheduler(Option<SchedulerRequest>)
:
required: trueThe cluster management and job scheduling software associated with the cluster.
size(Size)
/set_size(Option<Size>)
:
required: trueA value that determines the maximum number of compute nodes in the cluster and the maximum number of jobs (active and queued).
-
SMALL
: 32 compute nodes and 256 jobs -
MEDIUM
: 512 compute nodes and 8192 jobs -
LARGE
: 2048 compute nodes and 16,384 jobs
-
networking(NetworkingRequest)
/set_networking(Option<NetworkingRequest>)
:
required: trueThe networking configuration used to set up the cluster’s control plane.
slurm_configuration(ClusterSlurmConfigurationRequest)
/set_slurm_configuration(Option<ClusterSlurmConfigurationRequest>)
:
required: falseAdditional options related to the Slurm scheduler.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don’t specify a client token, the CLI and SDK automatically generate 1 for you.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: false1 or more tags added to the resource. Each tag consists of a tag key and tag value. The tag value is optional and can be an empty string.
- On success, responds with
CreateClusterOutput
with field(s):cluster(Option<Cluster>)
:The cluster resource.
- On failure, responds with
SdkError<CreateClusterError>
Source§impl Client
impl Client
Sourcepub fn create_compute_node_group(&self) -> CreateComputeNodeGroupFluentBuilder
pub fn create_compute_node_group(&self) -> CreateComputeNodeGroupFluentBuilder
Constructs a fluent builder for the CreateComputeNodeGroup
operation.
- The fluent builder is configurable:
cluster_identifier(impl Into<String>)
/set_cluster_identifier(Option<String>)
:
required: trueThe name or ID of the cluster to create a compute node group in.
compute_node_group_name(impl Into<String>)
/set_compute_node_group_name(Option<String>)
:
required: trueA name to identify the cluster. Example:
MyCluster
ami_id(impl Into<String>)
/set_ami_id(Option<String>)
:
required: falseThe ID of the Amazon Machine Image (AMI) that Amazon Web Services PCS uses to launch compute nodes (Amazon EC2 instances). If you don’t provide this value, Amazon Web Services PCS uses the AMI ID specified in the custom launch template.
subnet_ids(impl Into<String>)
/set_subnet_ids(Option<Vec::<String>>)
:
required: trueThe list of subnet IDs where the compute node group launches instances. Subnets must be in the same VPC as the cluster.
purchase_option(PurchaseOption)
/set_purchase_option(Option<PurchaseOption>)
:
required: falseSpecifies how EC2 instances are purchased on your behalf. Amazon Web Services PCS supports On-Demand and Spot instances. For more information, see Instance purchasing options in the Amazon Elastic Compute Cloud User Guide. If you don’t provide this option, it defaults to On-Demand.
custom_launch_template(CustomLaunchTemplate)
/set_custom_launch_template(Option<CustomLaunchTemplate>)
:
required: trueAn Amazon EC2 launch template Amazon Web Services PCS uses to launch compute nodes.
iam_instance_profile_arn(impl Into<String>)
/set_iam_instance_profile_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM role when launching EC2 instances. The role contained in your instance profile must have the
pcs:RegisterComputeNodeGroupInstance
permission. The resource identifier of the ARN must start withAWSPCS
or it must have/aws-pcs/
in its path.Examples
-
arn:aws:iam::111122223333:instance-profile/AWSPCS-example-role-1
-
arn:aws:iam::111122223333:instance-profile/aws-pcs/example-role-2
-
scaling_configuration(ScalingConfigurationRequest)
/set_scaling_configuration(Option<ScalingConfigurationRequest>)
:
required: trueSpecifies the boundaries of the compute node group auto scaling.
instance_configs(InstanceConfig)
/set_instance_configs(Option<Vec::<InstanceConfig>>)
:
required: trueA list of EC2 instance configurations that Amazon Web Services PCS can provision in the compute node group.
spot_options(SpotOptions)
/set_spot_options(Option<SpotOptions>)
:
required: falseAdditional configuration when you specify
SPOT
as thepurchaseOption
for theCreateComputeNodeGroup
API action.slurm_configuration(ComputeNodeGroupSlurmConfigurationRequest)
/set_slurm_configuration(Option<ComputeNodeGroupSlurmConfigurationRequest>)
:
required: falseAdditional options related to the Slurm scheduler.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don’t specify a client token, the CLI and SDK automatically generate 1 for you.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: false1 or more tags added to the resource. Each tag consists of a tag key and tag value. The tag value is optional and can be an empty string.
- On success, responds with
CreateComputeNodeGroupOutput
with field(s):compute_node_group(Option<ComputeNodeGroup>)
:A compute node group associated with a cluster.
- On failure, responds with
SdkError<CreateComputeNodeGroupError>
Source§impl Client
impl Client
Sourcepub fn create_queue(&self) -> CreateQueueFluentBuilder
pub fn create_queue(&self) -> CreateQueueFluentBuilder
Constructs a fluent builder for the CreateQueue
operation.
- The fluent builder is configurable:
cluster_identifier(impl Into<String>)
/set_cluster_identifier(Option<String>)
:
required: trueThe name or ID of the cluster for which to create a queue.
queue_name(impl Into<String>)
/set_queue_name(Option<String>)
:
required: trueA name to identify the queue.
compute_node_group_configurations(ComputeNodeGroupConfiguration)
/set_compute_node_group_configurations(Option<Vec::<ComputeNodeGroupConfiguration>>)
:
required: falseThe list of compute node group configurations to associate with the queue. Queues assign jobs to associated compute node groups.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don’t specify a client token, the CLI and SDK automatically generate 1 for you.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: false1 or more tags added to the resource. Each tag consists of a tag key and tag value. The tag value is optional and can be an empty string.
- On success, responds with
CreateQueueOutput
with field(s):queue(Option<Queue>)
:A queue resource.
- On failure, responds with
SdkError<CreateQueueError>
Source§impl Client
impl Client
Sourcepub fn delete_cluster(&self) -> DeleteClusterFluentBuilder
pub fn delete_cluster(&self) -> DeleteClusterFluentBuilder
Constructs a fluent builder for the DeleteCluster
operation.
- The fluent builder is configurable:
cluster_identifier(impl Into<String>)
/set_cluster_identifier(Option<String>)
:
required: trueThe name or ID of the cluster to delete.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don’t specify a client token, the CLI and SDK automatically generate 1 for you.
- On success, responds with
DeleteClusterOutput
- On failure, responds with
SdkError<DeleteClusterError>
Source§impl Client
impl Client
Sourcepub fn delete_compute_node_group(&self) -> DeleteComputeNodeGroupFluentBuilder
pub fn delete_compute_node_group(&self) -> DeleteComputeNodeGroupFluentBuilder
Constructs a fluent builder for the DeleteComputeNodeGroup
operation.
- The fluent builder is configurable:
cluster_identifier(impl Into<String>)
/set_cluster_identifier(Option<String>)
:
required: trueThe name or ID of the cluster of the compute node group.
compute_node_group_identifier(impl Into<String>)
/set_compute_node_group_identifier(Option<String>)
:
required: trueThe name or ID of the compute node group to delete.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don’t specify a client token, the CLI and SDK automatically generate 1 for you.
- On success, responds with
DeleteComputeNodeGroupOutput
- On failure, responds with
SdkError<DeleteComputeNodeGroupError>
Source§impl Client
impl Client
Sourcepub fn delete_queue(&self) -> DeleteQueueFluentBuilder
pub fn delete_queue(&self) -> DeleteQueueFluentBuilder
Constructs a fluent builder for the DeleteQueue
operation.
- The fluent builder is configurable:
cluster_identifier(impl Into<String>)
/set_cluster_identifier(Option<String>)
:
required: trueThe name or ID of the cluster of the queue.
queue_identifier(impl Into<String>)
/set_queue_identifier(Option<String>)
:
required: trueThe name or ID of the queue to delete.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don’t specify a client token, the CLI and SDK automatically generate 1 for you.
- On success, responds with
DeleteQueueOutput
- On failure, responds with
SdkError<DeleteQueueError>
Source§impl Client
impl Client
Sourcepub fn get_cluster(&self) -> GetClusterFluentBuilder
pub fn get_cluster(&self) -> GetClusterFluentBuilder
Constructs a fluent builder for the GetCluster
operation.
- The fluent builder is configurable:
cluster_identifier(impl Into<String>)
/set_cluster_identifier(Option<String>)
:
required: trueThe name or ID of the cluster of the queue.
- On success, responds with
GetClusterOutput
with field(s):cluster(Option<Cluster>)
:The cluster resource.
- On failure, responds with
SdkError<GetClusterError>
Source§impl Client
impl Client
Sourcepub fn get_compute_node_group(&self) -> GetComputeNodeGroupFluentBuilder
pub fn get_compute_node_group(&self) -> GetComputeNodeGroupFluentBuilder
Constructs a fluent builder for the GetComputeNodeGroup
operation.
- The fluent builder is configurable:
cluster_identifier(impl Into<String>)
/set_cluster_identifier(Option<String>)
:
required: trueThe name or ID of the cluster.
compute_node_group_identifier(impl Into<String>)
/set_compute_node_group_identifier(Option<String>)
:
required: trueThe name or ID of the compute node group.
- On success, responds with
GetComputeNodeGroupOutput
with field(s):compute_node_group(Option<ComputeNodeGroup>)
:A compute node group associated with a cluster.
- On failure, responds with
SdkError<GetComputeNodeGroupError>
Source§impl Client
impl Client
Sourcepub fn get_queue(&self) -> GetQueueFluentBuilder
pub fn get_queue(&self) -> GetQueueFluentBuilder
Constructs a fluent builder for the GetQueue
operation.
- The fluent builder is configurable:
cluster_identifier(impl Into<String>)
/set_cluster_identifier(Option<String>)
:
required: trueThe name or ID of the cluster of the queue.
queue_identifier(impl Into<String>)
/set_queue_identifier(Option<String>)
:
required: trueThe name or ID of the queue.
- On success, responds with
GetQueueOutput
with field(s):queue(Option<Queue>)
:A queue resource.
- On failure, responds with
SdkError<GetQueueError>
Source§impl Client
impl Client
Sourcepub fn list_clusters(&self) -> ListClustersFluentBuilder
pub fn list_clusters(&self) -> ListClustersFluentBuilder
Constructs a fluent builder for the ListClusters
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe value of
nextToken
is a unique pagination token for each page of results returned. IfnextToken
is returned, there are more results available. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token returns anHTTP 400 InvalidToken
error.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results that are returned per call. You can use
nextToken
to obtain further pages of results. The default is 10 results, and the maximum allowed page size is 100 results. A value of 0 uses the default.
- On success, responds with
ListClustersOutput
with field(s):clusters(Vec::<ClusterSummary>)
:The list of clusters.
next_token(Option<String>)
:The value of
nextToken
is a unique pagination token for each page of results returned. IfnextToken
is returned, there are more results available. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token returns anHTTP 400 InvalidToken
error.
- On failure, responds with
SdkError<ListClustersError>
Source§impl Client
impl Client
Sourcepub fn list_compute_node_groups(&self) -> ListComputeNodeGroupsFluentBuilder
pub fn list_compute_node_groups(&self) -> ListComputeNodeGroupsFluentBuilder
Constructs a fluent builder for the ListComputeNodeGroups
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
cluster_identifier(impl Into<String>)
/set_cluster_identifier(Option<String>)
:
required: trueThe name or ID of the cluster to list compute node groups for.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe value of
nextToken
is a unique pagination token for each page of results returned. IfnextToken
is returned, there are more results available. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token returns anHTTP 400 InvalidToken
error.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results that are returned per call. You can use
nextToken
to obtain further pages of results. The default is 10 results, and the maximum allowed page size is 100 results. A value of 0 uses the default.
- On success, responds with
ListComputeNodeGroupsOutput
with field(s):compute_node_groups(Vec::<ComputeNodeGroupSummary>)
:The list of compute node groups for the cluster.
next_token(Option<String>)
:The value of
nextToken
is a unique pagination token for each page of results returned. IfnextToken
is returned, there are more results available. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token returns anHTTP 400 InvalidToken
error.
- On failure, responds with
SdkError<ListComputeNodeGroupsError>
Source§impl Client
impl Client
Sourcepub fn list_queues(&self) -> ListQueuesFluentBuilder
pub fn list_queues(&self) -> ListQueuesFluentBuilder
Constructs a fluent builder for the ListQueues
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
cluster_identifier(impl Into<String>)
/set_cluster_identifier(Option<String>)
:
required: trueThe name or ID of the cluster to list queues for.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe value of
nextToken
is a unique pagination token for each page of results returned. IfnextToken
is returned, there are more results available. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token returns anHTTP 400 InvalidToken
error.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results that are returned per call. You can use
nextToken
to obtain further pages of results. The default is 10 results, and the maximum allowed page size is 100 results. A value of 0 uses the default.
- On success, responds with
ListQueuesOutput
with field(s):queues(Vec::<QueueSummary>)
:The list of queues associated with the cluster.
next_token(Option<String>)
:The value of
nextToken
is a unique pagination token for each page of results returned. IfnextToken
is returned, there are more results available. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token returns anHTTP 400 InvalidToken
error.
- On failure, responds with
SdkError<ListQueuesError>
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 resource for which to list tags.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap::<String, String>>)
:1 or more tags added to the resource. Each tag consists of a tag key and tag value. The tag value is optional and can be an empty string.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn register_compute_node_group_instance(
&self,
) -> RegisterComputeNodeGroupInstanceFluentBuilder
pub fn register_compute_node_group_instance( &self, ) -> RegisterComputeNodeGroupInstanceFluentBuilder
Constructs a fluent builder for the RegisterComputeNodeGroupInstance
operation.
- The fluent builder is configurable:
cluster_identifier(impl Into<String>)
/set_cluster_identifier(Option<String>)
:
required: trueThe name or ID of the cluster to register the compute node group instance in.
bootstrap_id(impl Into<String>)
/set_bootstrap_id(Option<String>)
:
required: trueThe client-generated token to allow for retries.
- On success, responds with
RegisterComputeNodeGroupInstanceOutput
with field(s):node_id(String)
:The scheduler node ID for this instance.
shared_secret(String)
:For the Slurm scheduler, this is the shared Munge key the scheduler uses to authenticate compute node group instances.
endpoints(Vec::<Endpoint>)
:The list of endpoints available for interaction with the scheduler.
- On failure, responds with
SdkError<RegisterComputeNodeGroupInstanceError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the resource.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: true1 or more tags added to the resource. Each tag consists of a tag key and tag value. The tag value is optional and can be an empty string.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the resource.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: true1 or more tag keys to remove from the resource. Specify only tag keys and not tag values.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_compute_node_group(&self) -> UpdateComputeNodeGroupFluentBuilder
pub fn update_compute_node_group(&self) -> UpdateComputeNodeGroupFluentBuilder
Constructs a fluent builder for the UpdateComputeNodeGroup
operation.
- The fluent builder is configurable:
cluster_identifier(impl Into<String>)
/set_cluster_identifier(Option<String>)
:
required: trueThe name or ID of the cluster of the compute node group.
compute_node_group_identifier(impl Into<String>)
/set_compute_node_group_identifier(Option<String>)
:
required: trueThe name or ID of the compute node group.
ami_id(impl Into<String>)
/set_ami_id(Option<String>)
:
required: falseThe ID of the Amazon Machine Image (AMI) that Amazon Web Services PCS uses to launch instances. If not provided, Amazon Web Services PCS uses the AMI ID specified in the custom launch template.
subnet_ids(impl Into<String>)
/set_subnet_ids(Option<Vec::<String>>)
:
required: falseThe list of subnet IDs where the compute node group provisions instances. The subnets must be in the same VPC as the cluster.
custom_launch_template(CustomLaunchTemplate)
/set_custom_launch_template(Option<CustomLaunchTemplate>)
:
required: falseAn Amazon EC2 launch template Amazon Web Services PCS uses to launch compute nodes.
purchase_option(PurchaseOption)
/set_purchase_option(Option<PurchaseOption>)
:
required: falseSpecifies how EC2 instances are purchased on your behalf. Amazon Web Services PCS supports On-Demand and Spot instances. For more information, see Instance purchasing options in the Amazon Elastic Compute Cloud User Guide. If you don’t provide this option, it defaults to On-Demand.
spot_options(SpotOptions)
/set_spot_options(Option<SpotOptions>)
:
required: falseAdditional configuration when you specify
SPOT
as thepurchaseOption
for theCreateComputeNodeGroup
API action.scaling_configuration(ScalingConfigurationRequest)
/set_scaling_configuration(Option<ScalingConfigurationRequest>)
:
required: falseSpecifies the boundaries of the compute node group auto scaling.
iam_instance_profile_arn(impl Into<String>)
/set_iam_instance_profile_arn(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM role when launching EC2 instances. The role contained in your instance profile must have the
pcs:RegisterComputeNodeGroupInstance
permission. The resource identifier of the ARN must start withAWSPCS
or it must have/aws-pcs/
in its path.Examples
-
arn:aws:iam::111122223333:instance-profile/AWSPCS-example-role-1
-
arn:aws:iam::111122223333:instance-profile/aws-pcs/example-role-2
-
slurm_configuration(UpdateComputeNodeGroupSlurmConfigurationRequest)
/set_slurm_configuration(Option<UpdateComputeNodeGroupSlurmConfigurationRequest>)
:
required: falseAdditional options related to the Slurm scheduler.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don’t specify a client token, the CLI and SDK automatically generate 1 for you.
- On success, responds with
UpdateComputeNodeGroupOutput
with field(s):compute_node_group(Option<ComputeNodeGroup>)
:A compute node group associated with a cluster.
- On failure, responds with
SdkError<UpdateComputeNodeGroupError>
Source§impl Client
impl Client
Sourcepub fn update_queue(&self) -> UpdateQueueFluentBuilder
pub fn update_queue(&self) -> UpdateQueueFluentBuilder
Constructs a fluent builder for the UpdateQueue
operation.
- The fluent builder is configurable:
cluster_identifier(impl Into<String>)
/set_cluster_identifier(Option<String>)
:
required: trueThe name or ID of the cluster of the queue.
queue_identifier(impl Into<String>)
/set_queue_identifier(Option<String>)
:
required: trueThe name or ID of the queue.
compute_node_group_configurations(ComputeNodeGroupConfiguration)
/set_compute_node_group_configurations(Option<Vec::<ComputeNodeGroupConfiguration>>)
:
required: falseThe list of compute node group configurations to associate with the queue. Queues assign jobs to associated compute node groups.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don’t specify a client token, the CLI and SDK automatically generate 1 for you.
- On success, responds with
UpdateQueueOutput
with field(s):queue(Option<Queue>)
:A queue resource.
- On failure, responds with
SdkError<UpdateQueueError>
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);