public void ServiceDiscoveryGetNamespace()
        {
            #region getnamespace-example-1590115383708

            var response = client.GetNamespace(new GetNamespaceRequest
            {
                Id = "ns-e4anhexample0004"
            });

            Namespace awsNamespace = response.Namespace;

            #endregion
        }
Beispiel #2
0
 private Amazon.ServiceDiscovery.Model.GetNamespaceResponse CallAWSServiceOperation(IAmazonServiceDiscovery client, Amazon.ServiceDiscovery.Model.GetNamespaceRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Cloud Map", "GetNamespace");
     try
     {
         #if DESKTOP
         return(client.GetNamespace(request));
         #elif CORECLR
         return(client.GetNamespaceAsync(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;
     }
 }