Use this operation to create a workforce¶
Description¶
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 delete_workforce API operation to delete the existing workforce and then use create_workforce 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).
Usage¶
sagemaker_create_workforce(CognitoConfig, OidcConfig, SourceIpConfig,
WorkforceName, Tags, WorkforceVpcConfig, IpAddressType)
Arguments¶
-
CognitoConfigUse 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
OidcConfigif you specify values forCognitoConfig. -
OidcConfigUse this parameter to configure a private workforce using your own OIDC Identity Provider.
Do not use
CognitoConfigif you specify values forOidcConfig. -
SourceIpConfigA list of IP address ranges (CIDRs). Used to create an allow list of IP addresses for a private workforce. Workers will only be able to log in to their worker portal from an IP address within this range. By default, a workforce isn't restricted to specific IP addresses.
-
WorkforceName[required] The name of the private workforce.
-
TagsAn 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.
-
WorkforceVpcConfigUse this parameter to configure a workforce using VPC.
-
IpAddressTypeUse this parameter to specify whether you want
IPv4only ordualstack(IPv4andIPv6) to support your labeling workforce.
Value¶
A list with the following syntax:
Request syntax¶
svc$create_workforce(
CognitoConfig = list(
UserPool = "string",
ClientId = "string"
),
OidcConfig = list(
ClientId = "string",
ClientSecret = "string",
Issuer = "string",
AuthorizationEndpoint = "string",
TokenEndpoint = "string",
UserInfoEndpoint = "string",
LogoutEndpoint = "string",
JwksUri = "string",
Scope = "string",
AuthenticationRequestExtraParams = list(
"string"
)
),
SourceIpConfig = list(
Cidrs = list(
"string"
)
),
WorkforceName = "string",
Tags = list(
list(
Key = "string",
Value = "string"
)
),
WorkforceVpcConfig = list(
VpcId = "string",
SecurityGroupIds = list(
"string"
),
Subnets = list(
"string"
)
),
IpAddressType = "ipv4"|"dualstack"
)