Update Service
| servicediscovery_update_service | R Documentation | 
Submits a request to perform the following operations:¶
Description¶
Submits a request to perform the following operations:
- 
Update the TTL setting for existing DnsRecordsconfigurations
- 
Add, update, or delete HealthCheckConfigfor a specified serviceYou can't add, update, or delete a HealthCheckCustomConfigconfiguration.
For public and private DNS namespaces, note the following:
- 
If you omit any existing DnsRecordsorHealthCheckConfigconfigurations from anupdate_servicerequest, the configurations are deleted from the service.
- 
If you omit an existing HealthCheckCustomConfigconfiguration from anupdate_servicerequest, the configuration isn't deleted from the service.
When you update settings for a service, Cloud Map also updates the corresponding settings in all the records and health checks that were created by using the specified service.
Usage¶
servicediscovery_update_service(Id, Service)
Arguments¶
| Id | [required] The ID of the service that you want to update. | 
| Service | [required] A complex type that contains the new settings for the service. You can specify a maximum of 30 attributes (key-value pairs). | 
Value¶
A list with the following syntax:
list(
  OperationId = "string"
)
Request syntax¶
svc$update_service(
  Id = "string",
  Service = list(
    Description = "string",
    DnsConfig = list(
      DnsRecords = list(
        list(
          Type = "SRV"|"A"|"AAAA"|"CNAME",
          TTL = 123
        )
      )
    ),
    HealthCheckConfig = list(
      Type = "HTTP"|"HTTPS"|"TCP",
      ResourcePath = "string",
      FailureThreshold = 123
    )
  )
)
Examples¶
## Not run: 
# This example submits a request to replace the DnsConfig and
# HealthCheckConfig settings of a specified service.
svc$update_service(
  Id = "srv-e4anhexample0004",
  Service = list(
    DnsConfig = list(
      DnsRecords = list(
        list(
          TTL = 60L,
          Type = "A"
        )
      )
    ),
    HealthCheckConfig = list(
      FailureThreshold = 2L,
      ResourcePath = "/",
      Type = "HTTP"
    )
  )
)
## End(Not run)