pub struct Client { /* private fields */ }
Expand description
Client for AWS Migration Hub Refactor Spaces
Client for invoking operations on AWS Migration Hub Refactor Spaces. Each operation on AWS Migration Hub Refactor Spaces 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_migrationhubrefactorspaces::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_migrationhubrefactorspaces::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 CreateApplication
operation has
a Client::create_application
, 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_application()
.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_application(&self) -> CreateApplicationFluentBuilder
pub fn create_application(&self) -> CreateApplicationFluentBuilder
Constructs a fluent builder for the CreateApplication
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name to use for the application.
environment_identifier(impl Into<String>)
/set_environment_identifier(Option<String>)
:
required: trueThe unique identifier of the environment.
vpc_id(impl Into<String>)
/set_vpc_id(Option<String>)
:
required: trueThe ID of the virtual private cloud (VPC).
proxy_type(ProxyType)
/set_proxy_type(Option<ProxyType>)
:
required: trueThe proxy type of the proxy created within the application.
api_gateway_proxy(ApiGatewayProxyInput)
/set_api_gateway_proxy(Option<ApiGatewayProxyInput>)
:
required: falseA wrapper object holding the API Gateway endpoint type and stage name for the proxy.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseThe tags to assign to the application. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
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.
- On success, responds with
CreateApplicationOutput
with field(s):name(Option<String>)
:The name of the application.
arn(Option<String>)
:The Amazon Resource Name (ARN) of the application. The format for this ARN is
arn:aws:refactor-spaces:region:account-id:resource-type/resource-id
. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.owner_account_id(Option<String>)
:The Amazon Web Services account ID of the application owner (which is always the same as the environment owner account ID).
created_by_account_id(Option<String>)
:The Amazon Web Services account ID of application creator.
application_id(Option<String>)
:The unique identifier of the application.
environment_id(Option<String>)
:The ID of the environment in which the application is created.
vpc_id(Option<String>)
:The ID of the Amazon VPC.
proxy_type(Option<ProxyType>)
:The proxy type of the proxy created within the application.
api_gateway_proxy(Option<ApiGatewayProxyInput>)
:A wrapper object holding the API Gateway endpoint type and stage name for the proxy.
state(Option<ApplicationState>)
:The current state of the application.
tags(Option<HashMap::<String, String>>)
:The tags assigned to the application. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
last_updated_time(Option<DateTime>)
:A timestamp that indicates when the application was last updated.
created_time(Option<DateTime>)
:A timestamp that indicates when the application is created.
- On failure, responds with
SdkError<CreateApplicationError>
Source§impl Client
impl Client
Sourcepub fn create_environment(&self) -> CreateEnvironmentFluentBuilder
pub fn create_environment(&self) -> CreateEnvironmentFluentBuilder
Constructs a fluent builder for the CreateEnvironment
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the environment.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseThe description of the environment.
network_fabric_type(NetworkFabricType)
/set_network_fabric_type(Option<NetworkFabricType>)
:
required: trueThe network fabric type of the environment.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseThe tags to assign to the environment. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
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.
- On success, responds with
CreateEnvironmentOutput
with field(s):name(Option<String>)
:The name of the environment.
arn(Option<String>)
:The Amazon Resource Name (ARN) of the environment.
description(Option<String>)
:A description of the environment.
environment_id(Option<String>)
:The unique identifier of the environment.
network_fabric_type(Option<NetworkFabricType>)
:The network fabric type of the environment.
owner_account_id(Option<String>)
:The Amazon Web Services account ID of environment owner.
state(Option<EnvironmentState>)
:The current state of the environment.
tags(Option<HashMap::<String, String>>)
:The tags assigned to the created environment. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..
last_updated_time(Option<DateTime>)
:A timestamp that indicates when the environment was last updated.
created_time(Option<DateTime>)
:A timestamp that indicates when the environment is created.
- On failure, responds with
SdkError<CreateEnvironmentError>
Source§impl Client
impl Client
Sourcepub fn create_route(&self) -> CreateRouteFluentBuilder
pub fn create_route(&self) -> CreateRouteFluentBuilder
Constructs a fluent builder for the CreateRoute
operation.
- The fluent builder is configurable:
environment_identifier(impl Into<String>)
/set_environment_identifier(Option<String>)
:
required: trueThe ID of the environment in which the route is created.
application_identifier(impl Into<String>)
/set_application_identifier(Option<String>)
:
required: trueThe ID of the application within which the route is being created.
service_identifier(impl Into<String>)
/set_service_identifier(Option<String>)
:
required: trueThe ID of the service in which the route is created. Traffic that matches this route is forwarded to this service.
route_type(RouteType)
/set_route_type(Option<RouteType>)
:
required: trueThe route type of the route.
DEFAULT
indicates that all traffic that does not match another route is forwarded to the default route. Applications must have a default route before any other routes can be created.URI_PATH
indicates a route that is based on a URI path.default_route(DefaultRouteInput)
/set_default_route(Option<DefaultRouteInput>)
:
required: falseConfiguration for the default route type.
uri_path_route(UriPathRouteInput)
/set_uri_path_route(Option<UriPathRouteInput>)
:
required: falseThe configuration for the URI path route type.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseThe tags to assign to the route. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..
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.
- On success, responds with
CreateRouteOutput
with field(s):route_id(Option<String>)
:The unique identifier of the route.
arn(Option<String>)
:The Amazon Resource Name (ARN) of the route. The format for this ARN is
arn:aws:refactor-spaces:region:account-id:resource-type/resource-id
. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.owner_account_id(Option<String>)
:The Amazon Web Services account ID of the route owner.
created_by_account_id(Option<String>)
:The Amazon Web Services account ID of the route creator.
route_type(Option<RouteType>)
:The route type of the route.
service_id(Option<String>)
:The ID of service in which the route is created. Traffic that matches this route is forwarded to this service.
application_id(Option<String>)
:The ID of the application in which the route is created.
uri_path_route(Option<UriPathRouteInput>)
:Configuration for the URI path route type.
state(Option<RouteState>)
:The current state of the route. Activation state only allows
ACTIVE
orINACTIVE
as user inputs.FAILED
is a route state that is system generated.tags(Option<HashMap::<String, String>>)
:The tags assigned to the created route. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
last_updated_time(Option<DateTime>)
:A timestamp that indicates when the route was last updated.
created_time(Option<DateTime>)
:A timestamp that indicates when the route is created.
- On failure, responds with
SdkError<CreateRouteError>
Source§impl Client
impl Client
Sourcepub fn create_service(&self) -> CreateServiceFluentBuilder
pub fn create_service(&self) -> CreateServiceFluentBuilder
Constructs a fluent builder for the CreateService
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the service.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseThe description of the service.
environment_identifier(impl Into<String>)
/set_environment_identifier(Option<String>)
:
required: trueThe ID of the environment in which the service is created.
application_identifier(impl Into<String>)
/set_application_identifier(Option<String>)
:
required: trueThe ID of the application which the service is created.
vpc_id(impl Into<String>)
/set_vpc_id(Option<String>)
:
required: falseThe ID of the VPC.
endpoint_type(ServiceEndpointType)
/set_endpoint_type(Option<ServiceEndpointType>)
:
required: trueThe type of endpoint to use for the service. The type can be a URL in a VPC or an Lambda function.
url_endpoint(UrlEndpointInput)
/set_url_endpoint(Option<UrlEndpointInput>)
:
required: falseThe configuration for the URL endpoint type. When creating a route to a service, Refactor Spaces automatically resolves the address in the
UrlEndpointInput
object URL when the Domain Name System (DNS) time-to-live (TTL) expires, or every 60 seconds for TTLs less than 60 seconds.lambda_endpoint(LambdaEndpointInput)
/set_lambda_endpoint(Option<LambdaEndpointInput>)
:
required: falseThe configuration for the Lambda endpoint type.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseThe tags to assign to the service. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..
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.
- On success, responds with
CreateServiceOutput
with field(s):service_id(Option<String>)
:The unique identifier of the service.
name(Option<String>)
:The name of the service.
arn(Option<String>)
:The Amazon Resource Name (ARN) of the service.
owner_account_id(Option<String>)
:The Amazon Web Services account ID of the service owner.
created_by_account_id(Option<String>)
:The Amazon Web Services account ID of the service creator.
description(Option<String>)
:The description of the created service.
environment_id(Option<String>)
:The unique identifier of the environment.
application_id(Option<String>)
:The ID of the application that the created service belongs to.
vpc_id(Option<String>)
:The ID of the VPC.
endpoint_type(Option<ServiceEndpointType>)
:The endpoint type of the service.
url_endpoint(Option<UrlEndpointInput>)
:The configuration for the URL endpoint type.
lambda_endpoint(Option<LambdaEndpointInput>)
:The configuration for the Lambda endpoint type.
state(Option<ServiceState>)
:The current state of the service.
tags(Option<HashMap::<String, String>>)
:The tags assigned to the created service. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..
last_updated_time(Option<DateTime>)
:A timestamp that indicates when the service was last updated.
created_time(Option<DateTime>)
:A timestamp that indicates when the service is created.
- On failure, responds with
SdkError<CreateServiceError>
Source§impl Client
impl Client
Sourcepub fn delete_application(&self) -> DeleteApplicationFluentBuilder
pub fn delete_application(&self) -> DeleteApplicationFluentBuilder
Constructs a fluent builder for the DeleteApplication
operation.
- The fluent builder is configurable:
environment_identifier(impl Into<String>)
/set_environment_identifier(Option<String>)
:
required: trueThe ID of the environment.
application_identifier(impl Into<String>)
/set_application_identifier(Option<String>)
:
required: trueThe ID of the application.
- On success, responds with
DeleteApplicationOutput
with field(s):name(Option<String>)
:The name of the application.
arn(Option<String>)
:The Amazon Resource Name (ARN) of the application.
application_id(Option<String>)
:The ID of the application.
environment_id(Option<String>)
:The unique identifier of the application’s environment.
state(Option<ApplicationState>)
:The current state of the application.
last_updated_time(Option<DateTime>)
:A timestamp that indicates when the environment was last updated.
- On failure, responds with
SdkError<DeleteApplicationError>
Source§impl Client
impl Client
Sourcepub fn delete_environment(&self) -> DeleteEnvironmentFluentBuilder
pub fn delete_environment(&self) -> DeleteEnvironmentFluentBuilder
Constructs a fluent builder for the DeleteEnvironment
operation.
- The fluent builder is configurable:
environment_identifier(impl Into<String>)
/set_environment_identifier(Option<String>)
:
required: trueThe ID of the environment.
- On success, responds with
DeleteEnvironmentOutput
with field(s):name(Option<String>)
:The name of the environment.
arn(Option<String>)
:The Amazon Resource Name (ARN) of the environment.
environment_id(Option<String>)
:The unique identifier of the environment.
state(Option<EnvironmentState>)
:The current state of the environment.
last_updated_time(Option<DateTime>)
:A timestamp that indicates when the environment was last updated.
- On failure, responds with
SdkError<DeleteEnvironmentError>
Source§impl Client
impl Client
Sourcepub fn delete_resource_policy(&self) -> DeleteResourcePolicyFluentBuilder
pub fn delete_resource_policy(&self) -> DeleteResourcePolicyFluentBuilder
Constructs a fluent builder for the DeleteResourcePolicy
operation.
- The fluent builder is configurable:
identifier(impl Into<String>)
/set_identifier(Option<String>)
:
required: trueAmazon Resource Name (ARN) of the resource associated with the policy.
- On success, responds with
DeleteResourcePolicyOutput
- On failure, responds with
SdkError<DeleteResourcePolicyError>
Source§impl Client
impl Client
Sourcepub fn delete_route(&self) -> DeleteRouteFluentBuilder
pub fn delete_route(&self) -> DeleteRouteFluentBuilder
Constructs a fluent builder for the DeleteRoute
operation.
- The fluent builder is configurable:
environment_identifier(impl Into<String>)
/set_environment_identifier(Option<String>)
:
required: trueThe ID of the environment to delete the route from.
application_identifier(impl Into<String>)
/set_application_identifier(Option<String>)
:
required: trueThe ID of the application to delete the route from.
route_identifier(impl Into<String>)
/set_route_identifier(Option<String>)
:
required: trueThe ID of the route to delete.
- On success, responds with
DeleteRouteOutput
with field(s):route_id(Option<String>)
:The ID of the route to delete.
arn(Option<String>)
:The Amazon Resource Name (ARN) of the route.
service_id(Option<String>)
:The ID of the service that the route belongs to.
application_id(Option<String>)
:The ID of the application that the route belongs to.
state(Option<RouteState>)
:The current state of the route.
last_updated_time(Option<DateTime>)
:A timestamp that indicates when the route was last updated.
- On failure, responds with
SdkError<DeleteRouteError>
Source§impl Client
impl Client
Sourcepub fn delete_service(&self) -> DeleteServiceFluentBuilder
pub fn delete_service(&self) -> DeleteServiceFluentBuilder
Constructs a fluent builder for the DeleteService
operation.
- The fluent builder is configurable:
environment_identifier(impl Into<String>)
/set_environment_identifier(Option<String>)
:
required: trueThe ID of the environment that the service is in.
application_identifier(impl Into<String>)
/set_application_identifier(Option<String>)
:
required: trueDeletes a Refactor Spaces service.
The
RefactorSpacesSecurityGroup
security group must be removed from all Amazon Web Services resources in the virtual private cloud (VPC) prior to deleting a service with a URL endpoint in a VPC.service_identifier(impl Into<String>)
/set_service_identifier(Option<String>)
:
required: trueThe ID of the service to delete.
- On success, responds with
DeleteServiceOutput
with field(s):service_id(Option<String>)
:The unique identifier of the service.
name(Option<String>)
:The name of the service.
arn(Option<String>)
:The Amazon Resource Name (ARN) of the service.
environment_id(Option<String>)
:The unique identifier of the environment.
application_id(Option<String>)
:The ID of the application that the service is in.
state(Option<ServiceState>)
:The current state of the service.
last_updated_time(Option<DateTime>)
:A timestamp that indicates when the service was last updated.
- On failure, responds with
SdkError<DeleteServiceError>
Source§impl Client
impl Client
Sourcepub fn get_application(&self) -> GetApplicationFluentBuilder
pub fn get_application(&self) -> GetApplicationFluentBuilder
Constructs a fluent builder for the GetApplication
operation.
- The fluent builder is configurable:
environment_identifier(impl Into<String>)
/set_environment_identifier(Option<String>)
:
required: trueThe ID of the environment.
application_identifier(impl Into<String>)
/set_application_identifier(Option<String>)
:
required: trueThe ID of the application.
- On success, responds with
GetApplicationOutput
with field(s):name(Option<String>)
:The name of the application.
arn(Option<String>)
:The Amazon Resource Name (ARN) of the application.
owner_account_id(Option<String>)
:The Amazon Web Services account ID of the application owner (which is always the same as the environment owner account ID).
created_by_account_id(Option<String>)
:The Amazon Web Services account ID of the application creator.
application_id(Option<String>)
:The unique identifier of the application.
environment_id(Option<String>)
:The unique identifier of the environment.
vpc_id(Option<String>)
:The ID of the virtual private cloud (VPC).
proxy_type(Option<ProxyType>)
:The proxy type of the proxy created within the application.
api_gateway_proxy(Option<ApiGatewayProxyConfig>)
:The endpoint URL of the API Gateway proxy.
state(Option<ApplicationState>)
:The current state of the application.
tags(Option<HashMap::<String, String>>)
:The tags assigned to the application. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
error(Option<ErrorResponse>)
:Any error associated with the application resource.
last_updated_time(Option<DateTime>)
:A timestamp that indicates when the application was last updated.
created_time(Option<DateTime>)
:A timestamp that indicates when the application is created.
- On failure, responds with
SdkError<GetApplicationError>
Source§impl Client
impl Client
Sourcepub fn get_environment(&self) -> GetEnvironmentFluentBuilder
pub fn get_environment(&self) -> GetEnvironmentFluentBuilder
Constructs a fluent builder for the GetEnvironment
operation.
- The fluent builder is configurable:
environment_identifier(impl Into<String>)
/set_environment_identifier(Option<String>)
:
required: trueThe ID of the environment.
- On success, responds with
GetEnvironmentOutput
with field(s):name(Option<String>)
:The name of the environment.
arn(Option<String>)
:The Amazon Resource Name (ARN) of the environment.
description(Option<String>)
:The description of the environment.
environment_id(Option<String>)
:The unique identifier of the environment.
network_fabric_type(Option<NetworkFabricType>)
:The network fabric type of the environment.
owner_account_id(Option<String>)
:The Amazon Web Services account ID of the environment owner.
transit_gateway_id(Option<String>)
:The ID of the Transit Gateway set up by the environment, if applicable.
state(Option<EnvironmentState>)
:The current state of the environment.
tags(Option<HashMap::<String, String>>)
:The tags to assign to the environment. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
error(Option<ErrorResponse>)
:Any error associated with the environment resource.
last_updated_time(Option<DateTime>)
:A timestamp that indicates when the environment was last updated.
created_time(Option<DateTime>)
:A timestamp that indicates when the environment is created.
- On failure, responds with
SdkError<GetEnvironmentError>
Source§impl Client
impl Client
Sourcepub fn get_resource_policy(&self) -> GetResourcePolicyFluentBuilder
pub fn get_resource_policy(&self) -> GetResourcePolicyFluentBuilder
Constructs a fluent builder for the GetResourcePolicy
operation.
- The fluent builder is configurable:
identifier(impl Into<String>)
/set_identifier(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the resource associated with the policy.
- On success, responds with
GetResourcePolicyOutput
with field(s):policy(Option<String>)
:A JSON-formatted string for an Amazon Web Services resource-based policy.
- On failure, responds with
SdkError<GetResourcePolicyError>
Source§impl Client
impl Client
Sourcepub fn get_route(&self) -> GetRouteFluentBuilder
pub fn get_route(&self) -> GetRouteFluentBuilder
Constructs a fluent builder for the GetRoute
operation.
- The fluent builder is configurable:
environment_identifier(impl Into<String>)
/set_environment_identifier(Option<String>)
:
required: trueThe ID of the environment.
application_identifier(impl Into<String>)
/set_application_identifier(Option<String>)
:
required: trueThe ID of the application.
route_identifier(impl Into<String>)
/set_route_identifier(Option<String>)
:
required: trueThe ID of the route.
- On success, responds with
GetRouteOutput
with field(s):route_id(Option<String>)
:The unique identifier of the route.
DEFAULT: All traffic that does not match another route is forwarded to the default route. Applications must have a default route before any other routes can be created.
URI_PATH: A route that is based on a URI path.
arn(Option<String>)
:The Amazon Resource Name (ARN) of the route.
owner_account_id(Option<String>)
:The Amazon Web Services account ID of the route owner.
created_by_account_id(Option<String>)
:The Amazon Web Services account ID of the route creator.
route_type(Option<RouteType>)
:The type of route.
service_id(Option<String>)
:The unique identifier of the service.
application_id(Option<String>)
:The ID of the application that the route belongs to.
environment_id(Option<String>)
:Unique identifier of the environment.
source_path(Option<String>)
:This is the path that Refactor Spaces uses to match traffic. Paths must start with
/
and are relative to the base of the application. To use path parameters in the source path, add a variable in curly braces. For example, the resource path {user} represents a path parameter called ‘user’.methods(Option<Vec::<HttpMethod>>)
:A list of HTTP methods to match. An empty list matches all values. If a method is present, only HTTP requests using that method are forwarded to this route’s service.
include_child_paths(Option<bool>)
:Indicates whether to match all subpaths of the given source path. If this value is
false
, requests must match the source path exactly before they are forwarded to this route’s service.path_resource_to_id(Option<HashMap::<String, String>>)
:A mapping of Amazon API Gateway path resources to resource IDs.
state(Option<RouteState>)
:The current state of the route.
tags(Option<HashMap::<String, String>>)
:The tags assigned to the route. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
error(Option<ErrorResponse>)
:Any error associated with the route resource.
last_updated_time(Option<DateTime>)
:A timestamp that indicates when the route was last updated.
created_time(Option<DateTime>)
:The timestamp of when the route is created.
append_source_path(Option<bool>)
:If set to
true
, this option appends the source path to the service URL endpoint.
- On failure, responds with
SdkError<GetRouteError>
Source§impl Client
impl Client
Sourcepub fn get_service(&self) -> GetServiceFluentBuilder
pub fn get_service(&self) -> GetServiceFluentBuilder
Constructs a fluent builder for the GetService
operation.
- The fluent builder is configurable:
environment_identifier(impl Into<String>)
/set_environment_identifier(Option<String>)
:
required: trueThe ID of the environment.
application_identifier(impl Into<String>)
/set_application_identifier(Option<String>)
:
required: trueThe ID of the application.
service_identifier(impl Into<String>)
/set_service_identifier(Option<String>)
:
required: trueThe ID of the service.
- On success, responds with
GetServiceOutput
with field(s):service_id(Option<String>)
:The unique identifier of the service.
name(Option<String>)
:The name of the service.
arn(Option<String>)
:The Amazon Resource Name (ARN) of the service.
owner_account_id(Option<String>)
:The Amazon Web Services account ID of the service owner.
created_by_account_id(Option<String>)
:The Amazon Web Services account ID of the service creator.
description(Option<String>)
:The description of the service.
environment_id(Option<String>)
:The unique identifier of the environment.
application_id(Option<String>)
:The ID of the application.
vpc_id(Option<String>)
:The ID of the virtual private cloud (VPC).
endpoint_type(Option<ServiceEndpointType>)
:The endpoint type of the service.
url_endpoint(Option<UrlEndpointConfig>)
:The configuration for the URL endpoint type.
The Url isthe URL of the endpoint type.
The HealthUrl is the health check URL of the endpoint type.
lambda_endpoint(Option<LambdaEndpointConfig>)
:The configuration for the Lambda endpoint type.
The Arn is the Amazon Resource Name (ARN) of the Lambda function associated with this service.
state(Option<ServiceState>)
:The current state of the service.
tags(Option<HashMap::<String, String>>)
:The tags assigned to the service. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
error(Option<ErrorResponse>)
:Any error associated with the service resource.
last_updated_time(Option<DateTime>)
:A timestamp that indicates when the service was last updated.
created_time(Option<DateTime>)
:The timestamp of when the service is created.
- On failure, responds with
SdkError<GetServiceError>
Source§impl Client
impl Client
Sourcepub fn list_applications(&self) -> ListApplicationsFluentBuilder
pub fn list_applications(&self) -> ListApplicationsFluentBuilder
Constructs a fluent builder for the ListApplications
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
environment_identifier(impl Into<String>)
/set_environment_identifier(Option<String>)
:
required: trueThe ID of the environment.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next page of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned
nextToken
value.
- On success, responds with
ListApplicationsOutput
with field(s):application_summary_list(Option<Vec::<ApplicationSummary>>)
:The list of
ApplicationSummary
objects.next_token(Option<String>)
:The token for the next page of results.
- On failure, responds with
SdkError<ListApplicationsError>
Source§impl Client
impl Client
Sourcepub fn list_environment_vpcs(&self) -> ListEnvironmentVpcsFluentBuilder
pub fn list_environment_vpcs(&self) -> ListEnvironmentVpcsFluentBuilder
Constructs a fluent builder for the ListEnvironmentVpcs
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
environment_identifier(impl Into<String>)
/set_environment_identifier(Option<String>)
:
required: trueThe ID of the environment.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next page of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned
nextToken
value.
- On success, responds with
ListEnvironmentVpcsOutput
with field(s):environment_vpc_list(Option<Vec::<EnvironmentVpc>>)
:The list of
EnvironmentVpc
objects.next_token(Option<String>)
:The token for the next page of results.
- On failure, responds with
SdkError<ListEnvironmentVpcsError>
Source§impl Client
impl Client
Sourcepub fn list_environments(&self) -> ListEnvironmentsFluentBuilder
pub fn list_environments(&self) -> ListEnvironmentsFluentBuilder
Constructs a fluent builder for the ListEnvironments
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 token for the next page of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned
nextToken
value.
- On success, responds with
ListEnvironmentsOutput
with field(s):environment_summary_list(Option<Vec::<EnvironmentSummary>>)
:The list of
EnvironmentSummary
objects.next_token(Option<String>)
:The token for the next page of results.
- On failure, responds with
SdkError<ListEnvironmentsError>
Source§impl Client
impl Client
Sourcepub fn list_routes(&self) -> ListRoutesFluentBuilder
pub fn list_routes(&self) -> ListRoutesFluentBuilder
Constructs a fluent builder for the ListRoutes
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
environment_identifier(impl Into<String>)
/set_environment_identifier(Option<String>)
:
required: trueThe ID of the environment.
application_identifier(impl Into<String>)
/set_application_identifier(Option<String>)
:
required: trueThe ID of the application.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next page of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned
nextToken
value.
- On success, responds with
ListRoutesOutput
with field(s):route_summary_list(Option<Vec::<RouteSummary>>)
:The list of
RouteSummary
objects.next_token(Option<String>)
:The token for the next page of results.
- On failure, responds with
SdkError<ListRoutesError>
Source§impl Client
impl Client
Sourcepub fn list_services(&self) -> ListServicesFluentBuilder
pub fn list_services(&self) -> ListServicesFluentBuilder
Constructs a fluent builder for the ListServices
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
environment_identifier(impl Into<String>)
/set_environment_identifier(Option<String>)
:
required: trueThe ID of the environment.
application_identifier(impl Into<String>)
/set_application_identifier(Option<String>)
:
required: trueThe ID of the application.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next page of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned
nextToken
value.
- On success, responds with
ListServicesOutput
with field(s):service_summary_list(Option<Vec::<ServiceSummary>>)
:The list of
ServiceSummary
objects.next_token(Option<String>)
:The token for the next page of results.
- On failure, responds with
SdkError<ListServicesError>
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.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap::<String, String>>)
:The list of tags assigned to the resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn put_resource_policy(&self) -> PutResourcePolicyFluentBuilder
pub fn put_resource_policy(&self) -> PutResourcePolicyFluentBuilder
Constructs a fluent builder for the PutResourcePolicy
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 to which the policy is being attached.
policy(impl Into<String>)
/set_policy(Option<String>)
:
required: trueA JSON-formatted string for an Amazon Web Services resource-based policy.
- On success, responds with
PutResourcePolicyOutput
- On failure, responds with
SdkError<PutResourcePolicyError>
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: trueThe new or modified tags for the resource.
- 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: trueThe list of keys of the tags to be removed from the resource.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_route(&self) -> UpdateRouteFluentBuilder
pub fn update_route(&self) -> UpdateRouteFluentBuilder
Constructs a fluent builder for the UpdateRoute
operation.
- The fluent builder is configurable:
environment_identifier(impl Into<String>)
/set_environment_identifier(Option<String>)
:
required: trueThe ID of the environment in which the route is being updated.
application_identifier(impl Into<String>)
/set_application_identifier(Option<String>)
:
required: trueThe ID of the application within which the route is being updated.
route_identifier(impl Into<String>)
/set_route_identifier(Option<String>)
:
required: trueThe unique identifier of the route to update.
activation_state(RouteActivationState)
/set_activation_state(Option<RouteActivationState>)
:
required: trueIf set to
ACTIVE
, traffic is forwarded to this route’s service after the route is updated.
- On success, responds with
UpdateRouteOutput
with field(s):route_id(Option<String>)
:The unique identifier of the route.
arn(Option<String>)
:The Amazon Resource Name (ARN) of the route. The format for this ARN is
arn:aws:refactor-spaces:region:account-id:resource-type/resource-id
. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.service_id(Option<String>)
:The ID of service in which the route was created. Traffic that matches this route is forwarded to this service.
application_id(Option<String>)
:The ID of the application in which the route is being updated.
state(Option<RouteState>)
:The current state of the route.
last_updated_time(Option<DateTime>)
:A timestamp that indicates when the route was last updated.
- On failure, responds with
SdkError<UpdateRouteError>
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);