Skip to content

associate_member_to_queue async

associate_member_to_queue(
    farm_id: FarmId,
    queue_id: QueueId,
    principal_type: DeadlinePrincipalType,
    identity_store_id: IdentityStoreId,
    membership_level: MembershipLevel,
    principal_id: IdentityCenterPrincipalId,
    *,
    config_overrides: Optional[AsyncdeadlineClientConfig] = None,
    identity_center_region: Optional[Region] = None,
) -> AssociateMemberToQueueResponse

Assigns a queue membership level to a member

Parameters:

  • farm_id (FarmId) –

    The farm ID of the queue to associate with the member.

  • queue_id (QueueId) –

    The ID of the queue to associate to the member.

  • principal_type (DeadlinePrincipalType) –

    The member's principal type to associate with the queue.

  • identity_store_id (IdentityStoreId) –

    The member's identity store ID to associate with the queue.

  • membership_level (MembershipLevel) –

    The principal's membership level for the associated queue.

  • principal_id (IdentityCenterPrincipalId) –

    The member's principal ID to associate with the queue.

  • identity_center_region (Optional[Region], default: None ) –

    The Region of the IAM Identity Center instance. If not provided, the service defaults to the Region of the farm.

Raises:

Source code in docs_src/capo_deadline/_services/async_deadline.py
async def associate_member_to_queue(
    self,
    farm_id: "capo_deadline.types.farm_id.FarmId",
    queue_id: "capo_deadline.types.queue_id.QueueId",
    principal_type: "capo_deadline.types.deadline_principal_type.DeadlinePrincipalType",
    identity_store_id: "capo_deadline.types.identity_store_id.IdentityStoreId",
    membership_level: "capo_deadline.types.membership_level.MembershipLevel",
    principal_id: "capo_deadline.types.identity_center_principal_id.IdentityCenterPrincipalId",
    *,
    config_overrides: Optional[AsyncdeadlineClientConfig] = None,
    identity_center_region: Optional["capo_deadline.types.region.Region"] = None,
) -> "capo_deadline.types.associate_member_to_queue_response.AssociateMemberToQueueResponse":
    """<p>Assigns a queue membership level to a member</p>

    Args:
        farm_id: <p>The farm ID of the queue to associate with the member.</p>
        queue_id: <p>The ID of the queue to associate to the member.</p>
        principal_type: <p>The member's principal type to associate with the queue.</p>
        identity_store_id: <p>The member's identity store ID to associate with the queue.</p>
        membership_level: <p>The principal's membership level for the associated queue.</p>
        principal_id: <p>The member's principal ID to associate with the queue.</p>
        identity_center_region: <p>The Region of the IAM Identity Center instance. If not provided, the service defaults to the Region of the farm.</p>

    Raises:
        capo_deadline.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform the action.</p>
        capo_deadline.errors.internal_server_error_exception.InternalServerErrorException: <p>Deadline Cloud can't process your request right now. Try again later.</p>
        capo_deadline.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource can't be found.</p>
        capo_deadline.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>You exceeded your service quota. Service quotas, also referred to as limits, are the maximum number of service resources or operations for your Amazon Web Services account.</p>
        capo_deadline.errors.throttling_exception.ThrottlingException: <p>Your request exceeded a request rate quota.</p>
        capo_deadline.errors.validation_exception.ValidationException: <p>The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.</p>
        capo_deadline.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_deadline.types.associate_member_to_queue_request.AssociateMemberToQueueRequest]",
    ) -> AsyncOperationResponse[
        "capo_deadline.types.associate_member_to_queue_response.AssociateMemberToQueueResponse"
    ]:
        import capo_deadline._operations.deadline.associate_member_to_queue

        (
            output,
            http_response,
        ) = await capo_deadline._operations.deadline.associate_member_to_queue.async_associate_member_to_queue(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("AssociateMemberToQueue")
    )
    input_: capo_deadline.types.associate_member_to_queue_request.AssociateMemberToQueueRequest = {
        "farm_id": farm_id,
        "queue_id": queue_id,
        "principal_type": principal_type,
        "identity_store_id": identity_store_id,
        "membership_level": membership_level,
        "principal_id": principal_id,
    }
    if identity_center_region is not None:
        input_["identity_center_region"] = identity_center_region

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