Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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 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).
Synopsis
- data CreateWorkforce = CreateWorkforce' {}
- newCreateWorkforce :: Text -> CreateWorkforce
- createWorkforce_sourceIpConfig :: Lens' CreateWorkforce (Maybe SourceIpConfig)
- createWorkforce_cognitoConfig :: Lens' CreateWorkforce (Maybe CognitoConfig)
- createWorkforce_oidcConfig :: Lens' CreateWorkforce (Maybe OidcConfig)
- createWorkforce_tags :: Lens' CreateWorkforce (Maybe [Tag])
- createWorkforce_workforceName :: Lens' CreateWorkforce Text
- data CreateWorkforceResponse = CreateWorkforceResponse' {
- httpStatus :: Int
- workforceArn :: Text
- newCreateWorkforceResponse :: Int -> Text -> CreateWorkforceResponse
- createWorkforceResponse_httpStatus :: Lens' CreateWorkforceResponse Int
- createWorkforceResponse_workforceArn :: Lens' CreateWorkforceResponse Text
Creating a Request
data CreateWorkforce Source #
See: newCreateWorkforce
smart constructor.
CreateWorkforce' | |
|
Instances
Create a value of CreateWorkforce
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:sourceIpConfig:CreateWorkforce'
, createWorkforce_sourceIpConfig
- Undocumented member.
$sel:cognitoConfig:CreateWorkforce'
, createWorkforce_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
.
$sel:oidcConfig:CreateWorkforce'
, createWorkforce_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
.
$sel:tags:CreateWorkforce'
, createWorkforce_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.
$sel:workforceName:CreateWorkforce'
, createWorkforce_workforceName
- The name of the private workforce.
Request Lenses
createWorkforce_sourceIpConfig :: Lens' CreateWorkforce (Maybe SourceIpConfig) Source #
Undocumented member.
createWorkforce_cognitoConfig :: Lens' CreateWorkforce (Maybe CognitoConfig) Source #
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
.
createWorkforce_oidcConfig :: Lens' CreateWorkforce (Maybe OidcConfig) Source #
Use this parameter to configure a private workforce using your own OIDC Identity Provider.
Do not use CognitoConfig
if you specify values for OidcConfig
.
createWorkforce_tags :: Lens' CreateWorkforce (Maybe [Tag]) Source #
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.
createWorkforce_workforceName :: Lens' CreateWorkforce Text Source #
The name of the private workforce.
Destructuring the Response
data CreateWorkforceResponse Source #
See: newCreateWorkforceResponse
smart constructor.
CreateWorkforceResponse' | |
|
Instances
newCreateWorkforceResponse Source #
:: Int | |
-> Text | |
-> CreateWorkforceResponse |
Create a value of CreateWorkforceResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:CreateWorkforceResponse'
, createWorkforceResponse_httpStatus
- The response's http status code.
$sel:workforceArn:CreateWorkforceResponse'
, createWorkforceResponse_workforceArn
- The Amazon Resource Name (ARN) of the workforce.
Response Lenses
createWorkforceResponse_httpStatus :: Lens' CreateWorkforceResponse Int Source #
The response's http status code.
createWorkforceResponse_workforceArn :: Lens' CreateWorkforceResponse Text Source #
The Amazon Resource Name (ARN) of the workforce.