/AWS1/IF_SGM=>CREATEWORKTEAM()¶
About CreateWorkteam¶
Creates a new work team for labeling your data. A work team is defined by one or more Amazon Cognito user pools. You must first create the user pools before you can create a work team.
You cannot create more than 25 work teams in an account and region.
Method Signature¶
METHODS /AWS1/IF_SGM~CREATEWORKTEAM
IMPORTING
!IV_WORKTEAMNAME TYPE /AWS1/SGMWORKTEAMNAME OPTIONAL
!IV_WORKFORCENAME TYPE /AWS1/SGMWORKFORCENAME OPTIONAL
!IT_MEMBERDEFINITIONS TYPE /AWS1/CL_SGMMEMBERDEFINITION=>TT_MEMBERDEFINITIONS OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/SGMSTRING200 OPTIONAL
!IO_NOTIFICATIONCONFIGURATION TYPE REF TO /AWS1/CL_SGMNOTIFICATIONCONF OPTIONAL
!IO_WORKERACCESSCONFIGURATION TYPE REF TO /AWS1/CL_SGMWORKERACCESSCONF OPTIONAL
!IT_TAGS TYPE /AWS1/CL_SGMTAG=>TT_TAGLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_sgmcreateworkteamrsp
RAISING
/AWS1/CX_SGMRESOURCEINUSE
/AWS1/CX_SGMRESOURCELIMITEXCD
/AWS1/CX_SGMCLIENTEXC
/AWS1/CX_SGMSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_workteamname TYPE /AWS1/SGMWORKTEAMNAME /AWS1/SGMWORKTEAMNAME¶
The name of the work team. Use this name to identify the work team.
it_memberdefinitions TYPE /AWS1/CL_SGMMEMBERDEFINITION=>TT_MEMBERDEFINITIONS TT_MEMBERDEFINITIONS¶
A list of
MemberDefinitionobjects that contains objects that identify the workers that make up the work team.Workforces can be created using Amazon Cognito or your own OIDC Identity Provider (IdP). For private workforces created using Amazon Cognito use
CognitoMemberDefinition. For workforces created using your own OIDC identity provider (IdP) useOidcMemberDefinition. Do not provide input for both of these parameters in a single request.For workforces created using Amazon Cognito, private work teams correspond to Amazon Cognito user groups within the user pool used to create a workforce. All of the
CognitoMemberDefinitionobjects that make up the member definition must have the sameClientIdandUserPoolvalues. To add a Amazon Cognito user group to an existing worker pool, see Adding groups to a User Pool. For more information about user pools, see Amazon Cognito User Pools.For workforces created using your own OIDC IdP, specify the user groups that you want to include in your private work team in
OidcMemberDefinitionby listing those groups inGroups.
iv_description TYPE /AWS1/SGMSTRING200 /AWS1/SGMSTRING200¶
A description of the work team.
Optional arguments:¶
iv_workforcename TYPE /AWS1/SGMWORKFORCENAME /AWS1/SGMWORKFORCENAME¶
The name of the workforce.
io_notificationconfiguration TYPE REF TO /AWS1/CL_SGMNOTIFICATIONCONF /AWS1/CL_SGMNOTIFICATIONCONF¶
Configures notification of workers regarding available or expiring work items.
io_workeraccessconfiguration TYPE REF TO /AWS1/CL_SGMWORKERACCESSCONF /AWS1/CL_SGMWORKERACCESSCONF¶
Use this optional parameter to constrain access to an Amazon S3 resource based on the IP address using supported IAM global condition keys. The Amazon S3 resource is accessed in the worker portal using a Amazon S3 presigned URL.
it_tags TYPE /AWS1/CL_SGMTAG=>TT_TAGLIST TT_TAGLIST¶
An array of key-value pairs.
For more information, see Resource Tag and Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_sgmcreateworkteamrsp /AWS1/CL_SGMCREATEWORKTEAMRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createworkteam(
io_notificationconfiguration = new /aws1/cl_sgmnotificationconf( |string| )
io_workeraccessconfiguration = new /aws1/cl_sgmworkeraccessconf(
io_s3presign = new /aws1/cl_sgms3presign(
io_iampolicyconstraints = new /aws1/cl_sgmiampolicycnstrnts(
iv_sourceip = |string|
iv_vpcsourceip = |string|
)
)
)
it_memberdefinitions = VALUE /aws1/cl_sgmmemberdefinition=>tt_memberdefinitions(
(
new /aws1/cl_sgmmemberdefinition(
io_cognitomemberdefinition = new /aws1/cl_sgmcognitomemberdefn(
iv_clientid = |string|
iv_usergroup = |string|
iv_userpool = |string|
)
io_oidcmemberdefinition = new /aws1/cl_sgmoidcmemberdefn(
it_groups = VALUE /aws1/cl_sgmgroups_w=>tt_groups(
( new /aws1/cl_sgmgroups_w( |string| ) )
)
)
)
)
)
it_tags = VALUE /aws1/cl_sgmtag=>tt_taglist(
(
new /aws1/cl_sgmtag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_description = |string|
iv_workforcename = |string|
iv_workteamname = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_workteamarn = lo_result->get_workteamarn( ).
ENDIF.