Connect / Client / search_workspaces

search_workspaces

Connect.Client.search_workspaces(**kwargs)

Searches workspaces based on name, description, visibility, or tags.

See also: AWS API Documentation

Request Syntax

response = client.search_workspaces(
    InstanceId='string',
    NextToken='string',
    MaxResults=123,
    SearchFilter={
        'AttributeFilter': {
            'OrConditions': [
                {
                    'TagConditions': [
                        {
                            'TagKey': 'string',
                            'TagValue': 'string'
                        },
                    ]
                },
            ],
            'AndCondition': {
                'TagConditions': [
                    {
                        'TagKey': 'string',
                        'TagValue': 'string'
                    },
                ]
            },
            'TagCondition': {
                'TagKey': 'string',
                'TagValue': 'string'
            }
        }
    },
    SearchCriteria={
        'OrConditions': [
            {'... recursive ...'},
        ],
        'AndConditions': [
            {'... recursive ...'},
        ],
        'StringCondition': {
            'FieldName': 'string',
            'Value': 'string',
            'ComparisonType': 'STARTS_WITH'|'CONTAINS'|'EXACT'
        }
    }
)
Parameters:
  • InstanceId (string) –

    [REQUIRED]

    The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

  • NextToken (string) – The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • MaxResults (integer) – The maximum number of results to return per page.

  • SearchFilter (dict) –

    Filters to apply to the search, such as tag-based filters.

    • AttributeFilter (dict) –

      An object that can be used to specify Tag conditions inside the SearchFilter. This accepts an OR or AND (List of List) input where:

      • The top level list specifies conditions that need to be applied with OR operator.

      • The inner list specifies conditions that need to be applied with AND operator.

      • OrConditions (list) –

        A list of conditions which would be applied together with an OR condition.

        • (dict) –

          A list of conditions which would be applied together with an AND condition.

          • TagConditions (list) –

            A leaf node condition which can be used to specify a tag condition.

            • (dict) –

              A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

              • TagKey (string) –

                The tag key in the tag condition.

              • TagValue (string) –

                The tag value in the tag condition.

      • AndCondition (dict) –

        A list of conditions which would be applied together with an AND condition.

        • TagConditions (list) –

          A leaf node condition which can be used to specify a tag condition.

          • (dict) –

            A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

            • TagKey (string) –

              The tag key in the tag condition.

            • TagValue (string) –

              The tag value in the tag condition.

      • TagCondition (dict) –

        A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

        • TagKey (string) –

          The tag key in the tag condition.

        • TagValue (string) –

          The tag value in the tag condition.

  • SearchCriteria (dict) –

    The search criteria, including field names and comparison types.

    • OrConditions (list) –

      A list of conditions to be met, where at least one condition must be satisfied.

      • (dict) –

        Defines the search criteria for filtering workspaces.

    • AndConditions (list) –

      A list of conditions that must all be satisfied.

      • (dict) –

        Defines the search criteria for filtering workspaces.

    • StringCondition (dict) –

      A leaf node condition which can be used to specify a string condition.

      • FieldName (string) –

        The name of the field in the string condition.

      • Value (string) –

        The value of the string.

      • ComparisonType (string) –

        The type of comparison to be made when evaluating the string condition.

Return type:

dict

Returns:

Response Syntax

{
    'NextToken': 'string',
    'Workspaces': [
        {
            'Id': 'string',
            'Name': 'string',
            'Visibility': 'ALL'|'ASSIGNED'|'NONE',
            'Description': 'string',
            'Title': 'string',
            'Arn': 'string',
            'CreatedAt': datetime(2015, 1, 1),
            'Tags': {
                'string': 'string'
            }
        },
    ],
    'ApproximateTotalCount': 123
}

Response Structure

  • (dict) –

    • NextToken (string) –

      If there are additional results, this is the token for the next set of results.

    • Workspaces (list) –

      A list of workspaces that match the search criteria.

      • (dict) –

        Contains summary information about a workspace returned from a search operation.

        • Id (string) –

          The unique identifier of the workspace.

        • Name (string) –

          The name of the workspace.

        • Visibility (string) –

          The visibility setting of the workspace.

        • Description (string) –

          The description of the workspace.

        • Title (string) –

          The title displayed for the workspace.

        • Arn (string) –

          The Amazon Resource Name (ARN) of the workspace.

        • CreatedAt (datetime) –

          The timestamp when the workspace was created.

        • Tags (dict) –

          The tags associated with the workspace.

          • (string) –

            • (string) –

    • ApproximateTotalCount (integer) –

      The approximate total number of workspaces that match the search criteria.

Exceptions