Returns details about the Hub resource in your account, including the HubArn and the time when you enabled Security Hub CSPM.
Parameters:
Raises:
Examples:
To return details about Hub resource
The following example returns details about the Hub resource in the calling account. The Hub resource represents the implementation of the AWS Security Hub service in the calling account.
>>> await client.describe_hub(hub_arn='arn:aws:securityhub:us-west-1:123456789012:hub/default')
Source code in docs_src/capo_securityhub/_services/async_security_hub.py
| async def describe_hub(
self,
*,
config_overrides: Optional[AsyncSecurityHubClientConfig] = None,
hub_arn: Optional[
"capo_securityhub.types.non_empty_string.NonEmptyString"
] = None,
) -> "capo_securityhub.types.describe_hub_response.DescribeHubResponse":
"""<p>Returns details about the Hub resource in your account, including the <code>HubArn</code> and the time when you enabled Security Hub CSPM.</p>
Args:
hub_arn: <p>The ARN of the Hub resource to retrieve.</p>
Raises:
capo_securityhub.errors.internal_exception.InternalException: <p>Internal server error.</p>
capo_securityhub.errors.invalid_access_exception.InvalidAccessException: <p>The account doesn't have permission to perform this action.</p>
capo_securityhub.errors.invalid_input_exception.InvalidInputException: <p>The request was rejected because you supplied an invalid or out-of-range value for an input parameter.</p>
capo_securityhub.errors.limit_exceeded_exception.LimitExceededException: <p>The request was rejected because it attempted to create resources beyond the current Amazon Web Services account or throttling limits. The error code describes the limit exceeded.</p>
capo_securityhub.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request was rejected because we can't find the specified resource.</p>
capo_securityhub.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To return details about Hub resource
The following example returns details about the Hub resource in the calling account. The Hub resource represents the implementation of the AWS Security Hub service in the calling account.
>>> await client.describe_hub(hub_arn='arn:aws:securityhub:us-west-1:123456789012:hub/default')
"""
async def _handler(
req: "AsyncOperationRequest[capo_securityhub.types.describe_hub_request.DescribeHubRequest]",
) -> AsyncOperationResponse[
"capo_securityhub.types.describe_hub_response.DescribeHubResponse"
]:
import capo_securityhub._operations.security_hub_api_service.describe_hub
(
output,
http_response,
) = await capo_securityhub._operations.security_hub_api_service.describe_hub.async_describe_hub(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeHub")
)
input_: capo_securityhub.types.describe_hub_request.DescribeHubRequest = {}
if hub_arn is not None:
input_["hub_arn"] = hub_arn
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|