Metadata-Version: 2.1
Name: resolve_customer
Version: 0.0.2
Summary: resolve_customer - AWS ResolveCustomer API
License: GPL-3.0+
Author: PubCloud Development team
Author-email: public-cloud-dev@susecloud.net
Maintainer: PubCloud Development team
Maintainer-email: public-cloud-dev@susecloud.net
Requires-Python: >=3.11,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Operating System
Requires-Dist: PyYAML (>=5.4.0)
Requires-Dist: boto3 (>=1.12)
Requires-Dist: requests (>=2.25.0)
Requires-Dist: setuptools (>=50)
Description-Content-Type: text/x-rst

AWS ResolveCustomer interface
=============================

The lambda function is expected to be triggerd by an AWS API Gateway.

POST
----
Through AWS API Gateway

.. code::

    {
        "registrationToken": "someURLEncodedToken"
    }

RESPONSE
--------

.. code::

    {
        "statusCode": 200,
        "isBase64Encoded": false,
        "body": {
            "marketplaceIdentifier": "AWS",
            "marketplaceAccountId": "CustomerAWSAccountId",
            "customerIdentifier": "CustomerIdentifier",
            "productCode": "string",
            "entitlements": [
                {
                    "expirationDate": 123123111231,
                    "dimension": "string",
                    "value": {
                        "booleanValue": true|false,
                        "doubleValue": 1,
                        "integerValue": 2,
                        "stringValue": "string"
                    }
                }
            ]
        }
    }

ERROR RESPONSE
--------------

.. code::

    {
        "isBase64Encoded": false,
        "statusCode": HTTP_STATUS_CODE,
        "body": {
            "errors": {
                "Registration": "MESSAGE",
                "Exception": "AWS. or App. error code"
            }
        }
    }


Application handled exceptions:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* 500: App.Error.InternalServiceErrorException
* 503: App.Error.ServiceUnavailableException
* 422: App.Error.MissingTokenException
* 400: App.Error.TokenException from
       InvalidTokenException, ExpiredTokenException, ThrottlingException, DisabledApiException
* 400: App.Error.EntitlementException from
       InvalidParameterException, ThrottlingException

Pass through exceptions:
~~~~~~~~~~~~~~~~~~~~~~~~

* HTTP_STATUS_CODE: code and exception name as it was provided by the client call

