ListWorkforces
Use this operation to list all private and vendor workforces in an Amazon Region. Note that you can only have one private workforce per Amazon Region.
Request Syntax
{
"MaxResults": number
,
"NameContains": "string
",
"NextToken": "string
",
"SortBy": "string
",
"SortOrder": "string
"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- MaxResults
-
The maximum number of workforces returned in the response.
Type: Integer
Valid Range: Minimum value of 1. Maximum value of 100.
Required: No
- NameContains
-
A filter you can use to search for workforces using part of the workforce name.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 63.
Pattern:
^[a-zA-Z0-9]([a-zA-Z0-9\-]){0,62}$
Required: No
- NextToken
-
A token to resume pagination.
Type: String
Length Constraints: Maximum length of 8192.
Pattern:
.*
Required: No
- SortBy
-
Sort workforces using the workforce name or creation date.
Type: String
Valid Values:
Name | CreateDate
Required: No
- SortOrder
-
Sort workforces in ascending or descending order.
Type: String
Valid Values:
Ascending | Descending
Required: No
Response Syntax
{
"NextToken": "string",
"Workforces": [
{
"CognitoConfig": {
"ClientId": "string",
"UserPool": "string"
},
"CreateDate": number,
"FailureReason": "string",
"LastUpdatedDate": number,
"OidcConfig": {
"AuthenticationRequestExtraParams": {
"string" : "string"
},
"AuthorizationEndpoint": "string",
"ClientId": "string",
"Issuer": "string",
"JwksUri": "string",
"LogoutEndpoint": "string",
"Scope": "string",
"TokenEndpoint": "string",
"UserInfoEndpoint": "string"
},
"SourceIpConfig": {
"Cidrs": [ "string" ]
},
"Status": "string",
"SubDomain": "string",
"WorkforceArn": "string",
"WorkforceName": "string",
"WorkforceVpcConfig": {
"SecurityGroupIds": [ "string" ],
"Subnets": [ "string" ],
"VpcEndpointId": "string",
"VpcId": "string"
}
}
]
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- NextToken
-
A token to resume pagination.
Type: String
Length Constraints: Maximum length of 8192.
Pattern:
.*
- Workforces
-
A list containing information about your workforce.
Type: Array of Workforce objects
Errors
For information about the errors that are common to all actions, see Common Errors.
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: