AWS Cloud Map

2024/12/13 - AWS Cloud Map - 3 new api methods

Changes  AWS Cloud Map now supports service-level attributes, allowing you to associate custom metadata directly with services. These attributes can be retrieved, updated, and deleted using the new GetServiceAttributes, UpdateServiceAttributes, and DeleteServiceAttributes API calls.

DeleteServiceAttributes (new) Link ¶

Deletes specific attributes associated with a service.

See also: AWS API Documentation

Request Syntax

client.delete_service_attributes(
    ServiceId='string',
    Attributes=[
        'string',
    ]
)
type ServiceId:

string

param ServiceId:

[REQUIRED]

The ID of the service from which the attributes will be deleted.

type Attributes:

list

param Attributes:

[REQUIRED]

A list of keys corresponding to each attribute that you want to delete.

  • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

UpdateServiceAttributes (new) Link ¶

Submits a request to update a specified service to add service-level attributes.

See also: AWS API Documentation

Request Syntax

client.update_service_attributes(
    ServiceId='string',
    Attributes={
        'string': 'string'
    }
)
type ServiceId:

string

param ServiceId:

[REQUIRED]

The ID of the service that you want to update.

type Attributes:

dict

param Attributes:

[REQUIRED]

A string map that contains attribute key-value pairs.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

GetServiceAttributes (new) Link ¶

Returns the attributes associated with a specified service.

See also: AWS API Documentation

Request Syntax

client.get_service_attributes(
    ServiceId='string'
)
type ServiceId:

string

param ServiceId:

[REQUIRED]

The ID of the service that you want to get attributes for.

rtype:

dict

returns:

Response Syntax

{
    'ServiceAttributes': {
        'ServiceArn': 'string',
        'Attributes': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • ServiceAttributes (dict) --

      A complex type that contains the service ARN and a list of attribute key-value pairs associated with the service.

      • ServiceArn (string) --

        The ARN of the service that the attributes are associated with.

      • Attributes (dict) --

        A string map that contains the following information for the service that you specify in ServiceArn:

        • The attributes that apply to the service.

        • For each attribute, the applicable value.

        You can specify a total of 30 attributes.

        • (string) --

          • (string) --