Skip to content

describe_file_system_policy async

describe_file_system_policy(
    file_system_id: FileSystemId,
    *,
    config_overrides: Optional[AsyncEFSClientConfig] = None,
) -> FileSystemPolicyDescription

Returns the FileSystemPolicy for the specified EFS file system.

This operation requires permissions for the elasticfilesystem:DescribeFileSystemPolicy action.

Parameters:

  • file_system_id (FileSystemId) –

    Specifies which EFS file system to retrieve the FileSystemPolicy for.

Raises:

  • BadRequest –

    Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.

  • FileSystemNotFound –

    Returned if the specified FileSystemId value doesn't exist in the requester's Amazon Web Services account.

  • InternalServerError –

    Returned if an error occurred on the server side.

  • PolicyNotFound –

    Returned if the specified IAM policy or resource policy cannot be located or accessed. Depending on the action being performed, the error may also be returned if the default file system policy is in effect for the EFS file system or if no backup policy is specified.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_efs/_services/async_efs.py
async def describe_file_system_policy(
    self,
    file_system_id: "capo_efs.types.file_system_id.FileSystemId",
    *,
    config_overrides: Optional[AsyncEFSClientConfig] = None,
) -> "capo_efs.types.file_system_policy_description.FileSystemPolicyDescription":
    """<p>Returns the <code>FileSystemPolicy</code> for the specified EFS file system.</p> <p>This operation requires permissions for the <code>elasticfilesystem:DescribeFileSystemPolicy</code> action.</p>

    Args:
        file_system_id: <p>Specifies which EFS file system to retrieve the <code>FileSystemPolicy</code> for.</p>

    Raises:
        capo_efs.errors.bad_request.BadRequest: <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
        capo_efs.errors.file_system_not_found.FileSystemNotFound: <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's Amazon Web Services account.</p>
        capo_efs.errors.internal_server_error.InternalServerError: <p>Returned if an error occurred on the server side.</p>
        capo_efs.errors.policy_not_found.PolicyNotFound: <p>Returned if the specified IAM policy or resource policy cannot be located or accessed. Depending on the action being performed, the error may also be returned if the default file system policy is in effect for the EFS file system or if no backup policy is specified.</p>
        capo_efs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_efs.types.describe_file_system_policy_request.DescribeFileSystemPolicyRequest]",
    ) -> AsyncOperationResponse[
        "capo_efs.types.file_system_policy_description.FileSystemPolicyDescription"
    ]:
        import capo_efs._operations.magnolio_api_service_v20150201.describe_file_system_policy

        (
            output,
            http_response,
        ) = await capo_efs._operations.magnolio_api_service_v20150201.describe_file_system_policy.async_describe_file_system_policy(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeFileSystemPolicy")
    )
    input_: capo_efs.types.describe_file_system_policy_request.DescribeFileSystemPolicyRequest = {
        "file_system_id": file_system_id
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output