/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the servicediscovery-2017-03-14.normal.json service model. */ using System; using System.Runtime.ExceptionServices; using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using System.Net; using Amazon.ServiceDiscovery.Model; using Amazon.ServiceDiscovery.Model.Internal.MarshallTransformations; using Amazon.ServiceDiscovery.Internal; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Auth; using Amazon.Runtime.Internal.Transform; namespace Amazon.ServiceDiscovery { /// /// Implementation for accessing ServiceDiscovery /// /// Cloud Map /// /// With Cloud Map, you can configure public DNS, private DNS, or HTTP namespaces that /// your microservice applications run in. When an instance becomes available, you can /// call the Cloud Map API to register the instance with Cloud Map. For public or private /// DNS namespaces, Cloud Map automatically creates DNS records and an optional health /// check. Clients that submit public or private DNS queries, or HTTP requests, for the /// service receive an answer that contains up to eight healthy records. /// /// public partial class AmazonServiceDiscoveryClient : AmazonServiceClient, IAmazonServiceDiscovery { private static IServiceMetadata serviceMetadata = new AmazonServiceDiscoveryMetadata(); #region Constructors /// /// Constructs AmazonServiceDiscoveryClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// public AmazonServiceDiscoveryClient() : base(FallbackCredentialsFactory.GetCredentials(), new AmazonServiceDiscoveryConfig()) { } /// /// Constructs AmazonServiceDiscoveryClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// /// The region to connect. public AmazonServiceDiscoveryClient(RegionEndpoint region) : base(FallbackCredentialsFactory.GetCredentials(), new AmazonServiceDiscoveryConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonServiceDiscoveryClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// /// The AmazonServiceDiscoveryClient Configuration Object public AmazonServiceDiscoveryClient(AmazonServiceDiscoveryConfig config) : base(FallbackCredentialsFactory.GetCredentials(config), config){} /// /// Constructs AmazonServiceDiscoveryClient with AWS Credentials /// /// AWS Credentials public AmazonServiceDiscoveryClient(AWSCredentials credentials) : this(credentials, new AmazonServiceDiscoveryConfig()) { } /// /// Constructs AmazonServiceDiscoveryClient with AWS Credentials /// /// AWS Credentials /// The region to connect. public AmazonServiceDiscoveryClient(AWSCredentials credentials, RegionEndpoint region) : this(credentials, new AmazonServiceDiscoveryConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonServiceDiscoveryClient with AWS Credentials and an /// AmazonServiceDiscoveryClient Configuration object. /// /// AWS Credentials /// The AmazonServiceDiscoveryClient Configuration Object public AmazonServiceDiscoveryClient(AWSCredentials credentials, AmazonServiceDiscoveryConfig clientConfig) : base(credentials, clientConfig) { } /// /// Constructs AmazonServiceDiscoveryClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key public AmazonServiceDiscoveryClient(string awsAccessKeyId, string awsSecretAccessKey) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonServiceDiscoveryConfig()) { } /// /// Constructs AmazonServiceDiscoveryClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// The region to connect. public AmazonServiceDiscoveryClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonServiceDiscoveryConfig() {RegionEndpoint=region}) { } /// /// Constructs AmazonServiceDiscoveryClient with AWS Access Key ID, AWS Secret Key and an /// AmazonServiceDiscoveryClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// The AmazonServiceDiscoveryClient Configuration Object public AmazonServiceDiscoveryClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonServiceDiscoveryConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, clientConfig) { } /// /// Constructs AmazonServiceDiscoveryClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token public AmazonServiceDiscoveryClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonServiceDiscoveryConfig()) { } /// /// Constructs AmazonServiceDiscoveryClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The region to connect. public AmazonServiceDiscoveryClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonServiceDiscoveryConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonServiceDiscoveryClient with AWS Access Key ID, AWS Secret Key and an /// AmazonServiceDiscoveryClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The AmazonServiceDiscoveryClient Configuration Object public AmazonServiceDiscoveryClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonServiceDiscoveryConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig) { } #endregion #if AWS_ASYNC_ENUMERABLES_API private IServiceDiscoveryPaginatorFactory _paginators; /// /// Paginators for the service /// public IServiceDiscoveryPaginatorFactory Paginators { get { if (this._paginators == null) { this._paginators = new ServiceDiscoveryPaginatorFactory(this); } return this._paginators; } } #endif #region Overrides /// /// Creates the signer for the service. /// protected override AbstractAWSSigner CreateSigner() { return new AWS4Signer(); } /// /// Customizes the runtime pipeline. /// /// Runtime pipeline for the current client. protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline) { pipeline.RemoveHandler(); pipeline.AddHandlerAfter(new AmazonServiceDiscoveryEndpointResolver()); } /// /// Capture metadata for the service. /// protected override IServiceMetadata ServiceMetadata { get { return serviceMetadata; } } #endregion #region Dispose /// /// Disposes the service client. /// protected override void Dispose(bool disposing) { base.Dispose(disposing); } #endregion #region CreateHttpNamespace internal virtual CreateHttpNamespaceResponse CreateHttpNamespace(CreateHttpNamespaceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = CreateHttpNamespaceRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateHttpNamespaceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Creates an HTTP namespace. Service instances registered using an HTTP namespace can /// be discovered using a DiscoverInstances request but can't be discovered /// using DNS. /// /// /// /// For the current quota on the number of namespaces that you can create using the same /// Amazon Web Services account, see Cloud /// Map quotas in the Cloud Map Developer Guide. /// /// /// Container for the necessary parameters to execute the CreateHttpNamespace service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the CreateHttpNamespace service method, as returned by ServiceDiscovery. /// /// The operation is already in progress. /// /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// The namespace that you're trying to create already exists. /// /// /// The resource can't be created because you've reached the quota on the number of resources. /// /// /// The list of tags on the resource is over the quota. The maximum number of tags that /// can be applied to a resource is 50. /// /// REST API Reference for CreateHttpNamespace Operation public virtual Task CreateHttpNamespaceAsync(CreateHttpNamespaceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = CreateHttpNamespaceRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateHttpNamespaceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region CreatePrivateDnsNamespace internal virtual CreatePrivateDnsNamespaceResponse CreatePrivateDnsNamespace(CreatePrivateDnsNamespaceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = CreatePrivateDnsNamespaceRequestMarshaller.Instance; options.ResponseUnmarshaller = CreatePrivateDnsNamespaceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Creates a private namespace based on DNS, which is visible only inside a specified /// Amazon VPC. The namespace defines your service naming scheme. For example, if you /// name your namespace example.com and name your service backend, /// the resulting DNS name for the service is backend.example.com. Service /// instances that are registered using a private DNS namespace can be discovered using /// either a DiscoverInstances request or using DNS. For the current quota /// on the number of namespaces that you can create using the same Amazon Web Services /// account, see Cloud /// Map quotas in the Cloud Map Developer Guide. /// /// Container for the necessary parameters to execute the CreatePrivateDnsNamespace service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the CreatePrivateDnsNamespace service method, as returned by ServiceDiscovery. /// /// The operation is already in progress. /// /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// The namespace that you're trying to create already exists. /// /// /// The resource can't be created because you've reached the quota on the number of resources. /// /// /// The list of tags on the resource is over the quota. The maximum number of tags that /// can be applied to a resource is 50. /// /// REST API Reference for CreatePrivateDnsNamespace Operation public virtual Task CreatePrivateDnsNamespaceAsync(CreatePrivateDnsNamespaceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = CreatePrivateDnsNamespaceRequestMarshaller.Instance; options.ResponseUnmarshaller = CreatePrivateDnsNamespaceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region CreatePublicDnsNamespace internal virtual CreatePublicDnsNamespaceResponse CreatePublicDnsNamespace(CreatePublicDnsNamespaceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = CreatePublicDnsNamespaceRequestMarshaller.Instance; options.ResponseUnmarshaller = CreatePublicDnsNamespaceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Creates a public namespace based on DNS, which is visible on the internet. The namespace /// defines your service naming scheme. For example, if you name your namespace example.com /// and name your service backend, the resulting DNS name for the service /// is backend.example.com. You can discover instances that were registered /// with a public DNS namespace by using either a DiscoverInstances request /// or using DNS. For the current quota on the number of namespaces that you can create /// using the same Amazon Web Services account, see Cloud /// Map quotas in the Cloud Map Developer Guide. /// /// /// /// The CreatePublicDnsNamespace API operation is not supported in the Amazon /// Web Services GovCloud (US) Regions. /// /// /// /// Container for the necessary parameters to execute the CreatePublicDnsNamespace service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the CreatePublicDnsNamespace service method, as returned by ServiceDiscovery. /// /// The operation is already in progress. /// /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// The namespace that you're trying to create already exists. /// /// /// The resource can't be created because you've reached the quota on the number of resources. /// /// /// The list of tags on the resource is over the quota. The maximum number of tags that /// can be applied to a resource is 50. /// /// REST API Reference for CreatePublicDnsNamespace Operation public virtual Task CreatePublicDnsNamespaceAsync(CreatePublicDnsNamespaceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = CreatePublicDnsNamespaceRequestMarshaller.Instance; options.ResponseUnmarshaller = CreatePublicDnsNamespaceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region CreateService internal virtual CreateServiceResponse CreateService(CreateServiceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = CreateServiceRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateServiceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Creates a service. This action defines the configuration for the following entities: /// ///
  • /// /// For public and private DNS namespaces, one of the following combinations of DNS records /// in Amazon Route 53: /// ///
    • /// /// A /// ///
    • /// /// AAAA /// ///
    • /// /// A and AAAA /// ///
    • /// /// SRV /// ///
    • /// /// CNAME /// ///
  • /// /// Optionally, a health check /// ///
/// /// After you create the service, you can submit a RegisterInstance /// request, and Cloud Map uses the values in the configuration to create the specified /// entities. /// /// /// /// For the current quota on the number of instances that you can register using the same /// namespace and using the same service, see Cloud /// Map quotas in the Cloud Map Developer Guide. /// ///
/// Container for the necessary parameters to execute the CreateService service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the CreateService service method, as returned by ServiceDiscovery. /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// No namespace exists with the specified ID. /// /// /// The resource can't be created because you've reached the quota on the number of resources. /// /// /// The service can't be created because a service with the same name already exists. /// /// /// The list of tags on the resource is over the quota. The maximum number of tags that /// can be applied to a resource is 50. /// /// REST API Reference for CreateService Operation public virtual Task CreateServiceAsync(CreateServiceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = CreateServiceRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateServiceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DeleteNamespace internal virtual DeleteNamespaceResponse DeleteNamespace(DeleteNamespaceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteNamespaceRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteNamespaceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Deletes a namespace from the current account. If the namespace still contains one /// or more services, the request fails. /// /// Container for the necessary parameters to execute the DeleteNamespace service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DeleteNamespace service method, as returned by ServiceDiscovery. /// /// The operation is already in progress. /// /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// No namespace exists with the specified ID. /// /// /// The specified resource can't be deleted because it contains other resources. For example, /// you can't delete a service that contains any instances. /// /// REST API Reference for DeleteNamespace Operation public virtual Task DeleteNamespaceAsync(DeleteNamespaceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteNamespaceRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteNamespaceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DeleteService internal virtual DeleteServiceResponse DeleteService(DeleteServiceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteServiceRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteServiceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Deletes a specified service. If the service still contains one or more registered /// instances, the request fails. /// /// Container for the necessary parameters to execute the DeleteService service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DeleteService service method, as returned by ServiceDiscovery. /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// The specified resource can't be deleted because it contains other resources. For example, /// you can't delete a service that contains any instances. /// /// /// No service exists with the specified ID. /// /// REST API Reference for DeleteService Operation public virtual Task DeleteServiceAsync(DeleteServiceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteServiceRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteServiceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DeregisterInstance internal virtual DeregisterInstanceResponse DeregisterInstance(DeregisterInstanceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DeregisterInstanceRequestMarshaller.Instance; options.ResponseUnmarshaller = DeregisterInstanceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Deletes the Amazon Route 53 DNS records and health check, if any, that Cloud Map created /// for the specified instance. /// /// Container for the necessary parameters to execute the DeregisterInstance service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DeregisterInstance service method, as returned by ServiceDiscovery. /// /// The operation is already in progress. /// /// /// No instance exists with the specified ID, or the instance was recently registered, /// and information about the instance hasn't propagated yet. /// /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// The specified resource can't be deleted because it contains other resources. For example, /// you can't delete a service that contains any instances. /// /// /// No service exists with the specified ID. /// /// REST API Reference for DeregisterInstance Operation public virtual Task DeregisterInstanceAsync(DeregisterInstanceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DeregisterInstanceRequestMarshaller.Instance; options.ResponseUnmarshaller = DeregisterInstanceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DiscoverInstances internal virtual DiscoverInstancesResponse DiscoverInstances(DiscoverInstancesRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DiscoverInstancesRequestMarshaller.Instance; options.ResponseUnmarshaller = DiscoverInstancesResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Discovers registered instances for a specified namespace and service. You can use /// DiscoverInstances to discover instances for any type of namespace. For /// public and private DNS namespaces, you can also use DNS queries to discover instances. /// /// Container for the necessary parameters to execute the DiscoverInstances service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DiscoverInstances service method, as returned by ServiceDiscovery. /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// No namespace exists with the specified ID. /// /// /// The operation can't be completed because you've reached the quota for the number of /// requests. For more information, see Cloud /// Map API request throttling quota in the Cloud Map Developer Guide. /// /// /// No service exists with the specified ID. /// /// REST API Reference for DiscoverInstances Operation public virtual Task DiscoverInstancesAsync(DiscoverInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DiscoverInstancesRequestMarshaller.Instance; options.ResponseUnmarshaller = DiscoverInstancesResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region GetInstance internal virtual GetInstanceResponse GetInstance(GetInstanceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetInstanceRequestMarshaller.Instance; options.ResponseUnmarshaller = GetInstanceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Gets information about a specified instance. /// /// Container for the necessary parameters to execute the GetInstance service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the GetInstance service method, as returned by ServiceDiscovery. /// /// No instance exists with the specified ID, or the instance was recently registered, /// and information about the instance hasn't propagated yet. /// /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// No service exists with the specified ID. /// /// REST API Reference for GetInstance Operation public virtual Task GetInstanceAsync(GetInstanceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = GetInstanceRequestMarshaller.Instance; options.ResponseUnmarshaller = GetInstanceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region GetInstancesHealthStatus internal virtual GetInstancesHealthStatusResponse GetInstancesHealthStatus(GetInstancesHealthStatusRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetInstancesHealthStatusRequestMarshaller.Instance; options.ResponseUnmarshaller = GetInstancesHealthStatusResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Gets the current health status (Healthy, Unhealthy, or Unknown) /// of one or more instances that are associated with a specified service. /// /// /// /// There's a brief delay between when you register an instance and when the health status /// for the instance is available. /// /// /// /// Container for the necessary parameters to execute the GetInstancesHealthStatus service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the GetInstancesHealthStatus service method, as returned by ServiceDiscovery. /// /// No instance exists with the specified ID, or the instance was recently registered, /// and information about the instance hasn't propagated yet. /// /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// No service exists with the specified ID. /// /// REST API Reference for GetInstancesHealthStatus Operation public virtual Task GetInstancesHealthStatusAsync(GetInstancesHealthStatusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = GetInstancesHealthStatusRequestMarshaller.Instance; options.ResponseUnmarshaller = GetInstancesHealthStatusResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region GetNamespace internal virtual GetNamespaceResponse GetNamespace(GetNamespaceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetNamespaceRequestMarshaller.Instance; options.ResponseUnmarshaller = GetNamespaceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Gets information about a namespace. /// /// Container for the necessary parameters to execute the GetNamespace service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the GetNamespace service method, as returned by ServiceDiscovery. /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// No namespace exists with the specified ID. /// /// REST API Reference for GetNamespace Operation public virtual Task GetNamespaceAsync(GetNamespaceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = GetNamespaceRequestMarshaller.Instance; options.ResponseUnmarshaller = GetNamespaceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region GetOperation internal virtual GetOperationResponse GetOperation(GetOperationRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetOperationRequestMarshaller.Instance; options.ResponseUnmarshaller = GetOperationResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Gets information about any operation that returns an operation ID in the response, /// such as a CreateService request. /// /// /// /// To get a list of operations that match specified criteria, see ListOperations. /// /// /// /// Container for the necessary parameters to execute the GetOperation service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the GetOperation service method, as returned by ServiceDiscovery. /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// No operation exists with the specified ID. /// /// REST API Reference for GetOperation Operation public virtual Task GetOperationAsync(GetOperationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = GetOperationRequestMarshaller.Instance; options.ResponseUnmarshaller = GetOperationResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region GetService internal virtual GetServiceResponse GetService(GetServiceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetServiceRequestMarshaller.Instance; options.ResponseUnmarshaller = GetServiceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Gets the settings for a specified service. /// /// Container for the necessary parameters to execute the GetService service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the GetService service method, as returned by ServiceDiscovery. /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// No service exists with the specified ID. /// /// REST API Reference for GetService Operation public virtual Task GetServiceAsync(GetServiceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = GetServiceRequestMarshaller.Instance; options.ResponseUnmarshaller = GetServiceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListInstances internal virtual ListInstancesResponse ListInstances(ListInstancesRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListInstancesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListInstancesResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Lists summary information about the instances that you registered by using a specified /// service. /// /// Container for the necessary parameters to execute the ListInstances service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListInstances service method, as returned by ServiceDiscovery. /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// No service exists with the specified ID. /// /// REST API Reference for ListInstances Operation public virtual Task ListInstancesAsync(ListInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListInstancesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListInstancesResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListNamespaces internal virtual ListNamespacesResponse ListNamespaces(ListNamespacesRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListNamespacesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListNamespacesResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Lists summary information about the namespaces that were created by the current Amazon /// Web Services account. /// /// Container for the necessary parameters to execute the ListNamespaces service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListNamespaces service method, as returned by ServiceDiscovery. /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// REST API Reference for ListNamespaces Operation public virtual Task ListNamespacesAsync(ListNamespacesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListNamespacesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListNamespacesResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListOperations internal virtual ListOperationsResponse ListOperations(ListOperationsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListOperationsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListOperationsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Lists operations that match the criteria that you specify. /// /// Container for the necessary parameters to execute the ListOperations service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListOperations service method, as returned by ServiceDiscovery. /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// REST API Reference for ListOperations Operation public virtual Task ListOperationsAsync(ListOperationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListOperationsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListOperationsResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListServices internal virtual ListServicesResponse ListServices(ListServicesRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListServicesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListServicesResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Lists summary information for all the services that are associated with one or more /// specified namespaces. /// /// Container for the necessary parameters to execute the ListServices service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListServices service method, as returned by ServiceDiscovery. /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// REST API Reference for ListServices Operation public virtual Task ListServicesAsync(ListServicesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListServicesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListServicesResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListTagsForResource internal virtual ListTagsForResourceResponse ListTagsForResource(ListTagsForResourceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Lists tags for the specified resource. /// /// Container for the necessary parameters to execute the ListTagsForResource service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListTagsForResource service method, as returned by ServiceDiscovery. /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// The operation can't be completed because the resource was not found. /// /// REST API Reference for ListTagsForResource Operation public virtual Task ListTagsForResourceAsync(ListTagsForResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region RegisterInstance internal virtual RegisterInstanceResponse RegisterInstance(RegisterInstanceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = RegisterInstanceRequestMarshaller.Instance; options.ResponseUnmarshaller = RegisterInstanceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Creates or updates one or more records and, optionally, creates a health check based /// on the settings in a specified service. When you submit a RegisterInstance /// request, the following occurs: /// ///
  • /// /// For each DNS record that you define in the service that's specified by ServiceId, /// a record is created or updated in the hosted zone that's associated with the corresponding /// namespace. /// ///
  • /// /// If the service includes HealthCheckConfig, a health check is created /// based on the settings in the health check configuration. /// ///
  • /// /// The health check, if any, is associated with each of the new or updated records. /// ///
/// /// One RegisterInstance request must complete before you can submit another /// request and specify the same service ID and instance ID. /// /// /// /// For more information, see CreateService. /// /// /// /// When Cloud Map receives a DNS query for the specified DNS name, it returns the applicable /// value: /// ///
  • /// /// If the health check is healthy: returns all the records /// ///
  • /// /// If the health check is unhealthy: returns the applicable value for the last /// healthy instance /// ///
  • /// /// If you didn't specify a health check configuration: returns all the records /// ///
/// /// For the current quota on the number of instances that you can register using the same /// namespace and using the same service, see Cloud /// Map quotas in the Cloud Map Developer Guide. /// ///
/// Container for the necessary parameters to execute the RegisterInstance service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the RegisterInstance service method, as returned by ServiceDiscovery. /// /// The operation is already in progress. /// /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// The specified resource can't be deleted because it contains other resources. For example, /// you can't delete a service that contains any instances. /// /// /// The resource can't be created because you've reached the quota on the number of resources. /// /// /// No service exists with the specified ID. /// /// REST API Reference for RegisterInstance Operation public virtual Task RegisterInstanceAsync(RegisterInstanceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = RegisterInstanceRequestMarshaller.Instance; options.ResponseUnmarshaller = RegisterInstanceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region TagResource internal virtual TagResourceResponse TagResource(TagResourceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = TagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Adds one or more tags to the specified resource. /// /// Container for the necessary parameters to execute the TagResource service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the TagResource service method, as returned by ServiceDiscovery. /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// The operation can't be completed because the resource was not found. /// /// /// The list of tags on the resource is over the quota. The maximum number of tags that /// can be applied to a resource is 50. /// /// REST API Reference for TagResource Operation public virtual Task TagResourceAsync(TagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = TagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region UntagResource internal virtual UntagResourceResponse UntagResource(UntagResourceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UntagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Removes one or more tags from the specified resource. /// /// Container for the necessary parameters to execute the UntagResource service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the UntagResource service method, as returned by ServiceDiscovery. /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// The operation can't be completed because the resource was not found. /// /// REST API Reference for UntagResource Operation public virtual Task UntagResourceAsync(UntagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UntagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region UpdateHttpNamespace internal virtual UpdateHttpNamespaceResponse UpdateHttpNamespace(UpdateHttpNamespaceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateHttpNamespaceRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateHttpNamespaceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Updates an HTTP namespace. /// /// Container for the necessary parameters to execute the UpdateHttpNamespace service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the UpdateHttpNamespace service method, as returned by ServiceDiscovery. /// /// The operation is already in progress. /// /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// No namespace exists with the specified ID. /// /// /// The specified resource can't be deleted because it contains other resources. For example, /// you can't delete a service that contains any instances. /// /// REST API Reference for UpdateHttpNamespace Operation public virtual Task UpdateHttpNamespaceAsync(UpdateHttpNamespaceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateHttpNamespaceRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateHttpNamespaceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region UpdateInstanceCustomHealthStatus internal virtual UpdateInstanceCustomHealthStatusResponse UpdateInstanceCustomHealthStatus(UpdateInstanceCustomHealthStatusRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateInstanceCustomHealthStatusRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateInstanceCustomHealthStatusResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Submits a request to change the health status of a custom health check to healthy /// or unhealthy. /// /// /// /// You can use UpdateInstanceCustomHealthStatus to change the status only /// for custom health checks, which you define using HealthCheckCustomConfig /// when you create a service. You can't use it to change the status for Route 53 health /// checks, which you define using HealthCheckConfig. /// /// /// /// For more information, see HealthCheckCustomConfig. /// /// /// Container for the necessary parameters to execute the UpdateInstanceCustomHealthStatus service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the UpdateInstanceCustomHealthStatus service method, as returned by ServiceDiscovery. /// /// The health check for the instance that's specified by ServiceId and InstanceId /// isn't a custom health check. /// /// /// No instance exists with the specified ID, or the instance was recently registered, /// and information about the instance hasn't propagated yet. /// /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// No service exists with the specified ID. /// /// REST API Reference for UpdateInstanceCustomHealthStatus Operation public virtual Task UpdateInstanceCustomHealthStatusAsync(UpdateInstanceCustomHealthStatusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateInstanceCustomHealthStatusRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateInstanceCustomHealthStatusResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region UpdatePrivateDnsNamespace internal virtual UpdatePrivateDnsNamespaceResponse UpdatePrivateDnsNamespace(UpdatePrivateDnsNamespaceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UpdatePrivateDnsNamespaceRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdatePrivateDnsNamespaceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Updates a private DNS namespace. /// /// Container for the necessary parameters to execute the UpdatePrivateDnsNamespace service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the UpdatePrivateDnsNamespace service method, as returned by ServiceDiscovery. /// /// The operation is already in progress. /// /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// No namespace exists with the specified ID. /// /// /// The specified resource can't be deleted because it contains other resources. For example, /// you can't delete a service that contains any instances. /// /// REST API Reference for UpdatePrivateDnsNamespace Operation public virtual Task UpdatePrivateDnsNamespaceAsync(UpdatePrivateDnsNamespaceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UpdatePrivateDnsNamespaceRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdatePrivateDnsNamespaceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region UpdatePublicDnsNamespace internal virtual UpdatePublicDnsNamespaceResponse UpdatePublicDnsNamespace(UpdatePublicDnsNamespaceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UpdatePublicDnsNamespaceRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdatePublicDnsNamespaceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Updates a public DNS namespace. /// /// Container for the necessary parameters to execute the UpdatePublicDnsNamespace service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the UpdatePublicDnsNamespace service method, as returned by ServiceDiscovery. /// /// The operation is already in progress. /// /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// No namespace exists with the specified ID. /// /// /// The specified resource can't be deleted because it contains other resources. For example, /// you can't delete a service that contains any instances. /// /// REST API Reference for UpdatePublicDnsNamespace Operation public virtual Task UpdatePublicDnsNamespaceAsync(UpdatePublicDnsNamespaceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UpdatePublicDnsNamespaceRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdatePublicDnsNamespaceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region UpdateService internal virtual UpdateServiceResponse UpdateService(UpdateServiceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateServiceRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateServiceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Submits a request to perform the following operations: /// ///
  • /// /// Update the TTL setting for existing DnsRecords configurations /// ///
  • /// /// Add, update, or delete HealthCheckConfig for a specified service /// /// /// /// You can't add, update, or delete a HealthCheckCustomConfig configuration. /// ///
/// /// For public and private DNS namespaces, note the following: /// ///
  • /// /// If you omit any existing DnsRecords or HealthCheckConfig /// configurations from an UpdateService request, the configurations are /// deleted from the service. /// ///
  • /// /// If you omit an existing HealthCheckCustomConfig configuration from an /// UpdateService request, 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. /// ///
/// Container for the necessary parameters to execute the UpdateService service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the UpdateService service method, as returned by ServiceDiscovery. /// /// The operation is already in progress. /// /// /// One or more specified values aren't valid. For example, a required value might be /// missing, a numeric value might be outside the allowed range, or a string value might /// exceed length constraints. /// /// /// No service exists with the specified ID. /// /// REST API Reference for UpdateService Operation public virtual Task UpdateServiceAsync(UpdateServiceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateServiceRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateServiceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion } }