Skip to content

associate_member_to_fleet

associate_member_to_fleet(
    farm_id: FarmId,
    fleet_id: FleetId,
    principal_type: DeadlinePrincipalType,
    identity_store_id: IdentityStoreId,
    membership_level: MembershipLevel,
    principal_id: IdentityCenterPrincipalId,
    *,
    config_overrides: Optional[deadlineClientConfig] = None,
    identity_center_region: Optional[Region] = None,
) -> AssociateMemberToFleetResponse

Assigns a fleet membership level to a member.

Parameters:

  • farm_id (FarmId) –

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

  • fleet_id (FleetId) –

    The ID of the fleet to associate with a member.

  • principal_type (DeadlinePrincipalType) –

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

  • identity_store_id (IdentityStoreId) –

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

  • membership_level (MembershipLevel) –

    The principal's membership level for the associated fleet.

  • principal_id (IdentityCenterPrincipalId) –

    The member's principal ID to associate with a fleet.

  • 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/deadline.py
def associate_member_to_fleet(
    self,
    farm_id: "capo_deadline.types.farm_id.FarmId",
    fleet_id: "capo_deadline.types.fleet_id.FleetId",
    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[deadlineClientConfig] = None,
    identity_center_region: Optional["capo_deadline.types.region.Region"] = None,
) -> "capo_deadline.types.associate_member_to_fleet_response.AssociateMemberToFleetResponse":
    """<p>Assigns a fleet membership level to a member.</p>

    Args:
        farm_id: <p>The farm ID of the fleet to associate with the member.</p>
        fleet_id: <p>The ID of the fleet to associate with a member.</p>
        principal_type: <p>The member's principal type to associate with the fleet.</p>
        identity_store_id: <p>The member's identity store ID to associate with the fleet.</p>
        membership_level: <p>The principal's membership level for the associated fleet.</p>
        principal_id: <p>The member's principal ID to associate with a fleet.</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.
    """

    def _handler(
        req: "OperationRequest[capo_deadline.types.associate_member_to_fleet_request.AssociateMemberToFleetRequest]",
    ) -> OperationResponse[
        "capo_deadline.types.associate_member_to_fleet_response.AssociateMemberToFleetResponse"
    ]:
        import capo_deadline._operations.deadline.associate_member_to_fleet

        output, http_response = (
            capo_deadline._operations.deadline.associate_member_to_fleet.associate_member_to_fleet(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("AssociateMemberToFleet")
    )
    input_: capo_deadline.types.associate_member_to_fleet_request.AssociateMemberToFleetRequest = {
        "farm_id": farm_id,
        "fleet_id": fleet_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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output