public void ServiceDiscoveryCreateService() { #region example-create-service-1587235913584 var response = client.CreateService(new CreateServiceRequest { CreatorRequestId = "567c1193-6b00-4308-bd57-ad38a8822d25", DnsConfig = new DnsConfig { DnsRecords = new List <DnsRecord> { new DnsRecord { TTL = 60, Type = "A" } }, NamespaceId = "ns-ylexjili4cdxy3xm", RoutingPolicy = "MULTIVALUE" }, Name = "myservice", NamespaceId = "ns-ylexjili4cdxy3xm" }); Service service = response.Service; #endregion }
private Amazon.ServiceDiscovery.Model.CreateServiceResponse CallAWSServiceOperation(IAmazonServiceDiscovery client, Amazon.ServiceDiscovery.Model.CreateServiceRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Cloud Map", "CreateService"); try { #if DESKTOP return(client.CreateService(request)); #elif CORECLR return(client.CreateServiceAsync(request).GetAwaiter().GetResult()); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } }