AppFabric / Client / create_app_authorization

create_app_authorization#

AppFabric.Client.create_app_authorization(**kwargs)#

Creates an app authorization within an app bundle, which allows AppFabric to connect to an application.

See also: AWS API Documentation

Request Syntax

response = client.create_app_authorization(
    appBundleIdentifier='string',
    app='string',
    credential={
        'oauth2Credential': {
            'clientId': 'string',
            'clientSecret': 'string'
        },
        'apiKeyCredential': {
            'apiKey': 'string'
        }
    },
    tenant={
        'tenantIdentifier': 'string',
        'tenantDisplayName': 'string'
    },
    authType='oauth2'|'apiKey',
    clientToken='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters:
  • appBundleIdentifier (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of the app bundle to use for the request.

  • app (string) –

    [REQUIRED]

    The name of the application.

    Valid values are:

    • SLACK

    • ASANA

    • JIRA

    • M365

    • M365AUDITLOGS

    • ZOOM

    • ZENDESK

    • OKTA

    • GOOGLE

    • DROPBOX

    • SMARTSHEET

    • CISCO

  • credential (dict) –

    [REQUIRED]

    Contains credentials for the application, such as an API key or OAuth2 client ID and secret.

    Specify credentials that match the authorization type for your request. For example, if the authorization type for your request is OAuth2 ( oauth2), then you should provide only the OAuth2 credentials.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: oauth2Credential, apiKeyCredential.

    • oauth2Credential (dict) –

      Contains OAuth2 client credential information.

      • clientId (string) – [REQUIRED]

        The client ID of the client application.

      • clientSecret (string) – [REQUIRED]

        The client secret of the client application.

    • apiKeyCredential (dict) –

      Contains API key credential information.

      • apiKey (string) – [REQUIRED]

        An API key for an application.

  • tenant (dict) –

    [REQUIRED]

    Contains information about an application tenant, such as the application display name and identifier.

    • tenantIdentifier (string) – [REQUIRED]

      The ID of the application tenant.

    • tenantDisplayName (string) – [REQUIRED]

      The display name of the tenant.

  • authType (string) –

    [REQUIRED]

    The authorization type for the app authorization.

  • clientToken (string) –

    Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value.

    If you don’t provide this value, then Amazon Web Services generates a random one for you.

    If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

    This field is autopopulated if not provided.

  • tags (list) –

    A map of the key-value pairs of the tag or tags to assign to the resource.

    • (dict) –

      The key or keys of the key-value pairs for the tag or tags assigned to a resource.

      • key (string) – [REQUIRED]

        Tag key.

      • value (string) – [REQUIRED]

        Tag value.

Return type:

dict

Returns:

Response Syntax

{
    'appAuthorization': {
        'appAuthorizationArn': 'string',
        'appBundleArn': 'string',
        'app': 'string',
        'tenant': {
            'tenantIdentifier': 'string',
            'tenantDisplayName': 'string'
        },
        'authType': 'oauth2'|'apiKey',
        'status': 'PendingConnect'|'Connected'|'ConnectionValidationFailed'|'TokenAutoRotationFailed',
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'persona': 'admin'|'endUser',
        'authUrl': 'string'
    }
}

Response Structure

  • (dict) –

    • appAuthorization (dict) –

      Contains information about an app authorization.

      • appAuthorizationArn (string) –

        The Amazon Resource Name (ARN) of the app authorization.

      • appBundleArn (string) –

        The Amazon Resource Name (ARN) of the app bundle for the app authorization.

      • app (string) –

        The name of the application.

      • tenant (dict) –

        Contains information about an application tenant, such as the application display name and identifier.

        • tenantIdentifier (string) –

          The ID of the application tenant.

        • tenantDisplayName (string) –

          The display name of the tenant.

      • authType (string) –

        The authorization type.

      • status (string) –

        The state of the app authorization.

        The following states are possible:

        • PendingConnect: The initial state of the app authorization. The app authorization is created but not yet connected.

        • Connected: The app authorization is connected to the application, and is ready to be used.

        • ConnectionValidationFailed: The app authorization received a validation exception when trying to connect to the application. If the app authorization is in this state, you should verify the configured credentials and try to connect the app authorization again.

        • TokenAutoRotationFailed: AppFabric failed to refresh the access token. If the app authorization is in this state, you should try to reconnect the app authorization.

      • createdAt (datetime) –

        The timestamp of when the app authorization was created.

      • updatedAt (datetime) –

        The timestamp of when the app authorization was last updated.

      • persona (string) –

        The user persona of the app authorization.

        This field should always be admin.

      • authUrl (string) –

        The application URL for the OAuth flow.

Exceptions

  • AppFabric.Client.exceptions.InternalServerException

  • AppFabric.Client.exceptions.ServiceQuotaExceededException

  • AppFabric.Client.exceptions.ThrottlingException

  • AppFabric.Client.exceptions.ConflictException

  • AppFabric.Client.exceptions.ValidationException

  • AppFabric.Client.exceptions.ResourceNotFoundException

  • AppFabric.Client.exceptions.AccessDeniedException