service_attributes
Creates, updates, deletes, gets or lists a service_attributes resource.
Overview
| Name | service_attributes |
| Type | Resource |
| Id | aws.servicediscovery.service_attributes |
Fields
The following fields are returned by SELECT queries:
- get_service_attributes
| Name | Datatype | Description |
|---|---|---|
attributes | object | 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. |
resource_owner | 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. |
service_arn | string | The ARN of the service that the attributes are associated with. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_service_attributes | select | region | Returns the attributes associated with a specified service. | |
update_service_attributes | update | region, ServiceId, Attributes | Submits a request to update a specified service to add service-level attributes. | |
delete_service_attributes | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_service_attributes
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
- update_service_attributes
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
- delete_service_attributes
Deletes specific attributes associated with a service.
DELETE FROM aws.servicediscovery.service_attributes
WHERE region = '{{ region }}' --required
;