[ aws . sagemaker ]

create-workforce

Description

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

If you want to create a new workforce in an AWS Region where a workforce already exists, use the 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) .

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  create-workforce
[--cognito-config <value>]
[--oidc-config <value>]
[--source-ip-config <value>]
--workforce-name <value>
[--tags <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--cognito-config (structure)

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 .

UserPool -> (string)

A user pool is a user directory in Amazon Cognito. With a user pool, your users can sign in to your web or mobile app through Amazon Cognito. Your users can also sign in through social identity providers like Google, Facebook, Amazon, or Apple, and through SAML identity providers.

ClientId -> (string)

The client ID for your Amazon Cognito user pool.

Shorthand Syntax:

UserPool=string,ClientId=string

JSON Syntax:

{
  "UserPool": "string",
  "ClientId": "string"
}

--oidc-config (structure)

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

Do not use CognitoConfig if you specify values for OidcConfig .

ClientId -> (string)

The OIDC IdP client ID used to configure your private workforce.

ClientSecret -> (string)

The OIDC IdP client secret used to configure your private workforce.

Issuer -> (string)

The OIDC IdP issuer used to configure your private workforce.

AuthorizationEndpoint -> (string)

The OIDC IdP authorization endpoint used to configure your private workforce.

TokenEndpoint -> (string)

The OIDC IdP token endpoint used to configure your private workforce.

UserInfoEndpoint -> (string)

The OIDC IdP user information endpoint used to configure your private workforce.

LogoutEndpoint -> (string)

The OIDC IdP logout endpoint used to configure your private workforce.

JwksUri -> (string)

The OIDC IdP JSON Web Key Set (Jwks) URI used to configure your private workforce.

Shorthand Syntax:

ClientId=string,ClientSecret=string,Issuer=string,AuthorizationEndpoint=string,TokenEndpoint=string,UserInfoEndpoint=string,LogoutEndpoint=string,JwksUri=string

JSON Syntax:

{
  "ClientId": "string",
  "ClientSecret": "string",
  "Issuer": "string",
  "AuthorizationEndpoint": "string",
  "TokenEndpoint": "string",
  "UserInfoEndpoint": "string",
  "LogoutEndpoint": "string",
  "JwksUri": "string"
}

--source-ip-config (structure)

A 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 login to their worker portal from an IP address within this range. By default, a workforce isn’t restricted to specific IP addresses.

Cidrs -> (list)

A list of one to ten Classless Inter-Domain Routing (CIDR) values.

Maximum: Ten CIDR values

Note

The following Length Constraints apply to individual CIDR values in the CIDR value list.

(string)

Shorthand Syntax:

Cidrs=string,string

JSON Syntax:

{
  "Cidrs": ["string", ...]
}

--workforce-name (string)

The name of the private workforce.

--tags (list)

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.

(structure)

Describes a tag.

Key -> (string)

The tag key.

Value -> (string)

The tag value.

Shorthand Syntax:

Key=string,Value=string ...

JSON Syntax:

[
  {
    "Key": "string",
    "Value": "string"
  }
  ...
]

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See ‘aws help’ for descriptions of global parameters.

Output

WorkforceArn -> (string)

The Amazon Resource Name (ARN) of the workforce.