Returns the specification for the specified protection group.
Parameters:
-
protection_group_id
(ProtectionGroupId)
–
The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.
Raises:
-
InternalErrorException
–
Exception that indicates that a problem occurred with the service infrastructure. You can retry the request.
-
ResourceNotFoundException
–
Exception indicating the specified resource does not exist. If available, this exception includes details in additional properties.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_shield/_services/shield.py
| def describe_protection_group(
self,
protection_group_id: "capo_shield.types.protection_group_id.ProtectionGroupId",
*,
config_overrides: Optional[ShieldClientConfig] = None,
) -> "capo_shield.types.describe_protection_group_response.DescribeProtectionGroupResponse":
"""<p>Returns the specification for the specified protection group.</p>
Args:
protection_group_id: <p>The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it. </p>
Raises:
capo_shield.errors.internal_error_exception.InternalErrorException: <p>Exception that indicates that a problem occurred with the service infrastructure. You can retry the request.</p>
capo_shield.errors.resource_not_found_exception.ResourceNotFoundException: <p>Exception indicating the specified resource does not exist. If available, this exception includes details in additional properties. </p>
capo_shield.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_shield.types.describe_protection_group_request.DescribeProtectionGroupRequest]",
) -> OperationResponse[
"capo_shield.types.describe_protection_group_response.DescribeProtectionGroupResponse"
]:
import capo_shield._operations.aws_shield_20160616.describe_protection_group
output, http_response = (
capo_shield._operations.aws_shield_20160616.describe_protection_group.describe_protection_group(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeProtectionGroup")
)
input_: capo_shield.types.describe_protection_group_request.DescribeProtectionGroupRequest = {
"protection_group_id": protection_group_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|