QBusiness / Client / create_data_accessor

create_data_accessor#

QBusiness.Client.create_data_accessor(**kwargs)#

Creates a new data accessor for an ISV to access data from a Q Business application. The data accessor is an entity that represents the ISV’s access to the Q Business application’s data. It includes the IAM role ARN for the ISV, a friendly name, and a set of action configurations that define the specific actions the ISV is allowed to perform and any associated data filters. When the data accessor is created, an AWS IAM Identity Center application is also created to manage the ISV’s identity and authentication for accessing the Q Business application.

See also: AWS API Documentation

Request Syntax

response = client.create_data_accessor(
    applicationId='string',
    principal='string',
    actionConfigurations=[
        {
            'action': 'string',
            'filterConfiguration': {
                'documentAttributeFilter': {
                    'andAllFilters': [
                        {'... recursive ...'},
                    ],
                    'orAllFilters': [
                        {'... recursive ...'},
                    ],
                    'notFilter': {'... recursive ...'},
                    'equalsTo': {
                        'name': 'string',
                        'value': {
                            'stringValue': 'string',
                            'stringListValue': [
                                'string',
                            ],
                            'longValue': 123,
                            'dateValue': datetime(2015, 1, 1)
                        }
                    },
                    'containsAll': {
                        'name': 'string',
                        'value': {
                            'stringValue': 'string',
                            'stringListValue': [
                                'string',
                            ],
                            'longValue': 123,
                            'dateValue': datetime(2015, 1, 1)
                        }
                    },
                    'containsAny': {
                        'name': 'string',
                        'value': {
                            'stringValue': 'string',
                            'stringListValue': [
                                'string',
                            ],
                            'longValue': 123,
                            'dateValue': datetime(2015, 1, 1)
                        }
                    },
                    'greaterThan': {
                        'name': 'string',
                        'value': {
                            'stringValue': 'string',
                            'stringListValue': [
                                'string',
                            ],
                            'longValue': 123,
                            'dateValue': datetime(2015, 1, 1)
                        }
                    },
                    'greaterThanOrEquals': {
                        'name': 'string',
                        'value': {
                            'stringValue': 'string',
                            'stringListValue': [
                                'string',
                            ],
                            'longValue': 123,
                            'dateValue': datetime(2015, 1, 1)
                        }
                    },
                    'lessThan': {
                        'name': 'string',
                        'value': {
                            'stringValue': 'string',
                            'stringListValue': [
                                'string',
                            ],
                            'longValue': 123,
                            'dateValue': datetime(2015, 1, 1)
                        }
                    },
                    'lessThanOrEquals': {
                        'name': 'string',
                        'value': {
                            'stringValue': 'string',
                            'stringListValue': [
                                'string',
                            ],
                            'longValue': 123,
                            'dateValue': datetime(2015, 1, 1)
                        }
                    }
                }
            }
        },
    ],
    clientToken='string',
    displayName='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters:
  • applicationId (string) –

    [REQUIRED]

    The unique identifier of the Q Business application.

  • principal (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the IAM role for the ISV that will be accessing the data.

  • actionConfigurations (list) –

    [REQUIRED]

    A list of action configurations specifying the allowed actions and any associated filters.

    • (dict) –

      Specifies an allowed action and its associated filter configuration.

      • action (string) – [REQUIRED]

        The Q Business action that is allowed.

      • filterConfiguration (dict) –

        The filter configuration for the action, if any.

        • documentAttributeFilter (dict) – [REQUIRED]

          Enables filtering of responses based on document attributes or metadata fields.

          • andAllFilters (list) –

            Performs a logical AND operation on all supplied filters.

            • (dict) –

              Enables filtering of responses based on document attributes or metadata fields.

          • orAllFilters (list) –

            Performs a logical OR operation on all supplied filters.

            • (dict) –

              Enables filtering of responses based on document attributes or metadata fields.

          • notFilter (dict) –

            Performs a logical NOT operation on all supplied filters.

          • equalsTo (dict) –

            Performs an equals operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue, longValue, stringListValue and stringValue.

            • name (string) – [REQUIRED]

              The identifier for the attribute.

            • value (dict) – [REQUIRED]

              The value of the attribute.

              Note

              This is a Tagged Union structure. Only one of the following top level keys can be set: stringValue, stringListValue, longValue, dateValue.

              • stringValue (string) –

                A string.

              • stringListValue (list) –

                A list of strings.

                • (string) –

              • longValue (integer) –

                A long integer value.

              • dateValue (datetime) –

                A date expressed as an ISO 8601 string.

                It’s important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.

          • containsAll (dict) –

            Returns true when a document contains all the specified document attributes or metadata fields. Supported for the following document attribute value types: stringListValue.

            • name (string) – [REQUIRED]

              The identifier for the attribute.

            • value (dict) – [REQUIRED]

              The value of the attribute.

              Note

              This is a Tagged Union structure. Only one of the following top level keys can be set: stringValue, stringListValue, longValue, dateValue.

              • stringValue (string) –

                A string.

              • stringListValue (list) –

                A list of strings.

                • (string) –

              • longValue (integer) –

                A long integer value.

              • dateValue (datetime) –

                A date expressed as an ISO 8601 string.

                It’s important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.

          • containsAny (dict) –

            Returns true when a document contains any of the specified document attributes or metadata fields. Supported for the following document attribute value types: stringListValue.

            • name (string) – [REQUIRED]

              The identifier for the attribute.

            • value (dict) – [REQUIRED]

              The value of the attribute.

              Note

              This is a Tagged Union structure. Only one of the following top level keys can be set: stringValue, stringListValue, longValue, dateValue.

              • stringValue (string) –

                A string.

              • stringListValue (list) –

                A list of strings.

                • (string) –

              • longValue (integer) –

                A long integer value.

              • dateValue (datetime) –

                A date expressed as an ISO 8601 string.

                It’s important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.

          • greaterThan (dict) –

            Performs a greater than operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue and longValue.

            • name (string) – [REQUIRED]

              The identifier for the attribute.

            • value (dict) – [REQUIRED]

              The value of the attribute.

              Note

              This is a Tagged Union structure. Only one of the following top level keys can be set: stringValue, stringListValue, longValue, dateValue.

              • stringValue (string) –

                A string.

              • stringListValue (list) –

                A list of strings.

                • (string) –

              • longValue (integer) –

                A long integer value.

              • dateValue (datetime) –

                A date expressed as an ISO 8601 string.

                It’s important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.

          • greaterThanOrEquals (dict) –

            Performs a greater or equals than operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue and longValue.

            • name (string) – [REQUIRED]

              The identifier for the attribute.

            • value (dict) – [REQUIRED]

              The value of the attribute.

              Note

              This is a Tagged Union structure. Only one of the following top level keys can be set: stringValue, stringListValue, longValue, dateValue.

              • stringValue (string) –

                A string.

              • stringListValue (list) –

                A list of strings.

                • (string) –

              • longValue (integer) –

                A long integer value.

              • dateValue (datetime) –

                A date expressed as an ISO 8601 string.

                It’s important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.

          • lessThan (dict) –

            Performs a less than operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue and longValue.

            • name (string) – [REQUIRED]

              The identifier for the attribute.

            • value (dict) – [REQUIRED]

              The value of the attribute.

              Note

              This is a Tagged Union structure. Only one of the following top level keys can be set: stringValue, stringListValue, longValue, dateValue.

              • stringValue (string) –

                A string.

              • stringListValue (list) –

                A list of strings.

                • (string) –

              • longValue (integer) –

                A long integer value.

              • dateValue (datetime) –

                A date expressed as an ISO 8601 string.

                It’s important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.

          • lessThanOrEquals (dict) –

            Performs a less than or equals operation on two document attributes or metadata fields.Supported for the following document attribute value type: dateValue and longValue.

            • name (string) – [REQUIRED]

              The identifier for the attribute.

            • value (dict) – [REQUIRED]

              The value of the attribute.

              Note

              This is a Tagged Union structure. Only one of the following top level keys can be set: stringValue, stringListValue, longValue, dateValue.

              • stringValue (string) –

                A string.

              • stringListValue (list) –

                A list of strings.

                • (string) –

              • longValue (integer) –

                A long integer value.

              • dateValue (datetime) –

                A date expressed as an ISO 8601 string.

                It’s important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.

  • clientToken (string) –

    A unique, case-sensitive identifier you provide to ensure idempotency of the request.

    This field is autopopulated if not provided.

  • displayName (string) –

    [REQUIRED]

    A friendly name for the data accessor.

  • tags (list) –

    The tags to associate with the data accessor.

    • (dict) –

      A list of key/value pairs that identify an index, FAQ, or data source. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.

      • key (string) – [REQUIRED]

        The key for the tag. Keys are not case sensitive and must be unique for the Amazon Q Business application or data source.

      • value (string) – [REQUIRED]

        The value associated with the tag. The value may be an empty string but it can’t be null.

Return type:

dict

Returns:

Response Syntax

{
    'dataAccessorId': 'string',
    'idcApplicationArn': 'string',
    'dataAccessorArn': 'string'
}

Response Structure

  • (dict) –

    • dataAccessorId (string) –

      The unique identifier of the created data accessor.

    • idcApplicationArn (string) –

      The Amazon Resource Name (ARN) of the AWS IAM Identity Center application created for this data accessor.

    • dataAccessorArn (string) –

      The Amazon Resource Name (ARN) of the created data accessor.

Exceptions