Skip to content

Create Workforce

sagemaker_create_workforce R Documentation

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)

Arguments

CognitoConfig

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.

OidcConfig

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

Do not use CognitoConfig if you specify values for OidcConfig.

WorkforceName

[required] The name of the private workforce.

Tags

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.

WorkforceVpcConfig

Use this parameter to configure a workforce using VPC.

Value

A list with the following syntax:

list(
  WorkforceArn = "string"
)

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"
    )
  )
)