CloudWatchOmni / Client / update_integration

update_integration

CloudWatchOmni.Client.update_integration(**kwargs)

Updates an existing integration, identified by its id, ARN, or name. Only the fields you provide are changed.

See also: AWS API Documentation

Request Syntax

response = client.update_integration(
    identifier={
        'integrationId': 'string',
        'integrationArn': 'string',
        'integrationName': 'string'
    },
    credential={
        'oauthCodeCredential': {
            'authCode': 'string'
        },
        'oauthClientCredential': {
            'clientId': 'string',
            'clientSecret': 'string',
            'providerId': 'string'
        },
        'apiKeyCredential': {
            'apiKeyValue': 'string'
        }
    },
    integrationAttributes={
        'string': 'string'
    },
    roleArn='string'
)
Parameters:
  • identifier (dict) –

    [REQUIRED]

    Identifies the integration to update — exactly one of integrationId, integrationArn, or integrationName.

    Note

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

    • integrationId (string) –

      The unique identifier of the integration.

    • integrationArn (string) –

      The Amazon Resource Name of the integration.

    • integrationName (string) –

      The name of the integration; unique within the account.

  • credential (dict) –

    The replacement credential used to authenticate with the provider.

    Note

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

    • oauthCodeCredential (dict) –

      Credentials for an OAuth 2.0 authorization-code grant.

      • authCode (string) – [REQUIRED]

        The OAuth 2.0 authorization code returned by the external system’s authorization endpoint.

    • oauthClientCredential (dict) –

      Credentials for an OAuth 2.0 client-credentials grant.

      • clientId (string) – [REQUIRED]

        The OAuth 2.0 client identifier registered with the external system.

      • clientSecret (string) – [REQUIRED]

        The OAuth 2.0 client secret that pairs with the client identifier.

      • providerId (string) –

        The identifier of the OAuth provider that issued the client credentials.

    • apiKeyCredential (dict) –

      An API key credential.

      • apiKeyValue (string) – [REQUIRED]

        The API key value used to authenticate with the external system.

  • integrationAttributes (dict) –

    The provider-specific attributes to associate with the integration.

    • (string) –

      • (string) –

  • roleArn (string) – The Amazon Resource Name of the IAM role assumed to access the integration.

Return type:

dict

Returns:

Response Syntax

{
    'integration': {
        'integrationId': 'string',
        'integrationArn': 'string',
        'integrationType': 'AWS_CONFIG_SLREC'|'SLACK'|'EXTERNAL_AGENT'|'AWS_INTEGRATION',
        'name': 'string',
        'status': 'ACTIVE'|'DELETED'|'PENDING'|'PENDING_OAUTH'|'ERROR'|'FAILED',
        'authType': 'NONE'|'OAUTH2'|'API_KEY',
        'credentialArn': 'string',
        'roleArn': 'string',
        'integrationAttributes': {
            'string': 'string'
        },
        'authorizationUrl': 'string',
        'errorMessage': 'string',
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'scope': 'ACCOUNT'|'ORGANIZATION'
    }
}

Response Structure

  • (dict) –

    The response from updating an integration.

    • integration (dict) –

      The details of the updated integration. This is the same object returned by GetIntegration and CreateIntegration. Populated on a successful update; absent only if the post-update read-back of the resource did not complete.

      • integrationId (string) –

        The unique identifier of the integration.

      • integrationArn (string) –

        The Amazon Resource Name (ARN) of the integration.

      • integrationType (string) –

        The type of external system that an integration connects to, such as a source of configuration data, a messaging destination, or a model provider.

      • name (string) –

        The customer-provided name of the integration.

      • status (string) –

        The current lifecycle state of an integration.

      • authType (string) –

        The authentication method that an integration uses to connect to its external system.

      • credentialArn (string) –

        The Amazon Resource Name (ARN) of the secret that stores the integration’s credentials.

      • roleArn (string) –

        The Amazon Resource Name (ARN) of the IAM role that CloudWatch assumes to access the external system.

      • integrationAttributes (dict) –

        Provider-specific key/value attributes that configure the integration.

        • (string) –

          • (string) –

      • authorizationUrl (string) –

        The URL the customer visits to authorize the integration. Present while an OAuth authorization is pending.

      • errorMessage (string) –

        A human-readable description of why the integration is in an ERROR or FAILED state. Present only when the integration has failed.

      • createdAt (datetime) –

        The time at which the integration was created.

      • updatedAt (datetime) –

        The time at which the integration was last updated.

      • scope (string) –

        Whether this integration is account-scoped (ACCOUNT, customer-created) or organization-scoped (ORGANIZATION, created by an org-enablement rule). Absent on legacy records is treated as ACCOUNT.

Exceptions

  • CloudWatchOmni.Client.exceptions.ThrottlingException

  • CloudWatchOmni.Client.exceptions.ValidationException

  • CloudWatchOmni.Client.exceptions.ResourceNotFoundException

  • CloudWatchOmni.Client.exceptions.AccessDeniedException

  • CloudWatchOmni.Client.exceptions.InternalServerException