PartnerCentralBenefits / Client / get_benefit_allocation

get_benefit_allocation

PartnerCentralBenefits.Client.get_benefit_allocation(**kwargs)

Retrieves detailed information about a specific benefit allocation that has been granted to a partner.

See also: AWS API Documentation

Request Syntax

response = client.get_benefit_allocation(
    Catalog='string',
    Identifier='string'
)
Parameters:
  • Catalog (string) –

    [REQUIRED]

    The catalog identifier that specifies which benefit catalog to query.

  • Identifier (string) –

    [REQUIRED]

    The unique identifier of the benefit allocation to retrieve.

Return type:

dict

Returns:

Response Syntax

{
    'Id': 'string',
    'Catalog': 'string',
    'Arn': 'string',
    'Name': 'string',
    'Description': 'string',
    'Status': 'ACTIVE'|'INACTIVE'|'FULFILLED',
    'StatusReason': 'string',
    'BenefitApplicationId': 'string',
    'BenefitId': 'string',
    'FulfillmentType': 'CREDITS'|'CASH'|'ACCESS',
    'ApplicableBenefitIds': [
        'string',
    ],
    'FulfillmentDetail': {
        'DisbursementDetails': {
            'DisbursedAmount': {
                'Amount': 'string',
                'CurrencyCode': 'AED'|'AMD'|'ARS'|'AUD'|'AWG'|'AZN'|'BBD'|'BDT'|'BGN'|'BMD'|'BND'|'BOB'|'BRL'|'BSD'|'BYR'|'BZD'|'CAD'|'CHF'|'CLP'|'CNY'|'COP'|'CRC'|'CZK'|'DKK'|'DOP'|'EEK'|'EGP'|'EUR'|'GBP'|'GEL'|'GHS'|'GTQ'|'GYD'|'HKD'|'HNL'|'HRK'|'HTG'|'HUF'|'IDR'|'ILS'|'INR'|'ISK'|'JMD'|'JPY'|'KES'|'KHR'|'KRW'|'KYD'|'KZT'|'LBP'|'LKR'|'LTL'|'LVL'|'MAD'|'MNT'|'MOP'|'MUR'|'MVR'|'MXN'|'MYR'|'NAD'|'NGN'|'NIO'|'NOK'|'NZD'|'PAB'|'PEN'|'PHP'|'PKR'|'PLN'|'PYG'|'QAR'|'RON'|'RUB'|'SAR'|'SEK'|'SGD'|'SIT'|'SKK'|'THB'|'TND'|'TRY'|'TTD'|'TWD'|'TZS'|'UAH'|'USD'|'UYU'|'UZS'|'VND'|'XAF'|'XCD'|'XOF'|'XPF'|'ZAR'
            },
            'IssuanceDetails': {
                'IssuanceId': 'string',
                'IssuanceAmount': {
                    'Amount': 'string',
                    'CurrencyCode': 'AED'|'AMD'|'ARS'|'AUD'|'AWG'|'AZN'|'BBD'|'BDT'|'BGN'|'BMD'|'BND'|'BOB'|'BRL'|'BSD'|'BYR'|'BZD'|'CAD'|'CHF'|'CLP'|'CNY'|'COP'|'CRC'|'CZK'|'DKK'|'DOP'|'EEK'|'EGP'|'EUR'|'GBP'|'GEL'|'GHS'|'GTQ'|'GYD'|'HKD'|'HNL'|'HRK'|'HTG'|'HUF'|'IDR'|'ILS'|'INR'|'ISK'|'JMD'|'JPY'|'KES'|'KHR'|'KRW'|'KYD'|'KZT'|'LBP'|'LKR'|'LTL'|'LVL'|'MAD'|'MNT'|'MOP'|'MUR'|'MVR'|'MXN'|'MYR'|'NAD'|'NGN'|'NIO'|'NOK'|'NZD'|'PAB'|'PEN'|'PHP'|'PKR'|'PLN'|'PYG'|'QAR'|'RON'|'RUB'|'SAR'|'SEK'|'SGD'|'SIT'|'SKK'|'THB'|'TND'|'TRY'|'TTD'|'TWD'|'TZS'|'UAH'|'USD'|'UYU'|'UZS'|'VND'|'XAF'|'XCD'|'XOF'|'XPF'|'ZAR'
                },
                'IssuedAt': datetime(2015, 1, 1)
            }
        },
        'ConsumableDetails': {
            'AllocatedAmount': {
                'Amount': 'string',
                'CurrencyCode': 'AED'|'AMD'|'ARS'|'AUD'|'AWG'|'AZN'|'BBD'|'BDT'|'BGN'|'BMD'|'BND'|'BOB'|'BRL'|'BSD'|'BYR'|'BZD'|'CAD'|'CHF'|'CLP'|'CNY'|'COP'|'CRC'|'CZK'|'DKK'|'DOP'|'EEK'|'EGP'|'EUR'|'GBP'|'GEL'|'GHS'|'GTQ'|'GYD'|'HKD'|'HNL'|'HRK'|'HTG'|'HUF'|'IDR'|'ILS'|'INR'|'ISK'|'JMD'|'JPY'|'KES'|'KHR'|'KRW'|'KYD'|'KZT'|'LBP'|'LKR'|'LTL'|'LVL'|'MAD'|'MNT'|'MOP'|'MUR'|'MVR'|'MXN'|'MYR'|'NAD'|'NGN'|'NIO'|'NOK'|'NZD'|'PAB'|'PEN'|'PHP'|'PKR'|'PLN'|'PYG'|'QAR'|'RON'|'RUB'|'SAR'|'SEK'|'SGD'|'SIT'|'SKK'|'THB'|'TND'|'TRY'|'TTD'|'TWD'|'TZS'|'UAH'|'USD'|'UYU'|'UZS'|'VND'|'XAF'|'XCD'|'XOF'|'XPF'|'ZAR'
            },
            'RemainingAmount': {
                'Amount': 'string',
                'CurrencyCode': 'AED'|'AMD'|'ARS'|'AUD'|'AWG'|'AZN'|'BBD'|'BDT'|'BGN'|'BMD'|'BND'|'BOB'|'BRL'|'BSD'|'BYR'|'BZD'|'CAD'|'CHF'|'CLP'|'CNY'|'COP'|'CRC'|'CZK'|'DKK'|'DOP'|'EEK'|'EGP'|'EUR'|'GBP'|'GEL'|'GHS'|'GTQ'|'GYD'|'HKD'|'HNL'|'HRK'|'HTG'|'HUF'|'IDR'|'ILS'|'INR'|'ISK'|'JMD'|'JPY'|'KES'|'KHR'|'KRW'|'KYD'|'KZT'|'LBP'|'LKR'|'LTL'|'LVL'|'MAD'|'MNT'|'MOP'|'MUR'|'MVR'|'MXN'|'MYR'|'NAD'|'NGN'|'NIO'|'NOK'|'NZD'|'PAB'|'PEN'|'PHP'|'PKR'|'PLN'|'PYG'|'QAR'|'RON'|'RUB'|'SAR'|'SEK'|'SGD'|'SIT'|'SKK'|'THB'|'TND'|'TRY'|'TTD'|'TWD'|'TZS'|'UAH'|'USD'|'UYU'|'UZS'|'VND'|'XAF'|'XCD'|'XOF'|'XPF'|'ZAR'
            },
            'UtilizedAmount': {
                'Amount': 'string',
                'CurrencyCode': 'AED'|'AMD'|'ARS'|'AUD'|'AWG'|'AZN'|'BBD'|'BDT'|'BGN'|'BMD'|'BND'|'BOB'|'BRL'|'BSD'|'BYR'|'BZD'|'CAD'|'CHF'|'CLP'|'CNY'|'COP'|'CRC'|'CZK'|'DKK'|'DOP'|'EEK'|'EGP'|'EUR'|'GBP'|'GEL'|'GHS'|'GTQ'|'GYD'|'HKD'|'HNL'|'HRK'|'HTG'|'HUF'|'IDR'|'ILS'|'INR'|'ISK'|'JMD'|'JPY'|'KES'|'KHR'|'KRW'|'KYD'|'KZT'|'LBP'|'LKR'|'LTL'|'LVL'|'MAD'|'MNT'|'MOP'|'MUR'|'MVR'|'MXN'|'MYR'|'NAD'|'NGN'|'NIO'|'NOK'|'NZD'|'PAB'|'PEN'|'PHP'|'PKR'|'PLN'|'PYG'|'QAR'|'RON'|'RUB'|'SAR'|'SEK'|'SGD'|'SIT'|'SKK'|'THB'|'TND'|'TRY'|'TTD'|'TWD'|'TZS'|'UAH'|'USD'|'UYU'|'UZS'|'VND'|'XAF'|'XCD'|'XOF'|'XPF'|'ZAR'
            },
            'IssuanceDetails': {
                'IssuanceId': 'string',
                'IssuanceAmount': {
                    'Amount': 'string',
                    'CurrencyCode': 'AED'|'AMD'|'ARS'|'AUD'|'AWG'|'AZN'|'BBD'|'BDT'|'BGN'|'BMD'|'BND'|'BOB'|'BRL'|'BSD'|'BYR'|'BZD'|'CAD'|'CHF'|'CLP'|'CNY'|'COP'|'CRC'|'CZK'|'DKK'|'DOP'|'EEK'|'EGP'|'EUR'|'GBP'|'GEL'|'GHS'|'GTQ'|'GYD'|'HKD'|'HNL'|'HRK'|'HTG'|'HUF'|'IDR'|'ILS'|'INR'|'ISK'|'JMD'|'JPY'|'KES'|'KHR'|'KRW'|'KYD'|'KZT'|'LBP'|'LKR'|'LTL'|'LVL'|'MAD'|'MNT'|'MOP'|'MUR'|'MVR'|'MXN'|'MYR'|'NAD'|'NGN'|'NIO'|'NOK'|'NZD'|'PAB'|'PEN'|'PHP'|'PKR'|'PLN'|'PYG'|'QAR'|'RON'|'RUB'|'SAR'|'SEK'|'SGD'|'SIT'|'SKK'|'THB'|'TND'|'TRY'|'TTD'|'TWD'|'TZS'|'UAH'|'USD'|'UYU'|'UZS'|'VND'|'XAF'|'XCD'|'XOF'|'XPF'|'ZAR'
                },
                'IssuedAt': datetime(2015, 1, 1)
            }
        },
        'CreditDetails': {
            'AllocatedAmount': {
                'Amount': 'string',
                'CurrencyCode': 'AED'|'AMD'|'ARS'|'AUD'|'AWG'|'AZN'|'BBD'|'BDT'|'BGN'|'BMD'|'BND'|'BOB'|'BRL'|'BSD'|'BYR'|'BZD'|'CAD'|'CHF'|'CLP'|'CNY'|'COP'|'CRC'|'CZK'|'DKK'|'DOP'|'EEK'|'EGP'|'EUR'|'GBP'|'GEL'|'GHS'|'GTQ'|'GYD'|'HKD'|'HNL'|'HRK'|'HTG'|'HUF'|'IDR'|'ILS'|'INR'|'ISK'|'JMD'|'JPY'|'KES'|'KHR'|'KRW'|'KYD'|'KZT'|'LBP'|'LKR'|'LTL'|'LVL'|'MAD'|'MNT'|'MOP'|'MUR'|'MVR'|'MXN'|'MYR'|'NAD'|'NGN'|'NIO'|'NOK'|'NZD'|'PAB'|'PEN'|'PHP'|'PKR'|'PLN'|'PYG'|'QAR'|'RON'|'RUB'|'SAR'|'SEK'|'SGD'|'SIT'|'SKK'|'THB'|'TND'|'TRY'|'TTD'|'TWD'|'TZS'|'UAH'|'USD'|'UYU'|'UZS'|'VND'|'XAF'|'XCD'|'XOF'|'XPF'|'ZAR'
            },
            'IssuedAmount': {
                'Amount': 'string',
                'CurrencyCode': 'AED'|'AMD'|'ARS'|'AUD'|'AWG'|'AZN'|'BBD'|'BDT'|'BGN'|'BMD'|'BND'|'BOB'|'BRL'|'BSD'|'BYR'|'BZD'|'CAD'|'CHF'|'CLP'|'CNY'|'COP'|'CRC'|'CZK'|'DKK'|'DOP'|'EEK'|'EGP'|'EUR'|'GBP'|'GEL'|'GHS'|'GTQ'|'GYD'|'HKD'|'HNL'|'HRK'|'HTG'|'HUF'|'IDR'|'ILS'|'INR'|'ISK'|'JMD'|'JPY'|'KES'|'KHR'|'KRW'|'KYD'|'KZT'|'LBP'|'LKR'|'LTL'|'LVL'|'MAD'|'MNT'|'MOP'|'MUR'|'MVR'|'MXN'|'MYR'|'NAD'|'NGN'|'NIO'|'NOK'|'NZD'|'PAB'|'PEN'|'PHP'|'PKR'|'PLN'|'PYG'|'QAR'|'RON'|'RUB'|'SAR'|'SEK'|'SGD'|'SIT'|'SKK'|'THB'|'TND'|'TRY'|'TTD'|'TWD'|'TZS'|'UAH'|'USD'|'UYU'|'UZS'|'VND'|'XAF'|'XCD'|'XOF'|'XPF'|'ZAR'
            },
            'Codes': [
                {
                    'AwsAccountId': 'string',
                    'Value': {
                        'Amount': 'string',
                        'CurrencyCode': 'AED'|'AMD'|'ARS'|'AUD'|'AWG'|'AZN'|'BBD'|'BDT'|'BGN'|'BMD'|'BND'|'BOB'|'BRL'|'BSD'|'BYR'|'BZD'|'CAD'|'CHF'|'CLP'|'CNY'|'COP'|'CRC'|'CZK'|'DKK'|'DOP'|'EEK'|'EGP'|'EUR'|'GBP'|'GEL'|'GHS'|'GTQ'|'GYD'|'HKD'|'HNL'|'HRK'|'HTG'|'HUF'|'IDR'|'ILS'|'INR'|'ISK'|'JMD'|'JPY'|'KES'|'KHR'|'KRW'|'KYD'|'KZT'|'LBP'|'LKR'|'LTL'|'LVL'|'MAD'|'MNT'|'MOP'|'MUR'|'MVR'|'MXN'|'MYR'|'NAD'|'NGN'|'NIO'|'NOK'|'NZD'|'PAB'|'PEN'|'PHP'|'PKR'|'PLN'|'PYG'|'QAR'|'RON'|'RUB'|'SAR'|'SEK'|'SGD'|'SIT'|'SKK'|'THB'|'TND'|'TRY'|'TTD'|'TWD'|'TZS'|'UAH'|'USD'|'UYU'|'UZS'|'VND'|'XAF'|'XCD'|'XOF'|'XPF'|'ZAR'
                    },
                    'AwsCreditCode': 'string',
                    'Status': 'ACTIVE'|'INACTIVE'|'FULFILLED',
                    'IssuedAt': datetime(2015, 1, 1),
                    'ExpiresAt': datetime(2015, 1, 1)
                },
            ]
        },
        'AccessDetails': {
            'Description': 'string'
        }
    },
    'CreatedAt': datetime(2015, 1, 1),
    'UpdatedAt': datetime(2015, 1, 1),
    'StartsAt': datetime(2015, 1, 1),
    'ExpiresAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    • Id (string) –

      The unique identifier of the benefit allocation.

    • Catalog (string) –

      The catalog identifier that the benefit allocation belongs to.

    • Arn (string) –

      The Amazon Resource Name (ARN) of the benefit allocation.

    • Name (string) –

      The human-readable name of the benefit allocation.

    • Description (string) –

      A detailed description of the benefit allocation.

    • Status (string) –

      The current status of the benefit allocation (e.g., active, expired, consumed).

    • StatusReason (string) –

      Additional information explaining the current status of the benefit allocation.

    • BenefitApplicationId (string) –

      The identifier of the benefit application that resulted in this allocation.

    • BenefitId (string) –

      The identifier of the benefit that this allocation is based on.

    • FulfillmentType (string) –

      The fulfillment type used for this benefit allocation.

    • ApplicableBenefitIds (list) –

      A list of benefit identifiers that this allocation can be applied to.

      • (string) –

    • FulfillmentDetail (dict) –

      Detailed information about how the benefit allocation is fulfilled.

      Note

      This is a Tagged Union structure. Only one of the following top level keys will be set: DisbursementDetails, ConsumableDetails, CreditDetails, AccessDetails. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

      'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
      
      • DisbursementDetails (dict) –

        Details about disbursement-based fulfillment, if applicable to this benefit allocation.

        • DisbursedAmount (dict) –

          The total amount that has been disbursed for this benefit allocation.

          • Amount (string) –

            The numeric amount of the monetary value.

          • CurrencyCode (string) –

            The ISO 4217 currency code (e.g., USD, EUR) for the monetary amount.

        • IssuanceDetails (dict) –

          Detailed information about how the disbursement was issued and processed.

          • IssuanceId (string) –

            The unique identifier for this specific issuance.

          • IssuanceAmount (dict) –

            The monetary amount or value that was issued in this specific issuance.

            • Amount (string) –

              The numeric amount of the monetary value.

            • CurrencyCode (string) –

              The ISO 4217 currency code (e.g., USD, EUR) for the monetary amount.

          • IssuedAt (datetime) –

            The timestamp when this specific issuance was processed.

      • ConsumableDetails (dict) –

        Details about consumable-based fulfillment, if applicable to this benefit allocation.

        • AllocatedAmount (dict) –

          The total amount of the consumable benefit that has been allocated.

          • Amount (string) –

            The numeric amount of the monetary value.

          • CurrencyCode (string) –

            The ISO 4217 currency code (e.g., USD, EUR) for the monetary amount.

        • RemainingAmount (dict) –

          The remaining amount of the consumable benefit that is still available for use.

          • Amount (string) –

            The numeric amount of the monetary value.

          • CurrencyCode (string) –

            The ISO 4217 currency code (e.g., USD, EUR) for the monetary amount.

        • UtilizedAmount (dict) –

          The amount of the consumable benefit that has already been used.

          • Amount (string) –

            The numeric amount of the monetary value.

          • CurrencyCode (string) –

            The ISO 4217 currency code (e.g., USD, EUR) for the monetary amount.

        • IssuanceDetails (dict) –

          Detailed information about how the consumable benefit was issued and distributed.

          • IssuanceId (string) –

            The unique identifier for this specific issuance.

          • IssuanceAmount (dict) –

            The monetary amount or value that was issued in this specific issuance.

            • Amount (string) –

              The numeric amount of the monetary value.

            • CurrencyCode (string) –

              The ISO 4217 currency code (e.g., USD, EUR) for the monetary amount.

          • IssuedAt (datetime) –

            The timestamp when this specific issuance was processed.

      • CreditDetails (dict) –

        Details about credit-based fulfillment, if applicable to this benefit allocation.

        • AllocatedAmount (dict) –

          The total amount of credits that have been allocated for this benefit.

          • Amount (string) –

            The numeric amount of the monetary value.

          • CurrencyCode (string) –

            The ISO 4217 currency code (e.g., USD, EUR) for the monetary amount.

        • IssuedAmount (dict) –

          The amount of credits that have actually been issued and are available for use.

          • Amount (string) –

            The numeric amount of the monetary value.

          • CurrencyCode (string) –

            The ISO 4217 currency code (e.g., USD, EUR) for the monetary amount.

        • Codes (list) –

          A list of credit codes that have been generated for this benefit allocation.

          • (dict) –

            Represents an AWS credit code that can be applied to an AWS account for billing purposes.

            • AwsAccountId (string) –

              The AWS account ID that the credit code is associated with or can be applied to.

            • Value (dict) –

              The monetary value of the credit code.

              • Amount (string) –

                The numeric amount of the monetary value.

              • CurrencyCode (string) –

                The ISO 4217 currency code (e.g., USD, EUR) for the monetary amount.

            • AwsCreditCode (string) –

              The actual credit code string that can be redeemed in the AWS billing console.

            • Status (string) –

              The current status of the credit code (e.g., active, redeemed, expired).

            • IssuedAt (datetime) –

              The timestamp when the credit code was issued.

            • ExpiresAt (datetime) –

              The timestamp when the credit code expires and can no longer be redeemed.

      • AccessDetails (dict) –

        Details about access-based fulfillment, if applicable to this benefit allocation.

        • Description (string) –

          A description of the access privileges or permissions granted by this benefit.

    • CreatedAt (datetime) –

      The timestamp when the benefit allocation was created.

    • UpdatedAt (datetime) –

      The timestamp when the benefit allocation was last updated.

    • StartsAt (datetime) –

      The timestamp when the benefit allocation becomes active and usable.

    • ExpiresAt (datetime) –

      The timestamp when the benefit allocation expires and is no longer usable.

Exceptions

  • PartnerCentralBenefits.Client.exceptions.AccessDeniedException

  • PartnerCentralBenefits.Client.exceptions.ValidationException

  • PartnerCentralBenefits.Client.exceptions.InternalServerException

  • PartnerCentralBenefits.Client.exceptions.ResourceNotFoundException

  • PartnerCentralBenefits.Client.exceptions.ThrottlingException