Returns the infrastructure that a gateway has created and manages, so that you can follow the traffic path from top-level shared resources, such as load balancers, to the service-specific resources represented as gateway routes. Responses include only the Amazon Resource Names (ARNs) of gateway-managed infrastructure. For the current state of a resource, describe it with the corresponding Amazon Web Services service (Elastic Load Balancing, Amazon EC2, or Amazon Web Services Certificate Manager). The results are paginated.
Parameters:
-
gateway
(String)
–
The name or Amazon Resource Name (ARN) of the gateway.
-
max_results
(Optional[BoxedInteger], default:
None
)
–
The maximum number of results that the operation returns in a single page. The maximum value is 20 and the default is 10.
-
next_token
(Optional[String], default:
None
)
–
The nextToken value returned from a previous paginated request.
Raises:
-
AccessDeniedException
–
You don't have authorization to perform the requested action.
-
ClientException
–
These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Or, it might be specifying an identifier that isn't valid.
-
GatewayNotFoundException
–
The specified gateway wasn't found. Check that the gateway name or ARN is correct and that the gateway exists in your account and Region.
-
InvalidParameterException
–
The specified parameter isn't valid. Review the available parameters for the API request.
For more information about service event errors, see Amazon ECS service event messages.
-
ServerException
–
These errors are usually caused by a server issue.
-
UnsupportedFeatureException
–
The specified task isn't supported in this Region.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
To describe the infrastructure that a gateway manages
This example returns the load balancers, listeners, and gateway routes that the gateway named my-gateway manages.
>>> client.describe_gateway_resources(gateway='my-gateway')
Source code in docs_src/capo_ecs/_services/ecs.py
| def describe_gateway_resources(
self,
gateway: "capo_ecs.types.string.String",
*,
config_overrides: Optional[ECSClientConfig] = None,
max_results: Optional["capo_ecs.types.boxed_integer.BoxedInteger"] = None,
next_token: Optional["capo_ecs.types.string.String"] = None,
) -> "capo_ecs.types.describe_gateway_resources_response.DescribeGatewayResourcesResponse":
"""<p>Returns the infrastructure that a gateway has created and manages, so that you can follow the traffic path from top-level shared resources, such as load balancers, to the service-specific resources represented as gateway routes. Responses include only the Amazon Resource Names (ARNs) of gateway-managed infrastructure. For the current state of a resource, describe it with the corresponding Amazon Web Services service (Elastic Load Balancing, Amazon EC2, or Amazon Web Services Certificate Manager). The results are paginated.</p>
Args:
gateway: <p>The name or Amazon Resource Name (ARN) of the gateway.</p>
max_results: <p>The maximum number of results that the operation returns in a single page. The maximum value is 20 and the default is 10.</p>
next_token: <p>The <code>nextToken</code> value returned from a previous paginated request.</p>
Raises:
capo_ecs.errors.access_denied_exception.AccessDeniedException: <p>You don't have authorization to perform the requested action.</p>
capo_ecs.errors.client_exception.ClientException: <p>These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Or, it might be specifying an identifier that isn't valid.</p>
capo_ecs.errors.gateway_not_found_exception.GatewayNotFoundException: <p>The specified gateway wasn't found. Check that the gateway name or ARN is correct and that the gateway exists in your account and Region.</p>
capo_ecs.errors.invalid_parameter_exception.InvalidParameterException: <p>The specified parameter isn't valid. Review the available parameters for the API request.</p> <p>For more information about service event errors, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-event-messages-list.html">Amazon ECS service event messages</a>. </p>
capo_ecs.errors.server_exception.ServerException: <p>These errors are usually caused by a server issue.</p>
capo_ecs.errors.unsupported_feature_exception.UnsupportedFeatureException: <p>The specified task isn't supported in this Region.</p>
capo_ecs.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To describe the infrastructure that a gateway manages
This example returns the load balancers, listeners, and gateway routes that the gateway named my-gateway manages.
>>> client.describe_gateway_resources(gateway='my-gateway')
"""
def _handler(
req: "OperationRequest[capo_ecs.types.describe_gateway_resources_request.DescribeGatewayResourcesRequest]",
) -> OperationResponse[
"capo_ecs.types.describe_gateway_resources_response.DescribeGatewayResourcesResponse"
]:
import capo_ecs._operations.amazon_ec2_container_service_v20141113.describe_gateway_resources
output, http_response = (
capo_ecs._operations.amazon_ec2_container_service_v20141113.describe_gateway_resources.describe_gateway_resources(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeGatewayResources")
)
input_: capo_ecs.types.describe_gateway_resources_request.DescribeGatewayResourcesRequest = {
"gateway": gateway
}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|