APIPortal / Client / associate_managed_apis

associate_managed_apis

APIPortal.Client.associate_managed_apis(**kwargs)

Associate one or more Managed APIs with a product. Best-effort — IDs that fail are returned in {@link AssociateManagedApisResponse#failedItems}; IDs that succeed are omitted. Associating an already-associated Managed API is a no-op (not reported as failure).

See also: AWS API Documentation

Request Syntax

response = client.associate_managed_apis(
    productId='string',
    managedApiIds=[
        'string',
    ]
)
Parameters:
  • productId (string) –

    [REQUIRED]

    The identifier of the product to associate the Managed APIs with.

  • managedApiIds (list) –

    [REQUIRED]

    Bounded list of Managed API IDs, used as the request payload for batch associate/disassociate.

    • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'failedItems': [
        {
            'managedApiId': 'string',
            'errorCode': 'MANAGED_API_NOT_FOUND'|'INTERNAL_ERROR',
            'errorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • failedItems (list) –

      The Managed APIs that could not be processed. IDs not listed here succeeded.

      • (dict) –

        One entry per Managed API ID that could not be processed in a batch call. Ids that succeed are omitted from the response — callers infer success by absence.

        • managedApiId (string) –

          The identifier of the Managed API that could not be processed.

        • errorCode (string) –

          Machine-readable reason a Managed API ID couldn’t be processed in a batch call. Clients should key retry logic off this enum rather than parsing errorMessage.

        • errorMessage (string) –

          A description of the failure.

Exceptions

  • APIPortal.Client.exceptions.ResourceNotFoundException

  • APIPortal.Client.exceptions.LimitExceededException

  • APIPortal.Client.exceptions.BadRequestException

  • APIPortal.Client.exceptions.AccessDeniedException