Skip to content

/AWS1/CL_SGM=>CREATEWORKFORCE()

About CreateWorkforce

Use this operation to create a workforce. This operation will return an error if a workforce already exists in the Amazon Web Services Region that you specify. You can only create one workforce in each Amazon Web Services Region per Amazon Web Services account.

If you want to create a new workforce in an Amazon Web Services Region where a workforce already exists, use the DeleteWorkforce API operation to delete the existing workforce and then use CreateWorkforce to create a new workforce.

To create a private workforce using Amazon Cognito, you must specify a Cognito user pool in CognitoConfig. You can also create an Amazon Cognito workforce using the Amazon SageMaker console. For more information, see Create a Private Workforce (Amazon Cognito).

To create a private workforce using your own OIDC Identity Provider (IdP), specify your IdP configuration in OidcConfig. Your OIDC IdP must support groups because groups are used by Ground Truth and Amazon A2I to create work teams. For more information, see Create a Private Workforce (OIDC IdP).

Method Signature

IMPORTING

Required arguments:

IV_WORKFORCENAME TYPE /AWS1/SGMWORKFORCENAME /AWS1/SGMWORKFORCENAME

The name of the private workforce.

Optional arguments:

IO_COGNITOCONFIG TYPE REF TO /AWS1/CL_SGMCOGNITOCONFIG /AWS1/CL_SGMCOGNITOCONFIG

Use this parameter to configure an Amazon Cognito private workforce. A single Cognito workforce is created using and corresponds to a single Amazon Cognito user pool.

Do not use OidcConfig if you specify values for CognitoConfig.

IO_OIDCCONFIG TYPE REF TO /AWS1/CL_SGMOIDCCONFIG /AWS1/CL_SGMOIDCCONFIG

Use this parameter to configure a private workforce using your own OIDC Identity Provider.

Do not use CognitoConfig if you specify values for OidcConfig.

IO_SOURCEIPCONFIG TYPE REF TO /AWS1/CL_SGMSOURCEIPCONFIG /AWS1/CL_SGMSOURCEIPCONFIG

SourceIpConfig

IT_TAGS TYPE /AWS1/CL_SGMTAG=>TT_TAGLIST TT_TAGLIST

An array of key-value pairs that contain metadata to help you categorize and organize our workforce. Each tag consists of a key and a value, both of which you define.

IO_WORKFORCEVPCCONFIG TYPE REF TO /AWS1/CL_SGMWORKFORCEVPCCFGREQ /AWS1/CL_SGMWORKFORCEVPCCFGREQ

Use this parameter to configure a workforce using VPC.

RETURNING

OO_OUTPUT TYPE REF TO /AWS1/CL_SGMCREATEWORKFORCERSP /AWS1/CL_SGMCREATEWORKFORCERSP