ServiceDiscovery / Client / get_service_attributes

get_service_attributes

ServiceDiscovery.Client.get_service_attributes(**kwargs)

Returns the attributes associated with a specified service.

See also: AWS API Documentation

Request Syntax

response = client.get_service_attributes(
    ServiceId='string'
)
Parameters:

ServiceId (string) –

[REQUIRED]

The ID or Amazon Resource Name (ARN) of the service that you want to get attributes for. For services created in a namespace shared with your Amazon Web Services account, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.

Return type:

dict

Returns:

Response Syntax

{
    'ServiceAttributes': {
        'ServiceArn': 'string',
        'ResourceOwner': '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.

      • ResourceOwner (string) –

        The ID of the Amazon Web Services account that created the namespace with which the service is associated. If this isn’t your account ID, it is the ID of the account that shared the namespace with your account. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.

      • 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) –

Exceptions