id stringlengths 22 133 | text stringlengths 40 40.2k | arch stringclasses 1
value | syntax stringclasses 1
value | kind stringclasses 4
values | repo stringclasses 27
values | path stringlengths 5 116 | license stringclasses 6
values | commit stringlengths 40 40 | source_host stringclasses 1
value | category stringclasses 16
values | source_url stringlengths 85 196 | line_start int64 1 4.28k | line_end int64 4 4.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:2 | let client = aws_sdk_dynamodb::Client::from_conf(aws_sdk_dynamodb::Config::new(&conf));
let resp = client
.list_tables()
.send()
.await
.expect_err("call should fail");
assert_eq!(
http_client.num_calls(),
3,
"client level timeouts should be retried"
)... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 55aa7275a4a080ca6c3b74b77d5f86d37dbb7720 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/55aa7275a4a080ca6c3b74b77d5f86d37dbb7720/sdk/dynamodb/tests/timeouts.rs | 41 | 90 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:3 | http_client.num_calls(),
1,
"operation level timeouts should not be retried"
);
assert!(
matches!(resp, SdkError::TimeoutError { .. }),
"expected a timeout error, got: {}",
resp
);
} | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 55aa7275a4a080ca6c3b74b77d5f86d37dbb7720 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/55aa7275a4a080ca6c3b74b77d5f86d37dbb7720/sdk/dynamodb/tests/timeouts.rs | 81 | 90 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use std::time::Duration;
use aws_credential_types::provider::SharedCredentialsProvider;
use aws_credential_types::Credentials;
use aws_sdk_dynamodb::error::SdkError;
use aws_smithy_async::rt::sleep::{As... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 2fcec800932fc3e127633fde6c64b3a5852d36e3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/dynamodb/tests/timeouts.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:2 | let client = aws_sdk_dynamodb::Client::from_conf(aws_sdk_dynamodb::Config::new(&conf));
let resp = client
.list_tables()
.send()
.await
.expect_err("call should fail");
assert_eq!(
conn.num_calls(),
3,
"client level timeouts should be retried"
);
a... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 2fcec800932fc3e127633fde6c64b3a5852d36e3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/dynamodb/tests/timeouts.rs | 41 | 90 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:3 | conn.num_calls(),
1,
"operation level timeouts should not be retried"
);
assert!(
matches!(resp, SdkError::TimeoutError { .. }),
"expected a timeout error, got: {}",
resp
);
} | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 2fcec800932fc3e127633fde6c64b3a5852d36e3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/2fcec800932fc3e127633fde6c64b3a5852d36e3/sdk/dynamodb/tests/timeouts.rs | 81 | 90 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use std::sync::Arc;
use std::time::Duration;
use aws_credential_types::provider::SharedCredentialsProvider;
use aws_credential_types::Credentials;
use aws_sdk_dynamodb::error::SdkError;
use aws_smithy_a... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 52ab27a0991e627156812551ae09de47c168b423 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/52ab27a0991e627156812551ae09de47c168b423/sdk/dynamodb/tests/timeouts.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:2 | .build();
let client = aws_sdk_dynamodb::Client::from_conf(aws_sdk_dynamodb::Config::new(&conf));
let resp = client
.list_tables()
.send()
.await
.expect_err("call should fail");
assert_eq!(
conn.num_calls(),
3,
"client level timeouts should be retried... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 52ab27a0991e627156812551ae09de47c168b423 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/52ab27a0991e627156812551ae09de47c168b423/sdk/dynamodb/tests/timeouts.rs | 41 | 91 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:3 | assert_eq!(
conn.num_calls(),
1,
"operation level timeouts should not be retried"
);
assert!(
matches!(resp, SdkError::TimeoutError { .. }),
"expected a timeout error, got: {}",
resp
);
} | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 52ab27a0991e627156812551ae09de47c168b423 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/52ab27a0991e627156812551ae09de47c168b423/sdk/dynamodb/tests/timeouts.rs | 81 | 91 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use std::sync::Arc;
use std::time::Duration;
use aws_credential_types::provider::SharedCredentialsProvider;
use aws_credential_types::Credentials;
use aws_sdk_dynamodb::types::SdkError;
use aws_smithy_a... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | a57ff42a5cbf03f33c78811884e87936b7c34859 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/a57ff42a5cbf03f33c78811884e87936b7c34859/sdk/dynamodb/tests/timeouts.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use std::sync::Arc;
use std::time::Duration;
use aws_credential_types::Credentials;
use aws_sdk_dynamodb::types::SdkError;
use aws_smithy_async::rt::sleep::{AsyncSleep, Sleep};
use aws_smithy_client::ne... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 7a5c01384423cf63d4002aff9e3f02ab4357db95 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/7a5c01384423cf63d4002aff9e3f02ab4357db95/sdk/dynamodb/tests/timeouts.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:2 | let client = aws_sdk_dynamodb::Client::from_conf(aws_sdk_dynamodb::Config::new(&conf));
let resp = client
.list_tables()
.send()
.await
.expect_err("call should fail");
assert_eq!(
conn.num_calls(),
3,
"client level timeouts should be retried"
);
a... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 7a5c01384423cf63d4002aff9e3f02ab4357db95 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/7a5c01384423cf63d4002aff9e3f02ab4357db95/sdk/dynamodb/tests/timeouts.rs | 41 | 90 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use std::sync::Arc;
use std::time::Duration;
use aws_credential_types::provider::SharedCredentialsProvider;
use aws_credential_types::Credentials;
use aws_sdk_dynamodb::types::SdkError;
use aws_smithy_a... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 252473172ce9bd8b1c0e280cc125530ffc212c44 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/252473172ce9bd8b1c0e280cc125530ffc212c44/sdk/dynamodb/tests/timeouts.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:2 | .retry_config(RetryConfig::standard())
.sleep_impl(Arc::new(InstantSleep))
.build();
let client = aws_sdk_dynamodb::Client::from_conf(aws_sdk_dynamodb::Config::new(&conf));
let resp = client
.list_tables()
.send()
.await
.expect_err("call should fail");
assert... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 252473172ce9bd8b1c0e280cc125530ffc212c44 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/252473172ce9bd8b1c0e280cc125530ffc212c44/sdk/dynamodb/tests/timeouts.rs | 41 | 95 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:3 | .list_tables()
.send()
.await
.expect_err("call should fail");
assert_eq!(
conn.num_calls(),
1,
"operation level timeouts should not be retried"
);
assert!(
matches!(resp, SdkError::TimeoutError { .. }),
"expected a timeout error, got: {}",
... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 252473172ce9bd8b1c0e280cc125530ffc212c44 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/252473172ce9bd8b1c0e280cc125530ffc212c44/sdk/dynamodb/tests/timeouts.rs | 81 | 95 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use std::sync::Arc;
use std::time::Duration;
use aws_sdk_dynamodb::types::SdkError;
use aws_smithy_async::rt::sleep::{AsyncSleep, Sleep};
use aws_smithy_client::never::NeverConnector;
use aws_smithy_typ... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 77a600931b61b1989b46c163297f41975cd65db6 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/77a600931b61b1989b46c163297f41975cd65db6/sdk/dynamodb/tests/timeouts.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:2 | .sleep_impl(Arc::new(InstantSleep))
.build();
let client = aws_sdk_dynamodb::Client::from_conf(aws_sdk_dynamodb::Config::new(&conf));
let resp = client
.list_tables()
.send()
.await
.expect_err("call should fail");
assert_eq!(
conn.num_calls(),
3,
... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 77a600931b61b1989b46c163297f41975cd65db6 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/77a600931b61b1989b46c163297f41975cd65db6/sdk/dynamodb/tests/timeouts.rs | 41 | 94 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:3 | .send()
.await
.expect_err("call should fail");
assert_eq!(
conn.num_calls(),
1,
"operation level timeouts should not be retried"
);
assert!(
matches!(resp, SdkError::TimeoutError { .. }),
"expected a timeout error, got: {}",
resp
);
} | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 77a600931b61b1989b46c163297f41975cd65db6 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/77a600931b61b1989b46c163297f41975cd65db6/sdk/dynamodb/tests/timeouts.rs | 81 | 94 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use aws_sdk_dynamodb::types::SdkError;
use aws_smithy_async::rt::sleep::{AsyncSleep, Sleep};
use aws_smithy_client::never::NeverConnector;
use aws_smithy_types::retry::RetryConfig;
use aws_smithy_types::... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 9407b2314c6568f5e73be6951cba668511d366d5 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/9407b2314c6568f5e73be6951cba668511d366d5/sdk/dynamodb/tests/timeouts.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:2 | let client = aws_sdk_dynamodb::Client::from_conf_conn(
aws_sdk_dynamodb::Config::new(&conf),
conn.clone(),
);
let resp = client
.list_tables()
.send()
.await
.expect_err("call should fail");
assert_eq!(
conn.num_calls(),
3,
"client leve... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 9407b2314c6568f5e73be6951cba668511d366d5 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/9407b2314c6568f5e73be6951cba668511d366d5/sdk/dynamodb/tests/timeouts.rs | 41 | 97 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:3 | );
let resp = client
.list_tables()
.send()
.await
.expect_err("call should fail");
assert_eq!(
conn.num_calls(),
1,
"operation level timeouts should not be retried"
);
assert!(
matches!(resp, SdkError::TimeoutError { .. }),
"expect... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 9407b2314c6568f5e73be6951cba668511d366d5 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/9407b2314c6568f5e73be6951cba668511d366d5/sdk/dynamodb/tests/timeouts.rs | 81 | 97 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use aws_sdk_dynamodb::types::SdkError;
use aws_smithy_async::rt::sleep::{AsyncSleep, Sleep};
use aws_smithy_client::never::NeverConnector;
use aws_smithy_types::retry::RetryConfig;
use aws_smithy_types::... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 7f9cfeccad54627973c04554ca91de9529639c8a | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/7f9cfeccad54627973c04554ca91de9529639c8a/sdk/dynamodb/tests/timeouts.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:2 | let client = aws_sdk_dynamodb::Client::from_conf_conn(
aws_sdk_dynamodb::Config::new(&conf),
conn.clone(),
);
let resp = client
.list_tables()
.send()
.await
.expect_err("call should fail");
assert_eq!(
conn.num_calls(),
3,
"client leve... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 7f9cfeccad54627973c04554ca91de9529639c8a | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/7f9cfeccad54627973c04554ca91de9529639c8a/sdk/dynamodb/tests/timeouts.rs | 41 | 96 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:3 | let resp = client
.list_tables()
.send()
.await
.expect_err("call should fail");
assert_eq!(
conn.num_calls(),
1,
"operation level timeouts should not be retried"
);
assert!(
matches!(resp, SdkError::TimeoutError { .. }),
"expected a ti... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | 7f9cfeccad54627973c04554ca91de9529639c8a | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/7f9cfeccad54627973c04554ca91de9529639c8a/sdk/dynamodb/tests/timeouts.rs | 81 | 96 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use aws_sdk_dynamodb::types::SdkError;
use aws_smithy_async::rt::sleep::{AsyncSleep, Sleep};
use aws_smithy_client::never::NeverConnector;
use aws_smithy_types::timeout;
use aws_smithy_types::timeout::Ap... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | b1dba4341175aa51f71c7a7ed3c2eae3f8c6ffb1 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b1dba4341175aa51f71c7a7ed3c2eae3f8c6ffb1/sdk/dynamodb/tests/timeouts.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:2 | conn.clone(),
);
let resp = client
.list_tables()
.send()
.await
.expect_err("call should fail");
assert_eq!(
conn.num_calls(),
3,
"client level timeouts should be retried"
);
assert!(
matches!(resp, SdkError::TimeoutError { .. }),
... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | b1dba4341175aa51f71c7a7ed3c2eae3f8c6ffb1 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b1dba4341175aa51f71c7a7ed3c2eae3f8c6ffb1/sdk/dynamodb/tests/timeouts.rs | 41 | 93 |
awslabs/aws-sdk-rust:sdk/dynamodb/tests/timeouts.rs:3 | .await
.expect_err("call should fail");
assert_eq!(
conn.num_calls(),
1,
"operation level timeouts should not be retried"
);
assert!(
matches!(resp, SdkError::TimeoutError { .. }),
"expected a timeout error, got: {}",
resp
);
} | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/dynamodb/tests/timeouts.rs | Apache-2.0 | b1dba4341175aa51f71c7a7ed3c2eae3f8c6ffb1 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/b1dba4341175aa51f71c7a7ed3c2eae3f8c6ffb1/sdk/dynamodb/tests/timeouts.rs | 81 | 93 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use aws_runtime::user_agent::test_util::assert_ua_contains_metric_values;
use aws_sdk_ec2::{config::Credentials, config::Region, types::InstanceType, Client, Config};
use aws_smithy_http_client::test_uti... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 5e17b3723799bff475dc95cdcca40c9d54602f18 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/5e17b3723799bff475dc95cdcca40c9d54602f18/sdk/ec2/tests/paginators.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:2 | .body(SdkBody::from(response))
.unwrap();
let (http_client, captured_request) = capture_request(Some(response));
let client = Client::from_conf(stub_config(http_client.clone()));
let instance_type = InstanceType::from("g5.48xlarge");
let mut paginator = client
.describe_spot_price_histor... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 5e17b3723799bff475dc95cdcca40c9d54602f18 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/5e17b3723799bff475dc95cdcca40c9d54602f18/sdk/ec2/tests/paginators.rs | 41 | 100 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:3 | .instance_types(instance_type)
.product_descriptions("Linux/UNIX")
.availability_zone("eu-north-1a")
.into_paginator()
.items()
.send();
let first_item = paginator.try_next().await.expect("success");
assert_eq!(first_item, None);
let req = captured_request.expect_requ... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 5e17b3723799bff475dc95cdcca40c9d54602f18 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/5e17b3723799bff475dc95cdcca40c9d54602f18/sdk/ec2/tests/paginators.rs | 81 | 113 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use aws_runtime::user_agent::test_util::assert_ua_contains_metric_values;
use aws_sdk_ec2::{config::Credentials, config::Region, types::InstanceType, Client, Config};
use aws_smithy_runtime::client::http... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 55f49b60e18f9eb3ecb912ebeb1d3f0d806e7710 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/55f49b60e18f9eb3ecb912ebeb1d3f0d806e7710/sdk/ec2/tests/paginators.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:2 | .body(SdkBody::from(response))
.unwrap();
let (http_client, captured_request) = capture_request(Some(response));
let client = Client::from_conf(stub_config(http_client.clone()));
let instance_type = InstanceType::from("g5.48xlarge");
let mut paginator = client
.describe_spot_price_histor... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 55f49b60e18f9eb3ecb912ebeb1d3f0d806e7710 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/55f49b60e18f9eb3ecb912ebeb1d3f0d806e7710/sdk/ec2/tests/paginators.rs | 41 | 100 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use aws_runtime::user_agent::test_util::assert_ua_contains_metric_values;
use aws_sdk_ec2::{config::Credentials, config::Region, types::InstanceType, Client, Config};
use aws_smithy_runtime::client::http... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | cc3a60616253c55cb5456de7a91d5e04eee7c36c | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/cc3a60616253c55cb5456de7a91d5e04eee7c36c/sdk/ec2/tests/paginators.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use aws_runtime::user_agent::test_util::assert_ua_contains_metric_values;
use aws_sdk_ec2::{config::Credentials, config::Region, types::InstanceType, Client, Config};
use aws_smithy_runtime::client::http... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 2fbc81c501821fc06c432f23d1f320ebbf96e34a | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/2fbc81c501821fc06c432f23d1f320ebbf96e34a/sdk/ec2/tests/paginators.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:2 | .body(SdkBody::from(response))
.unwrap(),
)]);
let client = Client::from_conf(stub_config(http_client.clone()));
let instance_type = InstanceType::from("g5.48xlarge");
let mut paginator = client
.describe_spot_price_history()
.instance_types(instance_type)
.product_de... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 2fbc81c501821fc06c432f23d1f320ebbf96e34a | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/2fbc81c501821fc06c432f23d1f320ebbf96e34a/sdk/ec2/tests/paginators.rs | 41 | 100 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:3 | let instance_type = InstanceType::from("g5.48xlarge");
let mut paginator = client
.describe_spot_price_history()
.instance_types(instance_type)
.product_descriptions("Linux/UNIX")
.availability_zone("eu-north-1a")
.into_paginator()
.items()
.send();
let fi... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 2fbc81c501821fc06c432f23d1f320ebbf96e34a | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/2fbc81c501821fc06c432f23d1f320ebbf96e34a/sdk/ec2/tests/paginators.rs | 81 | 113 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use aws_sdk_ec2::{config::Credentials, config::Region, types::InstanceType, Client, Config};
use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient};
use aws_smithy_runtime_api... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/ec2/tests/paginators.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:2 | let client = Client::from_conf(stub_config(http_client.clone()));
let instance_type = InstanceType::from("g5.48xlarge");
let mut paginator = client
.describe_spot_price_history()
.instance_types(instance_type)
.product_descriptions("Linux/UNIX")
.availability_zone("eu-north-1a")
... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/ec2/tests/paginators.rs | 41 | 90 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:3 | .instance_types(instance_type)
.product_descriptions("Linux/UNIX")
.availability_zone("eu-north-1a")
.into_paginator()
.items()
.send();
let first_item = paginator.try_next().await.expect("success");
assert_eq!(first_item, None);
http_client.assert_requests_match(&[])... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 882646f33ed8ca91a1541be0bcbd390545f04a99 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/882646f33ed8ca91a1541be0bcbd390545f04a99/sdk/ec2/tests/paginators.rs | 81 | 90 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use aws_sdk_ec2::{config::Credentials, config::Region, types::InstanceType, Client, Config};
use aws_smithy_http::body::SdkBody;
use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticRepla... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 55aa7275a4a080ca6c3b74b77d5f86d37dbb7720 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/55aa7275a4a080ca6c3b74b77d5f86d37dbb7720/sdk/ec2/tests/paginators.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use tokio_stream::StreamExt;
use aws_sdk_ec2::{config::Credentials, config::Region, types::InstanceType, Client, Config};
use aws_smithy_client::http_connector::HttpConnector;
use aws_smithy_client::tes... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 52ab27a0991e627156812551ae09de47c168b423 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/52ab27a0991e627156812551ae09de47c168b423/sdk/ec2/tests/paginators.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:2 | )]);
let client = Client::from_conf(stub_config(conn.clone()));
let instance_type = InstanceType::from("g5.48xlarge");
let mut paginator = client
.describe_spot_price_history()
.instance_types(instance_type)
.product_descriptions("Linux/UNIX")
.availability_zone("eu-north-1a"... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 52ab27a0991e627156812551ae09de47c168b423 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/52ab27a0991e627156812551ae09de47c168b423/sdk/ec2/tests/paginators.rs | 41 | 91 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:3 | .describe_spot_price_history()
.instance_types(instance_type)
.product_descriptions("Linux/UNIX")
.availability_zone("eu-north-1a")
.into_paginator()
.items()
.send();
let first_item = paginator.try_next().await.expect("success");
assert_eq!(first_item, None);
... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 52ab27a0991e627156812551ae09de47c168b423 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/52ab27a0991e627156812551ae09de47c168b423/sdk/ec2/tests/paginators.rs | 81 | 91 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use tokio_stream::StreamExt;
use aws_sdk_ec2::{model::InstanceType, Client, Config, Credentials, Region};
use aws_smithy_client::http_connector::HttpConnector;
use aws_smithy_client::test_connection::Te... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 15b6f9e6b678dae29f37fe78a4df142a3cfe7607 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/15b6f9e6b678dae29f37fe78a4df142a3cfe7607/sdk/ec2/tests/paginators.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use tokio_stream::StreamExt;
use aws_sdk_ec2::{model::InstanceType, Client, Config, Credentials, Region};
use aws_smithy_client::http_connector::HttpConnector;
use aws_smithy_client::test_connection::Te... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 77a600931b61b1989b46c163297f41975cd65db6 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/77a600931b61b1989b46c163297f41975cd65db6/sdk/ec2/tests/paginators.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use aws_sdk_ec2::{model::InstanceType, Client, Config, Credentials, Region};
use aws_smithy_client::test_connection::TestConnection;
use tokio_stream::StreamExt;
fn stub_config() -> Config {
Config:... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 8159cb8ff570e4dca718e354c31cecdfadfeb0b8 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/8159cb8ff570e4dca718e354c31cecdfadfeb0b8/sdk/ec2/tests/paginators.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:2 | let mut paginator = client
.describe_spot_price_history()
.instance_types(instance_type)
.product_descriptions("Linux/UNIX")
.availability_zone("eu-north-1a")
.into_paginator()
.items()
.send();
let first_item = paginator.try_next().await.expect("success");
... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 8159cb8ff570e4dca718e354c31cecdfadfeb0b8 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/8159cb8ff570e4dca718e354c31cecdfadfeb0b8/sdk/ec2/tests/paginators.rs | 41 | 88 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use aws_sdk_ec2::{model::InstanceType, Client, Config, Credentials, Region};
use aws_smithy_client::test_connection::TestConnection;
use tokio_stream::StreamExt;
fn stub_config() -> Config {
Config... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | 4eec86cdc92852db788236fb25e990422bed6d6a | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/4eec86cdc92852db788236fb25e990422bed6d6a/sdk/ec2/tests/paginators.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/ec2/tests/paginators.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use aws_sdk_ec2::{model::InstanceType, Client, Config, Credentials, Region};
use aws_smithy_client::test_connection::TestConnection;
use tokio_stream::StreamExt;
fn stub_config() -> Config {
Config... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/paginators.rs | Apache-2.0 | f2b4361b004ee822960ea9791f566fd4eb6d1aba | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/f2b4361b004ee822960ea9791f566fd4eb6d1aba/sdk/ec2/tests/paginators.rs | 1 | 52 |
awslabs/aws-sdk-rust:sdk/ec2/tests/waiters.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use aws_runtime::user_agent::test_util::assert_ua_contains_metric_values;
use aws_sdk_ec2::{client::Waiters, config::Region, error::DisplayErrorContext, Client};
use aws_smithy_async::test_util::tick_adv... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/waiters.rs | Apache-2.0 | 5e17b3723799bff475dc95cdcca40c9d54602f18 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/5e17b3723799bff475dc95cdcca40c9d54602f18/sdk/ec2/tests/waiters.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/ec2/tests/waiters.rs:2 | .await
.unwrap();
let waiter_task = tokio::spawn(
ec2.wait_until_instance_status_ok()
.instance_ids("i-09fb4224219ac6902")
.wait(Duration::from_secs(300)),
);
// The responses in the test data will make the waiter poll a few times, so it will take some time
// t... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/waiters.rs | Apache-2.0 | 5e17b3723799bff475dc95cdcca40c9d54602f18 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/5e17b3723799bff475dc95cdcca40c9d54602f18/sdk/ec2/tests/waiters.rs | 41 | 100 |
awslabs/aws-sdk-rust:sdk/ec2/tests/waiters.rs:3 | assert_eq!(30, context.max_wait().as_secs());
assert_eq!(30, context.elapsed().as_secs());
assert_eq!(3, context.poll_count());
}
err => panic!("unexpected error: {}", DisplayErrorContext(&err)),
}
}
#[tokio::test]
async fn should_emit_business_metric_for_waiter_in_user_agen... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/waiters.rs | Apache-2.0 | 5e17b3723799bff475dc95cdcca40c9d54602f18 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/5e17b3723799bff475dc95cdcca40c9d54602f18/sdk/ec2/tests/waiters.rs | 81 | 125 |
awslabs/aws-sdk-rust:sdk/ec2/tests/waiters.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use aws_runtime::user_agent::test_util::assert_ua_contains_metric_values;
use aws_sdk_ec2::{client::Waiters, config::Region, error::DisplayErrorContext, Client};
use aws_smithy_async::test_util::tick_adv... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/waiters.rs | Apache-2.0 | 2fbc81c501821fc06c432f23d1f320ebbf96e34a | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/2fbc81c501821fc06c432f23d1f320ebbf96e34a/sdk/ec2/tests/waiters.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/ec2/tests/waiters.rs:2 | .send()
.await
.unwrap();
let waiter_task = tokio::spawn(
ec2.wait_until_instance_status_ok()
.instance_ids("i-09fb4224219ac6902")
.wait(Duration::from_secs(300)),
);
// The responses in the test data will make the waiter poll a few times, so it will take so... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/waiters.rs | Apache-2.0 | 2fbc81c501821fc06c432f23d1f320ebbf96e34a | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/2fbc81c501821fc06c432f23d1f320ebbf96e34a/sdk/ec2/tests/waiters.rs | 41 | 100 |
awslabs/aws-sdk-rust:sdk/ec2/tests/waiters.rs:3 | WaiterError::ExceededMaxWait(context) => {
assert_eq!(30, context.max_wait().as_secs());
assert_eq!(30, context.elapsed().as_secs());
assert_eq!(3, context.poll_count());
}
err => panic!("unexpected error: {}", DisplayErrorContext(&err)),
}
}
#[tokio::test]
async... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/waiters.rs | Apache-2.0 | 2fbc81c501821fc06c432f23d1f320ebbf96e34a | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/2fbc81c501821fc06c432f23d1f320ebbf96e34a/sdk/ec2/tests/waiters.rs | 81 | 126 |
awslabs/aws-sdk-rust:sdk/ec2/tests/waiters.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use aws_sdk_ec2::{client::Waiters, config::Region, error::DisplayErrorContext, Client};
use aws_smithy_async::test_util::tick_advance_sleep::{
tick_advance_time_and_sleep, TickAdvanceTime,
};
use aws... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/waiters.rs | Apache-2.0 | ae6d739d57f5c7127a9e57d5010b595c00c3208d | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/ae6d739d57f5c7127a9e57d5010b595c00c3208d/sdk/ec2/tests/waiters.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/ec2/tests/waiters.rs:2 | .await
.unwrap();
let waiter_task = tokio::spawn(
ec2.wait_until_instance_status_ok()
.instance_ids("i-09fb4224219ac6902")
.wait(Duration::from_secs(300)),
);
// The responses in the test data will make the waiter poll a few times, so it will take some time
// t... | rust | rust | testsuite | awslabs/aws-sdk-rust | sdk/ec2/tests/waiters.rs | Apache-2.0 | ae6d739d57f5c7127a9e57d5010b595c00c3208d | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/ae6d739d57f5c7127a9e57d5010b595c00c3208d/sdk/ec2/tests/waiters.rs | 41 | 87 |
awslabs/aws-sdk-rust:sdk/examples/apigateway/src/bin/get_rest_apis.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use aws_config::meta::region::RegionProviderChain;
use aws_sdk_apigateway::{Client, Error, Region, PKG_VERSION};
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The AWS Regio... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/apigateway/src/bin/get_rest_apis.rs | Apache-2.0 | d029624f25715f2083b504eeba04fb83caa3962b | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/d029624f25715f2083b504eeba04fb83caa3962b/sdk/examples/apigateway/src/bin/get_rest_apis.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/apigateway/src/bin/get_rest_apis.rs:2 | /// * `[-r REGION]` - The Region in which the client is created.
/// If not supplied, uses the value of the **AWS_REGION** environment variable.
/// If the environment variable is not set, defaults to **us-west-2**.
/// * `[-v]` - Whether to display information.
#[tokio::main]
async fn main() -> Result<(), Error> {... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/apigateway/src/bin/get_rest_apis.rs | Apache-2.0 | d029624f25715f2083b504eeba04fb83caa3962b | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/d029624f25715f2083b504eeba04fb83caa3962b/sdk/examples/apigateway/src/bin/get_rest_apis.rs | 41 | 69 |
awslabs/aws-sdk-rust:sdk/examples/apigateway/src/bin/get_rest_apis.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use aws_config::meta::region::RegionProviderChain;
use aws_sdk_apigateway::{Client, Error, Region, PKG_VERSION};
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The AWS Regio... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/apigateway/src/bin/get_rest_apis.rs | Apache-2.0 | acfa8b17206870802e0074a0869147cada5550b5 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/acfa8b17206870802e0074a0869147cada5550b5/sdk/examples/apigateway/src/bin/get_rest_apis.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/apigateway/src/bin/get_rest_apis.rs:2 | }
/// Displays information about the Amazon API Gateway REST APIs in the Region.
///
/// # Arguments
///
/// * `[-r REGION]` - The Region in which the client is created.
/// If not supplied, uses the value of the **AWS_REGION** environment variable.
/// If the environment variable is not set, defaults to **us-west... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/apigateway/src/bin/get_rest_apis.rs | Apache-2.0 | acfa8b17206870802e0074a0869147cada5550b5 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/acfa8b17206870802e0074a0869147cada5550b5/sdk/examples/apigateway/src/bin/get_rest_apis.rs | 41 | 75 |
awslabs/aws-sdk-rust:sdk/examples/apigateway/src/bin/get_rest_apis.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use aws_config::meta::region::RegionProviderChain;
use aws_sdk_apigateway::{Client, Error, Region, PKG_VERSION};
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The AWS Regio... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/apigateway/src/bin/get_rest_apis.rs | Apache-2.0 | e80f07446df510d85f2d499860b730929c5d5a94 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/e80f07446df510d85f2d499860b730929c5d5a94/sdk/examples/apigateway/src/bin/get_rest_apis.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/apigateway/src/bin/get_rest_apis.rs:2 | println!(
"Region: {}",
region_provider.region().await.unwrap().as_ref()
);
println!();
}
let shared_config = aws_config::from_env().region(region_provider).load().await;
let client = Client::new(&shared_config);
let resp = client.get_rest_ap... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/apigateway/src/bin/get_rest_apis.rs | Apache-2.0 | e80f07446df510d85f2d499860b730929c5d5a94 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/e80f07446df510d85f2d499860b730929c5d5a94/sdk/examples/apigateway/src/bin/get_rest_apis.rs | 41 | 70 |
awslabs/aws-sdk-rust:sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use aws_config::meta::region::RegionProviderChain;
use aws_sdk_applicationautoscaling::model::ServiceNamespace;
use aws_sdk_applicationautoscaling::{Client, Error, Region, PKG_VERSION};
use structopt::S... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs | Apache-2.0 | acfa8b17206870802e0074a0869147cada5550b5 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/acfa8b17206870802e0074a0869147cada5550b5/sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs:2 | /// # Arguments
///
/// * `[-r REGION]` - The region containing the buckets.
/// If not supplied, uses the value of the **AWS_DEFAULT_REGION** environment variable.
/// If the environment variable is not set, defaults to **us-west-2**.
/// * `[-v]` - Whether to display additional information.
#[tokio::main]
async f... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs | Apache-2.0 | acfa8b17206870802e0074a0869147cada5550b5 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/acfa8b17206870802e0074a0869147cada5550b5/sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs | 41 | 70 |
awslabs/aws-sdk-rust:sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use applicationautoscaling::model::ServiceNamespace;
use applicationautoscaling::{Client, Error, Region};
use aws_config::meta::region::RegionProviderChain;
use structopt::StructOpt;
#[derive(Debug, St... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs | Apache-2.0 | 74cd8a14231e1a005a2f554b072fc9782def5519 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/74cd8a14231e1a005a2f554b072fc9782def5519/sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs:2 | println!(
"Application Auto Scaling client version: {}",
applicationautoscaling::PKG_VERSION
);
println!(
"Region: {:?}",
shared_config.region().unwrap()
);
println!();
}
let client = Client::new(&s... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs | Apache-2.0 | 74cd8a14231e1a005a2f554b072fc9782def5519 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/74cd8a14231e1a005a2f554b072fc9782def5519/sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs | 41 | 68 |
awslabs/aws-sdk-rust:sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use applicationautoscaling::model::ServiceNamespace;
use applicationautoscaling::{Client, Config, Error, Region};
use aws_types::region::{self, ProvideRegion};
use structopt::StructOpt;
#[derive(Debug,... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs | Apache-2.0 | d61aa9575151b9e9ac88810e65d5481860d8a552 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/d61aa9575151b9e9ac88810e65d5481860d8a552/sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs:2 | "Application Auto Scaling client version: {}",
applicationautoscaling::PKG_VERSION
);
println!(
"Region: {:?}",
region_provider.region()
);
println!();
}
let config = Config::builder().region(region_provider).b... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs | Apache-2.0 | d61aa9575151b9e9ac88810e65d5481860d8a552 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/d61aa9575151b9e9ac88810e65d5481860d8a552/sdk/examples/applicationautoscaling/src/bin/describe-scaling-policies.rs | 41 | 68 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use aws_config::meta::region::RegionProviderChain;
use aws_sdk_autoscaling::{Client, Error, Region, PKG_VERSION};
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The name of ... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs | Apache-2.0 | acfa8b17206870802e0074a0869147cada5550b5 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/acfa8b17206870802e0074a0869147cada5550b5/sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs:2 | Ok(())
}
/// Creates an Auto Scaling group in the Region.
/// # Arguments
///
/// * `-a AUTOSCALING-NAME` - The name of the Auto Scaling group.
/// * `-i INSTANCE-ID` - The ID of the EC2 instance to add to the Auto Scaling group.
/// * `[-r REGION]` - The Region in which the client is created.
/// If not supplied, ... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs | Apache-2.0 | acfa8b17206870802e0074a0869147cada5550b5 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/acfa8b17206870802e0074a0869147cada5550b5/sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs | 41 | 86 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use autoscaling::{Client, Error, Region, PKG_VERSION};
use aws_config::meta::region::RegionProviderChain;
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The name of the Auto... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs | Apache-2.0 | 74cd8a14231e1a005a2f554b072fc9782def5519 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/74cd8a14231e1a005a2f554b072fc9782def5519/sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs:2 | let Opt {
autoscaling_name,
instance_id,
region,
verbose,
} = Opt::from_args();
let region_provider = RegionProviderChain::first_try(region.map(Region::new))
.or_default_provider()
.or_else(Region::new("us-west-2"));
let shared_config = aws_config::from_env()... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs | Apache-2.0 | 74cd8a14231e1a005a2f554b072fc9782def5519 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/74cd8a14231e1a005a2f554b072fc9782def5519/sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs | 41 | 80 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use autoscaling::{Client, Config, Error, Region, PKG_VERSION};
use aws_types::region::{self, ProvideRegion};
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The name of the A... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs | Apache-2.0 | d61aa9575151b9e9ac88810e65d5481860d8a552 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/d61aa9575151b9e9ac88810e65d5481860d8a552/sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs:2 | let Opt {
autoscaling_name,
instance_id,
region,
verbose,
} = Opt::from_args();
let region_provider = region::ChainProvider::first_try(region.map(Region::new))
.or_default_provider()
.or_else(Region::new("us-west-2"));
println!();
if verbose {
p... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs | Apache-2.0 | d61aa9575151b9e9ac88810e65d5481860d8a552 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/d61aa9575151b9e9ac88810e65d5481860d8a552/sdk/examples/autoscaling/src/bin/create-autoscaling-group.rs | 41 | 77 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use aws_config::meta::region::RegionProviderChain;
use aws_sdk_autoscaling::{Client, Error, Region, PKG_VERSION};
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The name of ... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs | Apache-2.0 | acfa8b17206870802e0074a0869147cada5550b5 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/acfa8b17206870802e0074a0869147cada5550b5/sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs:2 | }
/// Updates an Auto Scaling group in the Region to the specified maximum size.
/// # Arguments
///
/// * `-a AUTOSCALING-NAME` - The name of the Auto Scaling group.
/// * - [-f] - Whether to force the deletion.
/// * `[-r REGION]` - The Region in which the client is created.
/// If not supplied, uses the value of... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs | Apache-2.0 | acfa8b17206870802e0074a0869147cada5550b5 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/acfa8b17206870802e0074a0869147cada5550b5/sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs | 41 | 85 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use autoscaling::{Client, Error, Region, PKG_VERSION};
use aws_config::meta::region::RegionProviderChain;
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The name of the Auto... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs | Apache-2.0 | 74cd8a14231e1a005a2f554b072fc9782def5519 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/74cd8a14231e1a005a2f554b072fc9782def5519/sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs:2 | let Opt {
autoscaling_name,
force,
region,
verbose,
} = Opt::from_args();
let region_provider = RegionProviderChain::first_try(region.map(Region::new))
.or_default_provider()
.or_else(Region::new("us-west-2"));
let shared_config = aws_config::from_env().regio... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs | Apache-2.0 | 74cd8a14231e1a005a2f554b072fc9782def5519 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/74cd8a14231e1a005a2f554b072fc9782def5519/sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs | 41 | 78 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use autoscaling::{Client, Config, Error, Region, PKG_VERSION};
use aws_types::region::{self, ProvideRegion};
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The name of the A... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs | Apache-2.0 | d61aa9575151b9e9ac88810e65d5481860d8a552 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/d61aa9575151b9e9ac88810e65d5481860d8a552/sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs:2 | let Opt {
autoscaling_name,
force,
region,
verbose,
} = Opt::from_args();
let region_provider = region::ChainProvider::first_try(region.map(Region::new))
.or_default_provider()
.or_else(Region::new("us-west-2"));
println!();
if verbose {
println... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs | Apache-2.0 | d61aa9575151b9e9ac88810e65d5481860d8a552 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/d61aa9575151b9e9ac88810e65d5481860d8a552/sdk/examples/autoscaling/src/bin/delete-autoscaling-group.rs | 41 | 75 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use aws_config::meta::region::RegionProviderChain;
use aws_sdk_autoscaling::{Client, Error, Region, PKG_VERSION};
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The AWS Regi... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs | Apache-2.0 | acfa8b17206870802e0074a0869147cada5550b5 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/acfa8b17206870802e0074a0869147cada5550b5/sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs:2 | }
println!("Found {} group(s)", groups.len());
Ok(())
}
/// Lists your Amazon EC2 Auto Scaling groups in the Region.
/// # Arguments
///
/// * `[-r REGION]` - The Region in which the client is created.
/// If not supplied, uses the value of the **AWS_REGION** environment variable.
/// If the environmen... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs | Apache-2.0 | acfa8b17206870802e0074a0869147cada5550b5 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/acfa8b17206870802e0074a0869147cada5550b5/sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs | 41 | 80 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use autoscaling::{Client, Error, Region, PKG_VERSION};
use aws_config::meta::region::RegionProviderChain;
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The AWS Region.
... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs | Apache-2.0 | 74cd8a14231e1a005a2f554b072fc9782def5519 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/74cd8a14231e1a005a2f554b072fc9782def5519/sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs:2 | if verbose {
println!("AutoScaling version: {}", PKG_VERSION);
println!("Region: {:?}", shared_config.region().unwrap());
println!();
}
let client = Client::new(&shared_config);
let resp = client.describe_auto_scaling_groups().send().await?;
println!("Groups:");
... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs | Apache-2.0 | 74cd8a14231e1a005a2f554b072fc9782def5519 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/74cd8a14231e1a005a2f554b072fc9782def5519/sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs | 41 | 71 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use autoscaling::{Client, Config, Error, Region, PKG_VERSION};
use aws_types::region::{self, ProvideRegion};
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The AWS Region.
... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs | Apache-2.0 | d61aa9575151b9e9ac88810e65d5481860d8a552 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/d61aa9575151b9e9ac88810e65d5481860d8a552/sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs:2 | println!("AutoScaling version: {}", PKG_VERSION);
println!("Region: {:?}", region_provider.region());
println!();
}
let conf = Config::builder().region(region_provider).build();
let client = Client::from_conf(conf);
let resp = client.describe_auto_scaling_groups().send().a... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs | Apache-2.0 | d61aa9575151b9e9ac88810e65d5481860d8a552 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/d61aa9575151b9e9ac88810e65d5481860d8a552/sdk/examples/autoscaling/src/bin/list-autoscaling-groups.rs | 41 | 71 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use aws_config::meta::region::RegionProviderChain;
use aws_sdk_autoscaling::{Client, Error, Region, PKG_VERSION};
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The name of ... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs | Apache-2.0 | acfa8b17206870802e0074a0869147cada5550b5 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/acfa8b17206870802e0074a0869147cada5550b5/sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs:2 | }
/// Updates an Auto Scaling group in the Region to a new maximum size.
/// # Arguments
///
/// * `-a AUTOSCALING-NAME` - The name of the Auto Scaling group.
/// * `-m MAXIMUM-SiZE` - The mazimum size of the Auto Scaling group.
/// * `[-r REGION]` - The Region in which the client is created.
/// If not supplied, u... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs | Apache-2.0 | acfa8b17206870802e0074a0869147cada5550b5 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/acfa8b17206870802e0074a0869147cada5550b5/sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs | 41 | 83 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use autoscaling::{Client, Error, Region, PKG_VERSION};
use aws_config::meta::region::RegionProviderChain;
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The name of the Auto... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs | Apache-2.0 | 74cd8a14231e1a005a2f554b072fc9782def5519 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/74cd8a14231e1a005a2f554b072fc9782def5519/sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs:2 | let Opt {
autoscaling_name,
max_size,
region,
verbose,
} = Opt::from_args();
let region_provider = RegionProviderChain::first_try(region.map(Region::new))
.or_default_provider()
.or_else(Region::new("us-west-2"));
let shared_config = aws_config::from_env().re... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs | Apache-2.0 | 74cd8a14231e1a005a2f554b072fc9782def5519 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/74cd8a14231e1a005a2f554b072fc9782def5519/sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs | 41 | 77 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use autoscaling::{Client, Config, Error, Region, PKG_VERSION};
use aws_types::region::{self, ProvideRegion};
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The name of the A... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs | Apache-2.0 | d61aa9575151b9e9ac88810e65d5481860d8a552 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/d61aa9575151b9e9ac88810e65d5481860d8a552/sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs:2 | let Opt {
autoscaling_name,
max_size,
region,
verbose,
} = Opt::from_args();
let region_provider = region::ChainProvider::first_try(region.map(Region::new))
.or_default_provider()
.or_else(Region::new("us-west-2"));
println!();
if verbose {
prin... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs | Apache-2.0 | d61aa9575151b9e9ac88810e65d5481860d8a552 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/d61aa9575151b9e9ac88810e65d5481860d8a552/sdk/examples/autoscaling/src/bin/update-autoscaling-group.rs | 41 | 74 |
awslabs/aws-sdk-rust:sdk/examples/autoscalingplans/src/bin/describe-scaling-plans.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use autoscalingplans::{Client, Error, Region};
use aws_config::meta::region::RegionProviderChain;
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The region
#[structopt(s... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscalingplans/src/bin/describe-scaling-plans.rs | Apache-2.0 | 74cd8a14231e1a005a2f554b072fc9782def5519 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/74cd8a14231e1a005a2f554b072fc9782def5519/sdk/examples/autoscalingplans/src/bin/describe-scaling-plans.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/autoscalingplans/src/bin/describe-scaling-plans.rs:2 | "Auto Scaling Plans client version: {}",
autoscalingplans::PKG_VERSION
);
println!(
"Region: {:?}",
shared_config.region().unwrap()
);
println!();
}
let client = Client::new(&shared_config);
let response = clien... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscalingplans/src/bin/describe-scaling-plans.rs | Apache-2.0 | 74cd8a14231e1a005a2f554b072fc9782def5519 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/74cd8a14231e1a005a2f554b072fc9782def5519/sdk/examples/autoscalingplans/src/bin/describe-scaling-plans.rs | 41 | 63 |
awslabs/aws-sdk-rust:sdk/examples/autoscalingplans/src/bin/describe-scaling-plans.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use autoscalingplans::{Client, Config, Error, Region};
use aws_types::region::{self, ProvideRegion};
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The region
#[structop... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscalingplans/src/bin/describe-scaling-plans.rs | Apache-2.0 | d61aa9575151b9e9ac88810e65d5481860d8a552 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/d61aa9575151b9e9ac88810e65d5481860d8a552/sdk/examples/autoscalingplans/src/bin/describe-scaling-plans.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/autoscalingplans/src/bin/describe-scaling-plans.rs:2 | autoscalingplans::PKG_VERSION
);
println!(
"Region: {:?}",
region_provider.region()
);
println!();
}
let config = Config::builder().region(region_provider).build();
let client = Client::from_conf(config);
let response =... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/autoscalingplans/src/bin/describe-scaling-plans.rs | Apache-2.0 | d61aa9575151b9e9ac88810e65d5481860d8a552 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/d61aa9575151b9e9ac88810e65d5481860d8a552/sdk/examples/autoscalingplans/src/bin/describe-scaling-plans.rs | 41 | 63 |
awslabs/aws-sdk-rust:sdk/examples/batch/src/bin/batch-helloworld.rs:1 | use aws_types::region::ProvideRegion;
use batch::{Client, Config, Error, Region};
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct Opt {
/// The default AWS Region.
#[structopt(short, long)]
default_region: Option<String>,
/// Whether to display additional information.
#[structopt(shor... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/batch/src/bin/batch-helloworld.rs | Apache-2.0 | abe0ae5798928b83547ab30ddd2687be899e45c3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/abe0ae5798928b83547ab30ddd2687be899e45c3/sdk/examples/batch/src/bin/batch-helloworld.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/examples/batch/src/bin/batch-helloworld.rs:2 | println!("Region: {:?}", ®ion);
println!();
}
let conf = Config::builder().region(®ion).build();
let client = Client::from_conf(conf);
let rsp = client.describe_compute_environments().send().await?;
let compute_envs = rsp.compute_environments.unwrap_or_default();
pr... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/batch/src/bin/batch-helloworld.rs | Apache-2.0 | abe0ae5798928b83547ab30ddd2687be899e45c3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/abe0ae5798928b83547ab30ddd2687be899e45c3/sdk/examples/batch/src/bin/batch-helloworld.rs | 41 | 61 |
awslabs/aws-sdk-rust:sdk/examples/batch/src/bin/helloworld.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use aws_config::meta::region::RegionProviderChain;
use batch::{Client, Region};
#[tokio::main]
async fn main() -> Result<(), batch::Error> {
tracing_subscriber::fmt::init();
let region_provide... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/batch/src/bin/helloworld.rs | Apache-2.0 | acfa8b17206870802e0074a0869147cada5550b5 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/acfa8b17206870802e0074a0869147cada5550b5/sdk/examples/batch/src/bin/helloworld.rs | 1 | 31 |
awslabs/aws-sdk-rust:sdk/examples/batch/src/bin/helloworld.rs:1 | use aws_config::meta::region::RegionProviderChain;
use batch::{Client, Region};
#[tokio::main]
async fn main() -> Result<(), batch::Error> {
tracing_subscriber::fmt::init();
let region_provider = RegionProviderChain::default_provider().or_else(Region::new("us-west-2"));
let shared_config = aws_config::fro... | rust | rust | rust-source | awslabs/aws-sdk-rust | sdk/examples/batch/src/bin/helloworld.rs | Apache-2.0 | 74cd8a14231e1a005a2f554b072fc9782def5519 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/74cd8a14231e1a005a2f554b072fc9782def5519/sdk/examples/batch/src/bin/helloworld.rs | 1 | 26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.