Skip to main content

service_attributes

Creates, updates, deletes, gets or lists a service_attributes resource.

Overview

Nameservice_attributes
TypeResource
Idaws.servicediscovery.service_attributes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
attributesobjectA 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.
resource_ownerstringThe 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.
service_arnstringThe ARN of the service that the attributes are associated with.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_service_attributesselectregionReturns the attributes associated with a specified service.
update_service_attributesupdateregion, ServiceId, AttributesSubmits a request to update a specified service to add service-level attributes.
delete_service_attributesdeleteregionDeletes specific attributes associated with a service.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns the attributes associated with a specified service.

SELECT
attributes,
resource_owner,
service_arn
FROM aws.servicediscovery.service_attributes
WHERE region = '{{ region }}' -- required
;

UPDATE examples

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

UPDATE aws.servicediscovery.service_attributes
SET
ServiceId = '{{ ServiceId }}',
Attributes = '{{ Attributes }}'
WHERE
region = '{{ region }}' --required
AND ServiceId = '{{ ServiceId }}' --required
AND Attributes = '{{ Attributes }}' --required;

DELETE examples

Deletes specific attributes associated with a service.

DELETE FROM aws.servicediscovery.service_attributes
WHERE region = '{{ region }}' --required
;