AWS User Notifications Contacts

2024/11/22 - AWS User Notifications Contacts - 9 new api methods

Changes  This release adds support for AWS User Notifications Contacts. You can now configure and view email contacts for AWS User Notifications using the AWS SDK.

TagResource (new) Link ¶

Attaches a key-value pair to a resource, as identified by its Amazon Resource Name (ARN). Taggable resources in AWS User Notifications Contacts include email contacts.

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    arn='string',
    tags={
        'string': 'string'
    }
)
type arn:

string

param arn:

[REQUIRED]

The ARN of the configuration.

type tags:

dict

param tags:

[REQUIRED]

A list of tags to apply to the configuration.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

GetEmailContact (new) Link ¶

Returns an email contact.

See also: AWS API Documentation

Request Syntax

client.get_email_contact(
    arn='string'
)
type arn:

string

param arn:

[REQUIRED]

The Amazon Resource Name (ARN) of the email contact to get.

rtype:

dict

returns:

Response Syntax

{
    'emailContact': {
        'arn': 'string',
        'name': 'string',
        'address': 'string',
        'status': 'inactive'|'active',
        'creationTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • emailContact (dict) --

      The email contact for the provided email address.

      • arn (string) --

        The Amazon Resource Name (ARN) of the email contact.

      • name (string) --

        The name of the email contact.

      • address (string) --

        The email address this email contact points to. The activation email and any subscribed emails are sent here.

      • status (string) --

        The status of the email contact. Only activated email contacts receive emails.

      • creationTime (datetime) --

        The creation time of the resource.

      • updateTime (datetime) --

        The time the resource was last updated.

UntagResource (new) Link ¶

Detaches a key-value pair from a resource, as identified by its Amazon Resource Name (ARN). Taggable resources in AWS User Notifications Contacts include email contacts..

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    arn='string',
    tagKeys=[
        'string',
    ]
)
type arn:

string

param arn:

[REQUIRED]

The value of the resource that will have the tag removed. An Amazon Resource Name (ARN) is an identifier for a specific AWS resource, such as a server, user, or role.

type tagKeys:

list

param tagKeys:

[REQUIRED]

Specifies a list of tag keys that you want to remove from the specified resources.

  • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

ListEmailContacts (new) Link ¶

Lists all email contacts created under the Account.

See also: AWS API Documentation

Request Syntax

client.list_email_contacts(
    maxResults=123,
    nextToken='string'
)
type maxResults:

integer

param maxResults:

The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

type nextToken:

string

param nextToken:

An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.

rtype:

dict

returns:

Response Syntax

{
    'nextToken': 'string',
    'emailContacts': [
        {
            'arn': 'string',
            'name': 'string',
            'address': 'string',
            'status': 'inactive'|'active',
            'creationTime': datetime(2015, 1, 1),
            'updateTime': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.

    • emailContacts (list) --

      A list of email contacts.

      • (dict) --

        An email contact.

        • arn (string) --

          The Amazon Resource Name (ARN) of the email contact.

        • name (string) --

          The name of the email contact.

        • address (string) --

          The email address this email contact points to. The activation email and any subscribed emails are sent here.

        • status (string) --

          The status of the email contact. Only activated email contacts receive emails.

        • creationTime (datetime) --

          The creation time of the resource.

        • updateTime (datetime) --

          The time the resource was last updated.

CreateEmailContact (new) Link ¶

Creates an email contact for the provided email address.

See also: AWS API Documentation

Request Syntax

client.create_email_contact(
    name='string',
    emailAddress='string',
    tags={
        'string': 'string'
    }
)
type name:

string

param name:

[REQUIRED]

The name of the email contact.

type emailAddress:

string

param emailAddress:

[REQUIRED]

The email address this email contact points to. The activation email and any subscribed emails are sent here.

type tags:

dict

param tags:

A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'arn': 'string'
}

Response Structure

  • (dict) --

    • arn (string) --

      The Amazon Resource Name (ARN) of the resource.

DeleteEmailContact (new) Link ¶

Deletes an email contact.

See also: AWS API Documentation

Request Syntax

client.delete_email_contact(
    arn='string'
)
type arn:

string

param arn:

[REQUIRED]

The Amazon Resource Name (ARN) of the resource.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

ListTagsForResource (new) Link ¶

Lists all of the tags associated with the Amazon Resource Name (ARN) that you specify. The resource can be a user, server, or role.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    arn='string'
)
type arn:

string

param arn:

[REQUIRED]

The ARN you specified to list the tags of.

rtype:

dict

returns:

Response Syntax

{
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • tags (dict) --

      Key-value pairs that are assigned to a resource, usually for the purpose of grouping and searching for items. Tags are metadata that you define.

      • (string) --

        • (string) --

SendActivationCode (new) Link ¶

Sends an activation email to the email address associated with the specified email contact.

See also: AWS API Documentation

Request Syntax

client.send_activation_code(
    arn='string'
)
type arn:

string

param arn:

[REQUIRED]

The Amazon Resource Name (ARN) of the resource.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

ActivateEmailContact (new) Link ¶

Activates an email contact using an activation code. This code is in the activation email sent to the email address associated with this email contact.

See also: AWS API Documentation

Request Syntax

client.activate_email_contact(
    arn='string',
    code='string'
)
type arn:

string

param arn:

[REQUIRED]

The Amazon Resource Name (ARN) of the resource.

type code:

string

param code:

[REQUIRED]

The activation code for this email contact.

An email contact has a maximum of five activation attempts. Activation codes expire after 12 hours and are generated by the SendActivationCode API action.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --