Amazon CloudWatch Events

2021/03/04 - Amazon CloudWatch Events - 11 new api methods

Changes  Introducing support for EventBridge Api Destinations - any HTTP APIs as Targets, with managed authorization via EventBridge Connections.

DescribeApiDestination (new) Link ¶

Retrieves details about an API destination.

See also: AWS API Documentation

Request Syntax

client.describe_api_destination(
    Name='string'
)
type Name

string

param Name

[REQUIRED]

The name of the API destination to retrieve.

rtype

dict

returns

Response Syntax

{
    'ApiDestinationArn': 'string',
    'Name': 'string',
    'Description': 'string',
    'ApiDestinationState': 'ACTIVE'|'INACTIVE',
    'ConnectionArn': 'string',
    'InvocationEndpoint': 'string',
    'HttpMethod': 'POST'|'GET'|'HEAD'|'OPTIONS'|'PUT'|'PATCH'|'DELETE',
    'InvocationRateLimitPerSecond': 123,
    'CreationTime': datetime(2015, 1, 1),
    'LastModifiedTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • ApiDestinationArn (string) --

      The ARN of the API destination retrieved.

    • Name (string) --

      The name of the API destination retrieved.

    • Description (string) --

      The description for the API destination retrieved.

    • ApiDestinationState (string) --

      The state of the API destination retrieved.

    • ConnectionArn (string) --

      The ARN of the connection specified for the API destination retrieved.

    • InvocationEndpoint (string) --

      The URL to use to connect to the HTTP endpoint.

    • HttpMethod (string) --

      The method to use to connect to the HTTP endpoint.

    • InvocationRateLimitPerSecond (integer) --

      The maximum number of invocations per second to specified for the API destination. Note that if you set the invocation rate maximum to a value lower the rate necessary to send all events received on to the destination HTTP endpoint, some events may not be delivered within the 24-hour retry window. If you plan to set the rate lower than the rate necessary to deliver all events, consider using a dead-letter queue to catch events that are not delivered within 24 hours.

    • CreationTime (datetime) --

      A time stamp for the time that the API destination was created.

    • LastModifiedTime (datetime) --

      A time stamp for the time that the API destination was last modified.

DeleteConnection (new) Link ¶

Deletes a connection.

See also: AWS API Documentation

Request Syntax

client.delete_connection(
    Name='string'
)
type Name

string

param Name

[REQUIRED]

The name of the connection to delete.

rtype

dict

returns

Response Syntax

{
    'ConnectionArn': 'string',
    'ConnectionState': 'CREATING'|'UPDATING'|'DELETING'|'AUTHORIZED'|'DEAUTHORIZED'|'AUTHORIZING'|'DEAUTHORIZING',
    'CreationTime': datetime(2015, 1, 1),
    'LastModifiedTime': datetime(2015, 1, 1),
    'LastAuthorizedTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • ConnectionArn (string) --

      The ARN of the connection that was deleted.

    • ConnectionState (string) --

      The state of the connection before it was deleted.

    • CreationTime (datetime) --

      A time stamp for the time that the connection was created.

    • LastModifiedTime (datetime) --

      A time stamp for the time that the connection was last modified before it was deleted.

    • LastAuthorizedTime (datetime) --

      A time stamp for the time that the connection was last authorized before it wa deleted.

UpdateApiDestination (new) Link ¶

Updates an API destination.

See also: AWS API Documentation

Request Syntax

client.update_api_destination(
    Name='string',
    Description='string',
    ConnectionArn='string',
    InvocationEndpoint='string',
    HttpMethod='POST'|'GET'|'HEAD'|'OPTIONS'|'PUT'|'PATCH'|'DELETE',
    InvocationRateLimitPerSecond=123
)
type Name

string

param Name

[REQUIRED]

The name of the API destination to update.

type Description

string

param Description

The name of the API destination to update.

type ConnectionArn

string

param ConnectionArn

The ARN of the connection to use for the API destination.

type InvocationEndpoint

string

param InvocationEndpoint

The URL to the endpoint to use for the API destination.

type HttpMethod

string

param HttpMethod

The method to use for the API destination.

type InvocationRateLimitPerSecond

integer

param InvocationRateLimitPerSecond

The maximum number of invocations per second to send to the API destination.

rtype

dict

returns

Response Syntax

{
    'ApiDestinationArn': 'string',
    'ApiDestinationState': 'ACTIVE'|'INACTIVE',
    'CreationTime': datetime(2015, 1, 1),
    'LastModifiedTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • ApiDestinationArn (string) --

      The ARN of the API destination that was updated.

    • ApiDestinationState (string) --

      The state of the API destination that was updated.

    • CreationTime (datetime) --

      A time stamp for the time that the API destination was created.

    • LastModifiedTime (datetime) --

      A time stamp for the time that the API destination was last modified.

DescribeConnection (new) Link ¶

Retrieves details about a connection.

See also: AWS API Documentation

Request Syntax

client.describe_connection(
    Name='string'
)
type Name

string

param Name

[REQUIRED]

The name of the connection to retrieve.

rtype

dict

returns

Response Syntax

{
    'ConnectionArn': 'string',
    'Name': 'string',
    'Description': 'string',
    'ConnectionState': 'CREATING'|'UPDATING'|'DELETING'|'AUTHORIZED'|'DEAUTHORIZED'|'AUTHORIZING'|'DEAUTHORIZING',
    'StateReason': 'string',
    'AuthorizationType': 'BASIC'|'OAUTH_CLIENT_CREDENTIALS'|'API_KEY',
    'SecretArn': 'string',
    'AuthParameters': {
        'BasicAuthParameters': {
            'Username': 'string'
        },
        'OAuthParameters': {
            'ClientParameters': {
                'ClientID': 'string'
            },
            'AuthorizationEndpoint': 'string',
            'HttpMethod': 'GET'|'POST'|'PUT',
            'OAuthHttpParameters': {
                'HeaderParameters': [
                    {
                        'Key': 'string',
                        'Value': 'string',
                        'IsValueSecret': True|False
                    },
                ],
                'QueryStringParameters': [
                    {
                        'Key': 'string',
                        'Value': 'string',
                        'IsValueSecret': True|False
                    },
                ],
                'BodyParameters': [
                    {
                        'Key': 'string',
                        'Value': 'string',
                        'IsValueSecret': True|False
                    },
                ]
            }
        },
        'ApiKeyAuthParameters': {
            'ApiKeyName': 'string'
        },
        'InvocationHttpParameters': {
            'HeaderParameters': [
                {
                    'Key': 'string',
                    'Value': 'string',
                    'IsValueSecret': True|False
                },
            ],
            'QueryStringParameters': [
                {
                    'Key': 'string',
                    'Value': 'string',
                    'IsValueSecret': True|False
                },
            ],
            'BodyParameters': [
                {
                    'Key': 'string',
                    'Value': 'string',
                    'IsValueSecret': True|False
                },
            ]
        }
    },
    'CreationTime': datetime(2015, 1, 1),
    'LastModifiedTime': datetime(2015, 1, 1),
    'LastAuthorizedTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • ConnectionArn (string) --

      The ARN of the connection retrieved.

    • Name (string) --

      The name of the connection retrieved.

    • Description (string) --

      The description for the connection retrieved.

    • ConnectionState (string) --

      The state of the connection retrieved.

    • StateReason (string) --

      The reason that the connection is in the current connection state.

    • AuthorizationType (string) --

      The type of authorization specified for the connection.

    • SecretArn (string) --

      The ARN of the secret created from the authorization parameters specified for the connection.

    • AuthParameters (dict) --

      The parameters to use for authorization for the connection.

      • BasicAuthParameters (dict) --

        The authorization parameters for Basic authorization.

        • Username (string) --

          The user name to use for Basic authorization.

      • OAuthParameters (dict) --

        The OAuth parameters to use for authorization.

        • ClientParameters (dict) --

          A ConnectionOAuthClientResponseParameters object that contains details about the client parameters returned when OAuth is specified as the authorization type.

          • ClientID (string) --

            The client ID associated with the response to the connection request.

        • AuthorizationEndpoint (string) --

          The URL to the HTTP endpoint that authorized the request.

        • HttpMethod (string) --

          The method used to connect to the HTTP endpoint.

        • OAuthHttpParameters (dict) --

          The additional HTTP parameters used for the OAuth authorization request.

          • HeaderParameters (list) --

            Contains additional header parameters for the connection.

            • (dict) --

              Additional parameter included in the header. You can include up to 100 additional header parameters per request. An event payload cannot exceed 64 KB.

              • Key (string) --

                The key for the parameter.

              • Value (string) --

                The value associated with the key.

              • IsValueSecret (boolean) --

                Specified whether the value is a secret.

          • QueryStringParameters (list) --

            Contains additional query string parameters for the connection.

            • (dict) --

              Additional query string parameter for the connection. You can include up to 100 additional query string parameters per request. Each additional parameter counts towards the event payload size, which cannot exceed 64 KB.

              • Key (string) --

                The key for a query string parameter.

              • Value (string) --

                The value associated with the key for the query string parameter.

              • IsValueSecret (boolean) --

                Specifies whether the value is secret.

          • BodyParameters (list) --

            Contains additional body string parameters for the connection.

            • (dict) --

              Additional parameter included in the body. You can include up to 100 additional body parameters per request. An event payload cannot exceed 64 KB.

              • Key (string) --

                The key for the parameter.

              • Value (string) --

                The value associated with the key.

              • IsValueSecret (boolean) --

                Specified whether the value is secret.

      • ApiKeyAuthParameters (dict) --

        The API Key parameters to use for authorization.

        • ApiKeyName (string) --

          The name of the header to use for the APIKeyValue used for authorization.

      • InvocationHttpParameters (dict) --

        Additional parameters for the connection that are passed through with every invocation to the HTTP endpoint.

        • HeaderParameters (list) --

          Contains additional header parameters for the connection.

          • (dict) --

            Additional parameter included in the header. You can include up to 100 additional header parameters per request. An event payload cannot exceed 64 KB.

            • Key (string) --

              The key for the parameter.

            • Value (string) --

              The value associated with the key.

            • IsValueSecret (boolean) --

              Specified whether the value is a secret.

        • QueryStringParameters (list) --

          Contains additional query string parameters for the connection.

          • (dict) --

            Additional query string parameter for the connection. You can include up to 100 additional query string parameters per request. Each additional parameter counts towards the event payload size, which cannot exceed 64 KB.

            • Key (string) --

              The key for a query string parameter.

            • Value (string) --

              The value associated with the key for the query string parameter.

            • IsValueSecret (boolean) --

              Specifies whether the value is secret.

        • BodyParameters (list) --

          Contains additional body string parameters for the connection.

          • (dict) --

            Additional parameter included in the body. You can include up to 100 additional body parameters per request. An event payload cannot exceed 64 KB.

            • Key (string) --

              The key for the parameter.

            • Value (string) --

              The value associated with the key.

            • IsValueSecret (boolean) --

              Specified whether the value is secret.

    • CreationTime (datetime) --

      A time stamp for the time that the connection was created.

    • LastModifiedTime (datetime) --

      A time stamp for the time that the connection was last modified.

    • LastAuthorizedTime (datetime) --

      A time stamp for the time that the connection was last authorized.

ListConnections (new) Link ¶

Retrieves a list of connections from the account.

See also: AWS API Documentation

Request Syntax

client.list_connections(
    NamePrefix='string',
    ConnectionState='CREATING'|'UPDATING'|'DELETING'|'AUTHORIZED'|'DEAUTHORIZED'|'AUTHORIZING'|'DEAUTHORIZING',
    NextToken='string',
    Limit=123
)
type NamePrefix

string

param NamePrefix

A name prefix to filter results returned. Only connections with a name that starts with the prefix are returned.

type ConnectionState

string

param ConnectionState

The state of the connection.

type NextToken

string

param NextToken

The token returned by a previous call to retrieve the next set of results.

type Limit

integer

param Limit

The maximum number of connections to return.

rtype

dict

returns

Response Syntax

{
    'Connections': [
        {
            'ConnectionArn': 'string',
            'Name': 'string',
            'ConnectionState': 'CREATING'|'UPDATING'|'DELETING'|'AUTHORIZED'|'DEAUTHORIZED'|'AUTHORIZING'|'DEAUTHORIZING',
            'StateReason': 'string',
            'AuthorizationType': 'BASIC'|'OAUTH_CLIENT_CREDENTIALS'|'API_KEY',
            'CreationTime': datetime(2015, 1, 1),
            'LastModifiedTime': datetime(2015, 1, 1),
            'LastAuthorizedTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Connections (list) --

      An array of connections objects that include details about the connections.

      • (dict) --

        Contains information about a connection.

        • ConnectionArn (string) --

          The ARN of the connection.

        • Name (string) --

          The name of the connection.

        • ConnectionState (string) --

          The state of the connection.

        • StateReason (string) --

          The reason that the connection is in the connection state.

        • AuthorizationType (string) --

          The authorization type specified for the connection.

        • CreationTime (datetime) --

          A time stamp for the time that the connection was created.

        • LastModifiedTime (datetime) --

          A time stamp for the time that the connection was last modified.

        • LastAuthorizedTime (datetime) --

          A time stamp for the time that the connection was last authorized.

    • NextToken (string) --

      A token you can use in a subsequent request to retrieve the next set of results.

DeauthorizeConnection (new) Link ¶

Removes all authorization parameters from the connection. This lets you remove the secret from the connection so you can reuse it without having to create a new connection.

See also: AWS API Documentation

Request Syntax

client.deauthorize_connection(
    Name='string'
)
type Name

string

param Name

[REQUIRED]

The name of the connection to remove authorization from.

rtype

dict

returns

Response Syntax

{
    'ConnectionArn': 'string',
    'ConnectionState': 'CREATING'|'UPDATING'|'DELETING'|'AUTHORIZED'|'DEAUTHORIZED'|'AUTHORIZING'|'DEAUTHORIZING',
    'CreationTime': datetime(2015, 1, 1),
    'LastModifiedTime': datetime(2015, 1, 1),
    'LastAuthorizedTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • ConnectionArn (string) --

      The ARN of the connection that authorization was removed from.

    • ConnectionState (string) --

      The state of the connection.

    • CreationTime (datetime) --

      A time stamp for the time that the connection was created.

    • LastModifiedTime (datetime) --

      A time stamp for the time that the connection was last updated.

    • LastAuthorizedTime (datetime) --

      A time stamp for the time that the connection was last authorized.

CreateConnection (new) Link ¶

Creates a connection. A connection defines the authorization type and credentials to use for authorization with an API destination HTTP endpoint.

See also: AWS API Documentation

Request Syntax

client.create_connection(
    Name='string',
    Description='string',
    AuthorizationType='BASIC'|'OAUTH_CLIENT_CREDENTIALS'|'API_KEY',
    AuthParameters={
        'BasicAuthParameters': {
            'Username': 'string',
            'Password': 'string'
        },
        'OAuthParameters': {
            'ClientParameters': {
                'ClientID': 'string',
                'ClientSecret': 'string'
            },
            'AuthorizationEndpoint': 'string',
            'HttpMethod': 'GET'|'POST'|'PUT',
            'OAuthHttpParameters': {
                'HeaderParameters': [
                    {
                        'Key': 'string',
                        'Value': 'string',
                        'IsValueSecret': True|False
                    },
                ],
                'QueryStringParameters': [
                    {
                        'Key': 'string',
                        'Value': 'string',
                        'IsValueSecret': True|False
                    },
                ],
                'BodyParameters': [
                    {
                        'Key': 'string',
                        'Value': 'string',
                        'IsValueSecret': True|False
                    },
                ]
            }
        },
        'ApiKeyAuthParameters': {
            'ApiKeyName': 'string',
            'ApiKeyValue': 'string'
        },
        'InvocationHttpParameters': {
            'HeaderParameters': [
                {
                    'Key': 'string',
                    'Value': 'string',
                    'IsValueSecret': True|False
                },
            ],
            'QueryStringParameters': [
                {
                    'Key': 'string',
                    'Value': 'string',
                    'IsValueSecret': True|False
                },
            ],
            'BodyParameters': [
                {
                    'Key': 'string',
                    'Value': 'string',
                    'IsValueSecret': True|False
                },
            ]
        }
    }
)
type Name

string

param Name

[REQUIRED]

The name for the connection to create.

type Description

string

param Description

A description for the connection to create.

type AuthorizationType

string

param AuthorizationType

[REQUIRED]

The type of authorization to use for the connection.

type AuthParameters

dict

param AuthParameters

[REQUIRED]

A CreateConnectionAuthRequestParameters object that contains the authorization parameters to use to authorize with the endpoint.

  • BasicAuthParameters (dict) --

    A CreateConnectionBasicAuthRequestParameters object that contains the Basic authorization parameters to use for the connection.

    • Username (string) -- [REQUIRED]

      The user name to use for Basic authorization.

    • Password (string) -- [REQUIRED]

      The password associated with the user name to use for Basic authorization.

  • OAuthParameters (dict) --

    A CreateConnectionOAuthRequestParameters object that contains the OAuth authorization parameters to use for the connection.

    • ClientParameters (dict) -- [REQUIRED]

      A CreateConnectionOAuthClientRequestParameters object that contains the client parameters for OAuth authorization.

      • ClientID (string) -- [REQUIRED]

        The client ID to use for OAuth authorization for the connection.

      • ClientSecret (string) -- [REQUIRED]

        The client secret associated with the client ID to use for OAuth authorization for the connection.

    • AuthorizationEndpoint (string) -- [REQUIRED]

      The URL to the authorization endpoint when OAuth is specified as the authorization type.

    • HttpMethod (string) -- [REQUIRED]

      The method to use for the authorization request.

    • OAuthHttpParameters (dict) --

      A ConnectionHttpParameters object that contains details about the additional parameters to use for the connection.

      • HeaderParameters (list) --

        Contains additional header parameters for the connection.

        • (dict) --

          Additional parameter included in the header. You can include up to 100 additional header parameters per request. An event payload cannot exceed 64 KB.

          • Key (string) --

            The key for the parameter.

          • Value (string) --

            The value associated with the key.

          • IsValueSecret (boolean) --

            Specified whether the value is a secret.

      • QueryStringParameters (list) --

        Contains additional query string parameters for the connection.

        • (dict) --

          Additional query string parameter for the connection. You can include up to 100 additional query string parameters per request. Each additional parameter counts towards the event payload size, which cannot exceed 64 KB.

          • Key (string) --

            The key for a query string parameter.

          • Value (string) --

            The value associated with the key for the query string parameter.

          • IsValueSecret (boolean) --

            Specifies whether the value is secret.

      • BodyParameters (list) --

        Contains additional body string parameters for the connection.

        • (dict) --

          Additional parameter included in the body. You can include up to 100 additional body parameters per request. An event payload cannot exceed 64 KB.

          • Key (string) --

            The key for the parameter.

          • Value (string) --

            The value associated with the key.

          • IsValueSecret (boolean) --

            Specified whether the value is secret.

  • ApiKeyAuthParameters (dict) --

    A CreateConnectionApiKeyAuthRequestParameters object that contains the API key authorization parameters to use for the connection.

    • ApiKeyName (string) -- [REQUIRED]

      The name of the API key to use for authorization.

    • ApiKeyValue (string) -- [REQUIRED]

      The value for the API key to use for authorization.

  • InvocationHttpParameters (dict) --

    A ConnectionHttpParameters object that contains the API key authorization parameters to use for the connection. Note that if you include additional parameters for the target of a rule via HttpParameters , including query strings, the parameters added for the connection take precedence.

    • HeaderParameters (list) --

      Contains additional header parameters for the connection.

      • (dict) --

        Additional parameter included in the header. You can include up to 100 additional header parameters per request. An event payload cannot exceed 64 KB.

        • Key (string) --

          The key for the parameter.

        • Value (string) --

          The value associated with the key.

        • IsValueSecret (boolean) --

          Specified whether the value is a secret.

    • QueryStringParameters (list) --

      Contains additional query string parameters for the connection.

      • (dict) --

        Additional query string parameter for the connection. You can include up to 100 additional query string parameters per request. Each additional parameter counts towards the event payload size, which cannot exceed 64 KB.

        • Key (string) --

          The key for a query string parameter.

        • Value (string) --

          The value associated with the key for the query string parameter.

        • IsValueSecret (boolean) --

          Specifies whether the value is secret.

    • BodyParameters (list) --

      Contains additional body string parameters for the connection.

      • (dict) --

        Additional parameter included in the body. You can include up to 100 additional body parameters per request. An event payload cannot exceed 64 KB.

        • Key (string) --

          The key for the parameter.

        • Value (string) --

          The value associated with the key.

        • IsValueSecret (boolean) --

          Specified whether the value is secret.

rtype

dict

returns

Response Syntax

{
    'ConnectionArn': 'string',
    'ConnectionState': 'CREATING'|'UPDATING'|'DELETING'|'AUTHORIZED'|'DEAUTHORIZED'|'AUTHORIZING'|'DEAUTHORIZING',
    'CreationTime': datetime(2015, 1, 1),
    'LastModifiedTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • ConnectionArn (string) --

      The ARN of the connection that was created by the request.

    • ConnectionState (string) --

      The state of the connection that was created by the request.

    • CreationTime (datetime) --

      A time stamp for the time that the connection was created.

    • LastModifiedTime (datetime) --

      A time stamp for the time that the connection was last updated.

DeleteApiDestination (new) Link ¶

Deletes the specified API destination.

See also: AWS API Documentation

Request Syntax

client.delete_api_destination(
    Name='string'
)
type Name

string

param Name

[REQUIRED]

The name of the destination to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

UpdateConnection (new) Link ¶

Updates settings for a connection.

See also: AWS API Documentation

Request Syntax

client.update_connection(
    Name='string',
    Description='string',
    AuthorizationType='BASIC'|'OAUTH_CLIENT_CREDENTIALS'|'API_KEY',
    AuthParameters={
        'BasicAuthParameters': {
            'Username': 'string',
            'Password': 'string'
        },
        'OAuthParameters': {
            'ClientParameters': {
                'ClientID': 'string',
                'ClientSecret': 'string'
            },
            'AuthorizationEndpoint': 'string',
            'HttpMethod': 'GET'|'POST'|'PUT',
            'OAuthHttpParameters': {
                'HeaderParameters': [
                    {
                        'Key': 'string',
                        'Value': 'string',
                        'IsValueSecret': True|False
                    },
                ],
                'QueryStringParameters': [
                    {
                        'Key': 'string',
                        'Value': 'string',
                        'IsValueSecret': True|False
                    },
                ],
                'BodyParameters': [
                    {
                        'Key': 'string',
                        'Value': 'string',
                        'IsValueSecret': True|False
                    },
                ]
            }
        },
        'ApiKeyAuthParameters': {
            'ApiKeyName': 'string',
            'ApiKeyValue': 'string'
        },
        'InvocationHttpParameters': {
            'HeaderParameters': [
                {
                    'Key': 'string',
                    'Value': 'string',
                    'IsValueSecret': True|False
                },
            ],
            'QueryStringParameters': [
                {
                    'Key': 'string',
                    'Value': 'string',
                    'IsValueSecret': True|False
                },
            ],
            'BodyParameters': [
                {
                    'Key': 'string',
                    'Value': 'string',
                    'IsValueSecret': True|False
                },
            ]
        }
    }
)
type Name

string

param Name

[REQUIRED]

The name of the connection to update.

type Description

string

param Description

A description for the connection.

type AuthorizationType

string

param AuthorizationType

The type of authorization to use for the connection.

type AuthParameters

dict

param AuthParameters

The authorization parameters to use for the connection.

  • BasicAuthParameters (dict) --

    A UpdateConnectionBasicAuthRequestParameters object that contains the authorization parameters for Basic authorization.

    • Username (string) --

      The user name to use for Basic authorization.

    • Password (string) --

      The password associated with the user name to use for Basic authorization.

  • OAuthParameters (dict) --

    A UpdateConnectionOAuthRequestParameters object that contains the authorization parameters for OAuth authorization.

    • ClientParameters (dict) --

      A UpdateConnectionOAuthClientRequestParameters object that contains the client parameters to use for the connection when OAuth is specified as the authorization type.

      • ClientID (string) --

        The client ID to use for OAuth authorization.

      • ClientSecret (string) --

        The client secret assciated with the client ID to use for OAuth authorization.

    • AuthorizationEndpoint (string) --

      The URL to the authorization endpoint when OAuth is specified as the authorization type.

    • HttpMethod (string) --

      The method used to connect to the HTTP endpoint.

    • OAuthHttpParameters (dict) --

      The additional HTTP parameters used for the OAuth authorization request.

      • HeaderParameters (list) --

        Contains additional header parameters for the connection.

        • (dict) --

          Additional parameter included in the header. You can include up to 100 additional header parameters per request. An event payload cannot exceed 64 KB.

          • Key (string) --

            The key for the parameter.

          • Value (string) --

            The value associated with the key.

          • IsValueSecret (boolean) --

            Specified whether the value is a secret.

      • QueryStringParameters (list) --

        Contains additional query string parameters for the connection.

        • (dict) --

          Additional query string parameter for the connection. You can include up to 100 additional query string parameters per request. Each additional parameter counts towards the event payload size, which cannot exceed 64 KB.

          • Key (string) --

            The key for a query string parameter.

          • Value (string) --

            The value associated with the key for the query string parameter.

          • IsValueSecret (boolean) --

            Specifies whether the value is secret.

      • BodyParameters (list) --

        Contains additional body string parameters for the connection.

        • (dict) --

          Additional parameter included in the body. You can include up to 100 additional body parameters per request. An event payload cannot exceed 64 KB.

          • Key (string) --

            The key for the parameter.

          • Value (string) --

            The value associated with the key.

          • IsValueSecret (boolean) --

            Specified whether the value is secret.

  • ApiKeyAuthParameters (dict) --

    A UpdateConnectionApiKeyAuthRequestParameters object that contains the authorization parameters for API key authorization.

    • ApiKeyName (string) --

      The name of the API key to use for authorization.

    • ApiKeyValue (string) --

      The value associated with teh API key to use for authorization.

  • InvocationHttpParameters (dict) --

    A ConnectionHttpParameters object that contains the additional parameters to use for the connection.

    • HeaderParameters (list) --

      Contains additional header parameters for the connection.

      • (dict) --

        Additional parameter included in the header. You can include up to 100 additional header parameters per request. An event payload cannot exceed 64 KB.

        • Key (string) --

          The key for the parameter.

        • Value (string) --

          The value associated with the key.

        • IsValueSecret (boolean) --

          Specified whether the value is a secret.

    • QueryStringParameters (list) --

      Contains additional query string parameters for the connection.

      • (dict) --

        Additional query string parameter for the connection. You can include up to 100 additional query string parameters per request. Each additional parameter counts towards the event payload size, which cannot exceed 64 KB.

        • Key (string) --

          The key for a query string parameter.

        • Value (string) --

          The value associated with the key for the query string parameter.

        • IsValueSecret (boolean) --

          Specifies whether the value is secret.

    • BodyParameters (list) --

      Contains additional body string parameters for the connection.

      • (dict) --

        Additional parameter included in the body. You can include up to 100 additional body parameters per request. An event payload cannot exceed 64 KB.

        • Key (string) --

          The key for the parameter.

        • Value (string) --

          The value associated with the key.

        • IsValueSecret (boolean) --

          Specified whether the value is secret.

rtype

dict

returns

Response Syntax

{
    'ConnectionArn': 'string',
    'ConnectionState': 'CREATING'|'UPDATING'|'DELETING'|'AUTHORIZED'|'DEAUTHORIZED'|'AUTHORIZING'|'DEAUTHORIZING',
    'CreationTime': datetime(2015, 1, 1),
    'LastModifiedTime': datetime(2015, 1, 1),
    'LastAuthorizedTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • ConnectionArn (string) --

      The ARN of the connection that was updated.

    • ConnectionState (string) --

      The state of the connection that was updated.

    • CreationTime (datetime) --

      A time stamp for the time that the connection was created.

    • LastModifiedTime (datetime) --

      A time stamp for the time that the connection was last modified.

    • LastAuthorizedTime (datetime) --

      A time stamp for the time that the connection was last authorized.

CreateApiDestination (new) Link ¶

Creates an API destination, which is an HTTP invocation endpoint configured as a target for events.

See also: AWS API Documentation

Request Syntax

client.create_api_destination(
    Name='string',
    Description='string',
    ConnectionArn='string',
    InvocationEndpoint='string',
    HttpMethod='POST'|'GET'|'HEAD'|'OPTIONS'|'PUT'|'PATCH'|'DELETE',
    InvocationRateLimitPerSecond=123
)
type Name

string

param Name

[REQUIRED]

The name for the API destination to create.

type Description

string

param Description

A description for the API destination to create.

type ConnectionArn

string

param ConnectionArn

[REQUIRED]

The ARN of the connection to use for the API destination. The destination endpoint must support the authorization type specified for the connection.

type InvocationEndpoint

string

param InvocationEndpoint

[REQUIRED]

The URL to the HTTP invocation endpoint for the API destination.

type HttpMethod

string

param HttpMethod

[REQUIRED]

The method to use for the request to the HTTP invocation endpoint.

type InvocationRateLimitPerSecond

integer

param InvocationRateLimitPerSecond

The maximum number of requests per second to send to the HTTP invocation endpoint.

rtype

dict

returns

Response Syntax

{
    'ApiDestinationArn': 'string',
    'ApiDestinationState': 'ACTIVE'|'INACTIVE',
    'CreationTime': datetime(2015, 1, 1),
    'LastModifiedTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • ApiDestinationArn (string) --

      The ARN of the API destination that was created by the request.

    • ApiDestinationState (string) --

      The state of the API destination that was created by the request.

    • CreationTime (datetime) --

      A time stamp indicating the time that the API destination was created.

    • LastModifiedTime (datetime) --

      A time stamp indicating the time that the API destination was last modified.

ListApiDestinations (new) Link ¶

Retrieves a list of API destination in the account in the current Region.

See also: AWS API Documentation

Request Syntax

client.list_api_destinations(
    NamePrefix='string',
    ConnectionArn='string',
    NextToken='string',
    Limit=123
)
type NamePrefix

string

param NamePrefix

A name prefix to filter results returned. Only API destinations with a name that starts with the prefix are returned.

type ConnectionArn

string

param ConnectionArn

The ARN of the connection specified for the API destination.

type NextToken

string

param NextToken

The token returned by a previous call to retrieve the next set of results.

type Limit

integer

param Limit

The maximum number of API destinations to include in the response.

rtype

dict

returns

Response Syntax

{
    'ApiDestinations': [
        {
            'ApiDestinationArn': 'string',
            'Name': 'string',
            'ApiDestinationState': 'ACTIVE'|'INACTIVE',
            'ConnectionArn': 'string',
            'InvocationEndpoint': 'string',
            'HttpMethod': 'POST'|'GET'|'HEAD'|'OPTIONS'|'PUT'|'PATCH'|'DELETE',
            'InvocationRateLimitPerSecond': 123,
            'CreationTime': datetime(2015, 1, 1),
            'LastModifiedTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ApiDestinations (list) --

      An array of ApiDestination objects that include information about an API destination.

      • (dict) --

        Contains details about an API destination.

        • ApiDestinationArn (string) --

          The ARN of the API destination.

        • Name (string) --

          The name of the API destination.

        • ApiDestinationState (string) --

          The state of the API destination.

        • ConnectionArn (string) --

          The ARN of the connection specified for the API destination.

        • InvocationEndpoint (string) --

          The URL to the endpoint for the API destination.

        • HttpMethod (string) --

          The method to use to connect to the HTTP endpoint.

        • InvocationRateLimitPerSecond (integer) --

          The maximum number of invocations per second to send to the HTTP endpoint.

        • CreationTime (datetime) --

          A time stamp for the time that the API destination was created.

        • LastModifiedTime (datetime) --

          A time stamp for the time that the API destination was last modified.

    • NextToken (string) --

      A token you can use in a subsequent request to retrieve the next set of results.