Describes the security policy that is attached to your server or SFTP connector. The response contains a description of the security policy's properties. For more information about security policies, see Working with security policies for servers or Working with security policies for SFTP connectors.
Parameters:
-
security_policy_name
(SecurityPolicyName)
–
Specify the text name of the security policy for which you want the details.
Raises:
Source code in docs_src/capo_transfer/_services/async_transfer.py
| async def describe_security_policy(
self,
security_policy_name: "capo_transfer.types.security_policy_name.SecurityPolicyName",
*,
config_overrides: Optional[AsyncTransferClientConfig] = None,
) -> "capo_transfer.types.describe_security_policy_response.DescribeSecurityPolicyResponse":
"""<p>Describes the security policy that is attached to your server or SFTP connector. The response contains a description of the security policy's properties. For more information about security policies, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/security-policies.html">Working with security policies for servers</a> or <a href="https://docs.aws.amazon.com/transfer/latest/userguide/security-policies-connectors.html">Working with security policies for SFTP connectors</a>.</p>
Args:
security_policy_name: <p>Specify the text name of the security policy for which you want the details.</p>
Raises:
capo_transfer.errors.internal_service_error.InternalServiceError: <p>This exception is thrown when an error occurs in the Transfer Family service.</p>
capo_transfer.errors.invalid_request_exception.InvalidRequestException: <p>This exception is thrown when the client submits a malformed request.</p>
capo_transfer.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.</p>
capo_transfer.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request has failed because the Amazon Web ServicesTransfer Family service is not available.</p>
capo_transfer.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_transfer.types.describe_security_policy_request.DescribeSecurityPolicyRequest]",
) -> AsyncOperationResponse[
"capo_transfer.types.describe_security_policy_response.DescribeSecurityPolicyResponse"
]:
import capo_transfer._operations.transfer_service.describe_security_policy
(
output,
http_response,
) = await capo_transfer._operations.transfer_service.describe_security_policy.async_describe_security_policy(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeSecurityPolicy")
)
input_: capo_transfer.types.describe_security_policy_request.DescribeSecurityPolicyRequest = {
"security_policy_name": security_policy_name
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|