Returns metadata about a gateway such as its name, network interfaces, time zone, status, and software version. To specify which gateway to describe, use the Amazon Resource Name (ARN) of the gateway in your request.
Raises:
-
InternalServerError
–
An internal server error has occurred during the request. For more information, see the error and message fields.
-
InvalidGatewayRequestException
–
An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
To describe metadata about the gateway
Returns metadata about a gateway such as its name, network interfaces, configured time zone, and the state (whether the gateway is running or not).
>>> client.describe_gateway_information(gateway_arn='arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B')
Source code in docs_src/capo_storage_gateway/_services/storage_gateway.py
| def describe_gateway_information(
self,
gateway_arn: "capo_storage_gateway.types.gateway_arn.GatewayARN",
*,
config_overrides: Optional[StorageGatewayClientConfig] = None,
) -> "capo_storage_gateway.types.describe_gateway_information_output.DescribeGatewayInformationOutput":
"""<p>Returns metadata about a gateway such as its name, network interfaces, time zone, status, and software version. To specify which gateway to describe, use the Amazon Resource Name (ARN) of the gateway in your request.</p>
Raises:
capo_storage_gateway.errors.internal_server_error.InternalServerError: <p>An internal server error has occurred during the request. For more information, see the error and message fields.</p>
capo_storage_gateway.errors.invalid_gateway_request_exception.InvalidGatewayRequestException: <p>An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.</p>
capo_storage_gateway.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To describe metadata about the gateway
Returns metadata about a gateway such as its name, network interfaces, configured time zone, and the state (whether the gateway is running or not).
>>> client.describe_gateway_information(gateway_arn='arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B')
"""
def _handler(
req: "OperationRequest[capo_storage_gateway.types.describe_gateway_information_input.DescribeGatewayInformationInput]",
) -> OperationResponse[
"capo_storage_gateway.types.describe_gateway_information_output.DescribeGatewayInformationOutput"
]:
import capo_storage_gateway._operations.storage_gateway_20130630.describe_gateway_information
output, http_response = (
capo_storage_gateway._operations.storage_gateway_20130630.describe_gateway_information.describe_gateway_information(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_storage_gateway.types.describe_gateway_information_output.DescribeGatewayInformationOutput",
) -> dict[str, Any]:
import capo_storage_gateway.types.describe_gateway_information_output
return capo_storage_gateway.types.describe_gateway_information_output.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging(
"DescribeGatewayInformation", redact_output=_redact_output
),
)
input_: capo_storage_gateway.types.describe_gateway_information_input.DescribeGatewayInformationInput = {
"gateway_arn": gateway_arn
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|