Skip to content

update_workteam async

update_workteam(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    workteam_name: Optional[WorkteamName] = None,
    member_definitions: Optional[MemberDefinitions] = None,
    description: Optional[String200] = None,
    notification_configuration: Optional[NotificationConfiguration] = None,
    worker_access_configuration: Optional[WorkerAccessConfiguration] = None,
) -> UpdateWorkteamResponse

Updates an existing work team with new member definitions or description.

Parameters:

  • workteam_name (Optional[WorkteamName], default: None ) –

    The name of the work team to update.

  • member_definitions (Optional[MemberDefinitions], default: None ) –

    A list of MemberDefinition objects that contains objects that identify the workers that make up the work team.

    Workforces can be created using Amazon Cognito or your own OIDC Identity Provider (IdP). For private workforces created using Amazon Cognito use CognitoMemberDefinition. For workforces created using your own OIDC identity provider (IdP) use OidcMemberDefinition. You should not provide input for both of these parameters in a single request.

    For workforces created using Amazon Cognito, private work teams correspond to Amazon Cognito user groups within the user pool used to create a workforce. All of the CognitoMemberDefinition objects that make up the member definition must have the same ClientId and UserPool values. To add a Amazon Cognito user group to an existing worker pool, see Adding groups to a User Pool. For more information about user pools, see Amazon Cognito User Pools.

    For workforces created using your own OIDC IdP, specify the user groups that you want to include in your private work team in OidcMemberDefinition by listing those groups in Groups. Be aware that user groups that are already in the work team must also be listed in Groups when you make this request to remain on the work team. If you do not include these user groups, they will no longer be associated with the work team you update.

  • description (Optional[String200], default: None ) –

    An updated description for the work team.

  • notification_configuration (Optional[NotificationConfiguration], default: None ) –

    Configures SNS topic notifications for available or expiring work items

  • worker_access_configuration (Optional[WorkerAccessConfiguration], default: None ) –

    Use this optional parameter to constrain access to an Amazon S3 resource based on the IP address using supported IAM global condition keys. The Amazon S3 resource is accessed in the worker portal using a Amazon S3 presigned URL.

Raises:

  • ResourceLimitExceeded –

    You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.

  • UnknownServiceError –

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

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def update_workteam(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    workteam_name: Optional[
        "capo_sagemaker.types.workteam_name.WorkteamName"
    ] = None,
    member_definitions: Optional[
        "capo_sagemaker.types.member_definitions.MemberDefinitions"
    ] = None,
    description: Optional["capo_sagemaker.types.string200.String200"] = None,
    notification_configuration: Optional[
        "capo_sagemaker.types.notification_configuration.NotificationConfiguration"
    ] = None,
    worker_access_configuration: Optional[
        "capo_sagemaker.types.worker_access_configuration.WorkerAccessConfiguration"
    ] = None,
) -> "capo_sagemaker.types.update_workteam_response.UpdateWorkteamResponse":
    """<p>Updates an existing work team with new member definitions or description.</p>

    Args:
        workteam_name: <p>The name of the work team to update.</p>
        member_definitions: <p>A list of <code>MemberDefinition</code> objects that contains objects that identify the workers that make up the work team. </p> <p>Workforces can be created using Amazon Cognito or your own OIDC Identity Provider (IdP). For private workforces created using Amazon Cognito use <code>CognitoMemberDefinition</code>. For workforces created using your own OIDC identity provider (IdP) use <code>OidcMemberDefinition</code>. You should not provide input for both of these parameters in a single request.</p> <p>For workforces created using Amazon Cognito, private work teams correspond to Amazon Cognito <i>user groups</i> within the user pool used to create a workforce. All of the <code>CognitoMemberDefinition</code> objects that make up the member definition must have the same <code>ClientId</code> and <code>UserPool</code> values. To add a Amazon Cognito user group to an existing worker pool, see <a href="">Adding groups to a User Pool</a>. For more information about user pools, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools.html">Amazon Cognito User Pools</a>.</p> <p>For workforces created using your own OIDC IdP, specify the user groups that you want to include in your private work team in <code>OidcMemberDefinition</code> by listing those groups in <code>Groups</code>. Be aware that user groups that are already in the work team must also be listed in <code>Groups</code> when you make this request to remain on the work team. If you do not include these user groups, they will no longer be associated with the work team you update. </p>
        description: <p>An updated description for the work team.</p>
        notification_configuration: <p>Configures SNS topic notifications for available or expiring work items</p>
        worker_access_configuration: <p>Use this optional parameter to constrain access to an Amazon S3 resource based on the IP address using supported IAM global condition keys. The Amazon S3 resource is accessed in the worker portal using a Amazon S3 presigned URL.</p>

    Raises:
        capo_sagemaker.errors.resource_limit_exceeded.ResourceLimitExceeded: <p> You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. </p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.update_workteam_request.UpdateWorkteamRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.update_workteam_response.UpdateWorkteamResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.update_workteam

        (
            output,
            http_response,
        ) = await capo_sagemaker._operations.sage_maker.update_workteam.async_update_workteam(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateWorkteam")
    )
    input_: capo_sagemaker.types.update_workteam_request.UpdateWorkteamRequest = {}
    if workteam_name is not None:
        input_["workteam_name"] = workteam_name
    if member_definitions is not None:
        input_["member_definitions"] = member_definitions
    if description is not None:
        input_["description"] = description
    if notification_configuration is not None:
        input_["notification_configuration"] = notification_configuration
    if worker_access_configuration is not None:
        input_["worker_access_configuration"] = worker_access_configuration

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