/*
* 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.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.ServiceDiscovery.Model
{
///
/// Container for the parameters to the DiscoverInstances operation.
/// 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.
///
public partial class DiscoverInstancesRequest : AmazonServiceDiscoveryRequest
{
private HealthStatusFilter _healthStatus;
private int? _maxResults;
private string _namespaceName;
private Dictionary _optionalParameters = new Dictionary();
private Dictionary _queryParameters = new Dictionary();
private string _serviceName;
///
/// Gets and sets the property HealthStatus.
///
/// The health status of the instances that you want to discover. This parameter is ignored
/// for services that don't have a health check configured, and all instances are returned.
///
/// - HEALTHY
-
///
/// Returns healthy instances.
///
///
- UNHEALTHY
-
///
/// Returns unhealthy instances.
///
///
- ALL
-
///
/// Returns all instances.
///
///
- HEALTHY_OR_ELSE_ALL
-
///
/// Returns healthy instances, unless none are reporting a healthy state. In that case,
/// return all instances. This is also called failing open.
///
///
///
public HealthStatusFilter HealthStatus
{
get { return this._healthStatus; }
set { this._healthStatus = value; }
}
// Check to see if HealthStatus property is set
internal bool IsSetHealthStatus()
{
return this._healthStatus != null;
}
///
/// Gets and sets the property MaxResults.
///
/// The maximum number of instances that you want Cloud Map to return in the response
/// to a DiscoverInstances
request. If you don't specify a value for MaxResults
,
/// Cloud Map returns up to 100 instances.
///
///
[AWSProperty(Min=1, Max=1000)]
public int MaxResults
{
get { return this._maxResults.GetValueOrDefault(); }
set { this._maxResults = value; }
}
// Check to see if MaxResults property is set
internal bool IsSetMaxResults()
{
return this._maxResults.HasValue;
}
///
/// Gets and sets the property NamespaceName.
///
/// The HttpName
name of the namespace. It's found in the HttpProperties
/// member of the Properties
member of the namespace.
///
///
[AWSProperty(Required=true, Max=1024)]
public string NamespaceName
{
get { return this._namespaceName; }
set { this._namespaceName = value; }
}
// Check to see if NamespaceName property is set
internal bool IsSetNamespaceName()
{
return this._namespaceName != null;
}
///
/// Gets and sets the property OptionalParameters.
///
/// Opportunistic filters to scope the results based on custom attributes. If there are
/// instances that match both the filters specified in both the QueryParameters
/// parameter and this parameter, all of these instances are returned. Otherwise, the
/// filters are ignored, and only instances that match the filters that are specified
/// in the QueryParameters
parameter are returned.
///
///
public Dictionary OptionalParameters
{
get { return this._optionalParameters; }
set { this._optionalParameters = value; }
}
// Check to see if OptionalParameters property is set
internal bool IsSetOptionalParameters()
{
return this._optionalParameters != null && this._optionalParameters.Count > 0;
}
///
/// Gets and sets the property QueryParameters.
///
/// Filters to scope the results based on custom attributes for the instance (for example,
/// {version=v1, az=1a}
). Only instances that match all the specified key-value
/// pairs are returned.
///
///
public Dictionary QueryParameters
{
get { return this._queryParameters; }
set { this._queryParameters = value; }
}
// Check to see if QueryParameters property is set
internal bool IsSetQueryParameters()
{
return this._queryParameters != null && this._queryParameters.Count > 0;
}
///
/// Gets and sets the property ServiceName.
///
/// The name of the service that you specified when you registered the instance.
///
///
[AWSProperty(Required=true)]
public string ServiceName
{
get { return this._serviceName; }
set { this._serviceName = value; }
}
// Check to see if ServiceName property is set
internal bool IsSetServiceName()
{
return this._serviceName != null;
}
}
}