Skip to content

get_temporary_glue_partition_credentials async

get_temporary_glue_partition_credentials(
    table_arn: ResourceArnString,
    partition: PartitionValueList,
    *,
    config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
    permissions: Optional[PermissionList] = None,
    duration_seconds: Optional[CredentialTimeoutDurationSecondInteger] = None,
    audit_context: Optional[AuditContext] = None,
    supported_permission_types: Optional[PermissionTypeList] = None,
) -> GetTemporaryGluePartitionCredentialsResponse

This API is identical to GetTemporaryTableCredentials except that this is used when the target Data Catalog resource is of type Partition. Lake Formation restricts the permission of the vended credentials with the same scope down policy which restricts access to a single Amazon S3 prefix.

Parameters:

  • table_arn (ResourceArnString) –

    The ARN of the partitions' table.

  • partition (PartitionValueList) –

    A list of partition values identifying a single partition.

  • permissions (Optional[PermissionList], default: None ) –

    Filters the request based on the user having been granted a list of specified permissions on the requested resource(s).

  • duration_seconds (Optional[CredentialTimeoutDurationSecondInteger], default: None ) –

    The time period, between 900 and 21,600 seconds, for the timeout of the temporary credentials.

  • audit_context (Optional[AuditContext], default: None ) –

    A structure representing context to access a resource (column names, query ID, etc).

  • supported_permission_types (Optional[PermissionTypeList], default: None ) –

    A list of supported permission types for the partition. Valid values are COLUMN_PERMISSION and CELL_FILTER_PERMISSION.

Raises:

Source code in docs_src/capo_lakeformation/_services/async_lake_formation.py
async def get_temporary_glue_partition_credentials(
    self,
    table_arn: "capo_lakeformation.types.resource_arn_string.ResourceArnString",
    partition: "capo_lakeformation.types.partition_value_list.PartitionValueList",
    *,
    config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
    permissions: Optional[
        "capo_lakeformation.types.permission_list.PermissionList"
    ] = None,
    duration_seconds: Optional[
        "capo_lakeformation.types.credential_timeout_duration_second_integer.CredentialTimeoutDurationSecondInteger"
    ] = None,
    audit_context: Optional[
        "capo_lakeformation.types.audit_context.AuditContext"
    ] = None,
    supported_permission_types: Optional[
        "capo_lakeformation.types.permission_type_list.PermissionTypeList"
    ] = None,
) -> "capo_lakeformation.types.get_temporary_glue_partition_credentials_response.GetTemporaryGluePartitionCredentialsResponse":
    """<p>This API is identical to <code>GetTemporaryTableCredentials</code> except that this is used when the target Data Catalog resource is of type Partition. Lake Formation restricts the permission of the vended credentials with the same scope down policy which restricts access to a single Amazon S3 prefix.</p>

    Args:
        table_arn: <p>The ARN of the partitions' table.</p>
        partition: <p>A list of partition values identifying a single partition.</p>
        permissions: <p>Filters the request based on the user having been granted a list of specified permissions on the requested resource(s).</p>
        duration_seconds: <p>The time period, between 900 and 21,600 seconds, for the timeout of the temporary credentials.</p>
        audit_context: <p>A structure representing context to access a resource (column names, query ID, etc).</p>
        supported_permission_types: <p>A list of supported permission types for the partition. Valid values are <code>COLUMN_PERMISSION</code> and <code>CELL_FILTER_PERMISSION</code>.</p>

    Raises:
        capo_lakeformation.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
        capo_lakeformation.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist.</p>
        capo_lakeformation.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_lakeformation.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_lakeformation.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_lakeformation.errors.permission_type_mismatch_exception.PermissionTypeMismatchException: <p>The engine does not support filtering data based on the enforced permissions. For example, if you call the <code>GetTemporaryGlueTableCredentials</code> operation with <code>SupportedPermissionType</code> equal to <code>ColumnPermission</code>, but cell-level permissions exist on the table, this exception is thrown.</p>
        capo_lakeformation.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_lakeformation.types.get_temporary_glue_partition_credentials_request.GetTemporaryGluePartitionCredentialsRequest]",
    ) -> AsyncOperationResponse[
        "capo_lakeformation.types.get_temporary_glue_partition_credentials_response.GetTemporaryGluePartitionCredentialsResponse"
    ]:
        import capo_lakeformation._operations.aws_lake_formation.get_temporary_glue_partition_credentials

        (
            output,
            http_response,
        ) = await capo_lakeformation._operations.aws_lake_formation.get_temporary_glue_partition_credentials.async_get_temporary_glue_partition_credentials(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetTemporaryGluePartitionCredentials")
    )
    input_: capo_lakeformation.types.get_temporary_glue_partition_credentials_request.GetTemporaryGluePartitionCredentialsRequest = {
        "table_arn": table_arn,
        "partition": partition,
    }
    if permissions is not None:
        input_["permissions"] = permissions
    if duration_seconds is not None:
        input_["duration_seconds"] = duration_seconds
    if audit_context is not None:
        input_["audit_context"] = audit_context
    if supported_permission_types is not None:
        input_["supported_permission_types"] = supported_permission_types

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