Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
6161 lines (5415 sloc) 211 KB
<
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package servicediscovery
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
const opCreateHttpNamespace = "CreateHttpNamespace"
// CreateHttpNamespaceRequest generates a "aws/request.Request" representing the
// client's request for the CreateHttpNamespace operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateHttpNamespace for more information on using the CreateHttpNamespace
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateHttpNamespaceRequest method.
// req, resp := client.CreateHttpNamespaceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateHttpNamespace
func (c *ServiceDiscovery) CreateHttpNamespaceRequest(input *CreateHttpNamespaceInput) (req *request.Request, output *CreateHttpNamespaceOutput) {
op := &request.Operation{
Name: opCreateHttpNamespace,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateHttpNamespaceInput{}
}
output = &CreateHttpNamespaceOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateHttpNamespace API operation for AWS Cloud Map.
//
// Creates an HTTP namespace. Service instances that you register using an HTTP
// namespace can be discovered using a DiscoverInstances request but can't be
// discovered using DNS.
//
// For the current limit on the number of namespaces that you can create using
// the same AWS account, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html)
// in the AWS Cloud Map Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation CreateHttpNamespace for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// * ErrCodeNamespaceAlreadyExists "NamespaceAlreadyExists"
// The namespace that you're trying to create already exists.
//
// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded"
// The resource can't be created because you've reached the limit on the number
// of resources.
//
// * ErrCodeDuplicateRequest "DuplicateRequest"
// The operation is already in progress.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateHttpNamespace
func (c *ServiceDiscovery) CreateHttpNamespace(input *CreateHttpNamespaceInput) (*CreateHttpNamespaceOutput, error) {
req, out := c.CreateHttpNamespaceRequest(input)
return out, req.Send()
}
// CreateHttpNamespaceWithContext is the same as CreateHttpNamespace with the addition of
// the ability to pass a context and additional request options.
//
// See CreateHttpNamespace for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) CreateHttpNamespaceWithContext(ctx aws.Context, input *CreateHttpNamespaceInput, opts ...request.Option) (*CreateHttpNamespaceOutput, error) {
req, out := c.CreateHttpNamespaceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreatePrivateDnsNamespace = "CreatePrivateDnsNamespace"
// CreatePrivateDnsNamespaceRequest generates a "aws/request.Request" representing the
// client's request for the CreatePrivateDnsNamespace operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreatePrivateDnsNamespace for more information on using the CreatePrivateDnsNamespace
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreatePrivateDnsNamespaceRequest method.
// req, resp := client.CreatePrivateDnsNamespaceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePrivateDnsNamespace
func (c *ServiceDiscovery) CreatePrivateDnsNamespaceRequest(input *CreatePrivateDnsNamespaceInput) (req *request.Request, output *CreatePrivateDnsNamespaceOutput) {
op := &request.Operation{
Name: opCreatePrivateDnsNamespace,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreatePrivateDnsNamespaceInput{}
}
output = &CreatePrivateDnsNamespaceOutput{}
req = c.newRequest(op, input, output)
return
}
// CreatePrivateDnsNamespace API operation for AWS Cloud Map.
//
// Creates a private namespace based on DNS, which will be 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 will be backend.example.com.
// For the current limit on the number of namespaces that you can create using
// the same AWS account, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html)
// in the AWS Cloud Map Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation CreatePrivateDnsNamespace for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// * ErrCodeNamespaceAlreadyExists "NamespaceAlreadyExists"
// The namespace that you're trying to create already exists.
//
// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded"
// The resource can't be created because you've reached the limit on the number
// of resources.
//
// * ErrCodeDuplicateRequest "DuplicateRequest"
// The operation is already in progress.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePrivateDnsNamespace
func (c *ServiceDiscovery) CreatePrivateDnsNamespace(input *CreatePrivateDnsNamespaceInput) (*CreatePrivateDnsNamespaceOutput, error) {
req, out := c.CreatePrivateDnsNamespaceRequest(input)
return out, req.Send()
}
// CreatePrivateDnsNamespaceWithContext is the same as CreatePrivateDnsNamespace with the addition of
// the ability to pass a context and additional request options.
//
// See CreatePrivateDnsNamespace for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) CreatePrivateDnsNamespaceWithContext(ctx aws.Context, input *CreatePrivateDnsNamespaceInput, opts ...request.Option) (*CreatePrivateDnsNamespaceOutput, error) {
req, out := c.CreatePrivateDnsNamespaceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreatePublicDnsNamespace = "CreatePublicDnsNamespace"
// CreatePublicDnsNamespaceRequest generates a "aws/request.Request" representing the
// client's request for the CreatePublicDnsNamespace operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreatePublicDnsNamespace for more information on using the CreatePublicDnsNamespace
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreatePublicDnsNamespaceRequest method.
// req, resp := client.CreatePublicDnsNamespaceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePublicDnsNamespace
func (c *ServiceDiscovery) CreatePublicDnsNamespaceRequest(input *CreatePublicDnsNamespaceInput) (req *request.Request, output *CreatePublicDnsNamespaceOutput) {
op := &request.Operation{
Name: opCreatePublicDnsNamespace,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreatePublicDnsNamespaceInput{}
}
output = &CreatePublicDnsNamespaceOutput{}
req = c.newRequest(op, input, output)
return
}
// CreatePublicDnsNamespace API operation for AWS Cloud Map.
//
// Creates a public namespace based on DNS, which will be 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 will be backend.example.com. For the current limit on
// the number of namespaces that you can create using the same AWS account,
// see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html)
// in the AWS Cloud Map Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation CreatePublicDnsNamespace for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// * ErrCodeNamespaceAlreadyExists "NamespaceAlreadyExists"
// The namespace that you're trying to create already exists.
//
// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded"
// The resource can't be created because you've reached the limit on the number
// of resources.
//
// * ErrCodeDuplicateRequest "DuplicateRequest"
// The operation is already in progress.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePublicDnsNamespace
func (c *ServiceDiscovery) CreatePublicDnsNamespace(input *CreatePublicDnsNamespaceInput) (*CreatePublicDnsNamespaceOutput, error) {
req, out := c.CreatePublicDnsNamespaceRequest(input)
return out, req.Send()
}
// CreatePublicDnsNamespaceWithContext is the same as CreatePublicDnsNamespace with the addition of
// the ability to pass a context and additional request options.
//
// See CreatePublicDnsNamespace for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) CreatePublicDnsNamespaceWithContext(ctx aws.Context, input *CreatePublicDnsNamespaceInput, opts ...request.Option) (*CreatePublicDnsNamespaceOutput, error) {
req, out := c.CreatePublicDnsNamespaceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateService = "CreateService"
// CreateServiceRequest generates a "aws/request.Request" representing the
// client's request for the CreateService operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateService for more information on using the CreateService
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateServiceRequest method.
// req, resp := client.CreateServiceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateService
func (c *ServiceDiscovery) CreateServiceRequest(input *CreateServiceInput) (req *request.Request, output *CreateServiceOutput) {
op := &request.Operation{
Name: opCreateService,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateServiceInput{}
}
output = &CreateServiceOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateService API operation for AWS Cloud Map.
//
// Creates a service, which 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 AWS Cloud Map uses the values in the configuration to create the specified
// entities.
//
// For the current limit on the number of instances that you can register using
// the same namespace and using the same service, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html)
// in the AWS Cloud Map Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation CreateService for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded"
// The resource can't be created because you've reached the limit on the number
// of resources.
//
// * ErrCodeNamespaceNotFound "NamespaceNotFound"
// No namespace exists with the specified ID.
//
// * ErrCodeServiceAlreadyExists "ServiceAlreadyExists"
// The service can't be created because a service with the same name already
// exists.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateService
func (c *ServiceDiscovery) CreateService(input *CreateServiceInput) (*CreateServiceOutput, error) {
req, out := c.CreateServiceRequest(input)
return out, req.Send()
}
// CreateServiceWithContext is the same as CreateService with the addition of
// the ability to pass a context and additional request options.
//
// See CreateService for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) CreateServiceWithContext(ctx aws.Context, input *CreateServiceInput, opts ...request.Option) (*CreateServiceOutput, error) {
req, out := c.CreateServiceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteNamespace = "DeleteNamespace"
// DeleteNamespaceRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNamespace operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteNamespace for more information on using the DeleteNamespace
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteNamespaceRequest method.
// req, resp := client.DeleteNamespaceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteNamespace
func (c *ServiceDiscovery) DeleteNamespaceRequest(input *DeleteNamespaceInput) (req *request.Request, output *DeleteNamespaceOutput) {
op := &request.Operation{
Name: opDeleteNamespace,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteNamespaceInput{}
}
output = &DeleteNamespaceOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteNamespace API operation for AWS Cloud Map.
//
// Deletes a namespace from the current account. If the namespace still contains
// one or more services, the request fails.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation DeleteNamespace for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// * ErrCodeNamespaceNotFound "NamespaceNotFound"
// No namespace exists with the specified ID.
//
// * ErrCodeResourceInUse "ResourceInUse"
// The specified resource can't be deleted because it contains other resources.
// For example, you can't delete a service that contains any instances.
//
// * ErrCodeDuplicateRequest "DuplicateRequest"
// The operation is already in progress.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteNamespace
func (c *ServiceDiscovery) DeleteNamespace(input *DeleteNamespaceInput) (*DeleteNamespaceOutput, error) {
req, out := c.DeleteNamespaceRequest(input)
return out, req.Send()
}
// DeleteNamespaceWithContext is the same as DeleteNamespace with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteNamespace for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) DeleteNamespaceWithContext(ctx aws.Context, input *DeleteNamespaceInput, opts ...request.Option) (*DeleteNamespaceOutput, error) {
req, out := c.DeleteNamespaceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteService = "DeleteService"
// DeleteServiceRequest generates a "aws/request.Request" representing the
// client's request for the DeleteService operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteService for more information on using the DeleteService
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteServiceRequest method.
// req, resp := client.DeleteServiceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteService
func (c *ServiceDiscovery) DeleteServiceRequest(input *DeleteServiceInput) (req *request.Request, output *DeleteServiceOutput) {
op := &request.Operation{
Name: opDeleteService,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteServiceInput{}
}
output = &DeleteServiceOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteService API operation for AWS Cloud Map.
//
// Deletes a specified service. If the service still contains one or more registered
// instances, the request fails.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation DeleteService for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// * ErrCodeResourceInUse "ResourceInUse"
// The specified resource can't be deleted because it contains other resources.
// For example, you can't delete a service that contains any instances.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteService
func (c *ServiceDiscovery) DeleteService(input *DeleteServiceInput) (*DeleteServiceOutput, error) {
req, out := c.DeleteServiceRequest(input)
return out, req.Send()
}
// DeleteServiceWithContext is the same as DeleteService with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteService for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) DeleteServiceWithContext(ctx aws.Context, input *DeleteServiceInput, opts ...request.Option) (*DeleteServiceOutput, error) {
req, out := c.DeleteServiceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeregisterInstance = "DeregisterInstance"
// DeregisterInstanceRequest generates a "aws/request.Request" representing the
// client's request for the DeregisterInstance operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeregisterInstance for more information on using the DeregisterInstance
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeregisterInstanceRequest method.
// req, resp := client.DeregisterInstanceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeregisterInstance
func (c *ServiceDiscovery) DeregisterInstanceRequest(input *DeregisterInstanceInput) (req *request.Request, output *DeregisterInstanceOutput) {
op := &request.Operation{
Name: opDeregisterInstance,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeregisterInstanceInput{}
}
output = &DeregisterInstanceOutput{}
req = c.newRequest(op, input, output)
return
}
// DeregisterInstance API operation for AWS Cloud Map.
//
// Deletes the Amazon Route 53 DNS records and health check, if any, that AWS
// Cloud Map created for the specified instance.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation DeregisterInstance for usage and error information.
//
// Returned Error Codes:
// * ErrCodeDuplicateRequest "DuplicateRequest"
// The operation is already in progress.
//
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// * ErrCodeInstanceNotFound "InstanceNotFound"
// No instance exists with the specified ID, or the instance was recently registered,
// and information about the instance hasn't propagated yet.
//
// * ErrCodeResourceInUse "ResourceInUse"
// The specified resource can't be deleted because it contains other resources.
// For example, you can't delete a service that contains any instances.
//
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeregisterInstance
func (c *ServiceDiscovery) DeregisterInstance(input *DeregisterInstanceInput) (*DeregisterInstanceOutput, error) {
req, out := c.DeregisterInstanceRequest(input)
return out, req.Send()
}
// DeregisterInstanceWithContext is the same as DeregisterInstance with the addition of
// the ability to pass a context and additional request options.
//
// See DeregisterInstance for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) DeregisterInstanceWithContext(ctx aws.Context, input *DeregisterInstanceInput, opts ...request.Option) (*DeregisterInstanceOutput, error) {
req, out := c.DeregisterInstanceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDiscoverInstances = "DiscoverInstances"
// DiscoverInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DiscoverInstances operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DiscoverInstances for more information on using the DiscoverInstances
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DiscoverInstancesRequest method.
// req, resp := client.DiscoverInstancesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DiscoverInstances
func (c *ServiceDiscovery) DiscoverInstancesRequest(input *DiscoverInstancesInput) (req *request.Request, output *DiscoverInstancesOutput) {
op := &request.Operation{
Name: opDiscoverInstances,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DiscoverInstancesInput{}
}
output = &DiscoverInstancesOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("data-", nil))
req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
return
}
// DiscoverInstances API operation for AWS Cloud Map.
//
// Discovers registered instances for a specified namespace and service.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation DiscoverInstances for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// * ErrCodeNamespaceNotFound "NamespaceNotFound"
// No namespace exists with the specified ID.
//
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DiscoverInstances
func (c *ServiceDiscovery) DiscoverInstances(input *DiscoverInstancesInput) (*DiscoverInstancesOutput, error) {
req, out := c.DiscoverInstancesRequest(input)
return out, req.Send()
}
// DiscoverInstancesWithContext is the same as DiscoverInstances with the addition of
// the ability to pass a context and additional request options.
//
// See DiscoverInstances for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) DiscoverInstancesWithContext(ctx aws.Context, input *DiscoverInstancesInput, opts ...request.Option) (*DiscoverInstancesOutput, error) {
req, out := c.DiscoverInstancesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetInstance = "GetInstance"
// GetInstanceRequest generates a "aws/request.Request" representing the
// client's request for the GetInstance operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetInstance for more information on using the GetInstance
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetInstanceRequest method.
// req, resp := client.GetInstanceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstance
func (c *ServiceDiscovery) GetInstanceRequest(input *GetInstanceInput) (req *request.Request, output *GetInstanceOutput) {
op := &request.Operation{
Name: opGetInstance,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetInstanceInput{}
}
output = &GetInstanceOutput{}
req = c.newRequest(op, input, output)
return
}
// GetInstance API operation for AWS Cloud Map.
//
// Gets information about a specified instance.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation GetInstance for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInstanceNotFound "InstanceNotFound"
// No instance exists with the specified ID, or the instance was recently registered,
// and information about the instance hasn't propagated yet.
//
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstance
func (c *ServiceDiscovery) GetInstance(input *GetInstanceInput) (*GetInstanceOutput, error) {
req, out := c.GetInstanceRequest(input)
return out, req.Send()
}
// GetInstanceWithContext is the same as GetInstance with the addition of
// the ability to pass a context and additional request options.
//
// See GetInstance for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) GetInstanceWithContext(ctx aws.Context, input *GetInstanceInput, opts ...request.Option) (*GetInstanceOutput, error) {
req, out := c.GetInstanceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetInstancesHealthStatus = "GetInstancesHealthStatus"
// GetInstancesHealthStatusRequest generates a "aws/request.Request" representing the
// client's request for the GetInstancesHealthStatus operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetInstancesHealthStatus for more information on using the GetInstancesHealthStatus
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetInstancesHealthStatusRequest method.
// req, resp := client.GetInstancesHealthStatusRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstancesHealthStatus
func (c *ServiceDiscovery) GetInstancesHealthStatusRequest(input *GetInstancesHealthStatusInput) (req *request.Request, output *GetInstancesHealthStatusOutput) {
op := &request.Operation{
Name: opGetInstancesHealthStatus,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &GetInstancesHealthStatusInput{}
}
output = &GetInstancesHealthStatusOutput{}
req = c.newRequest(op, input, output)
return
}
// GetInstancesHealthStatus API operation for AWS Cloud Map.
//
// Gets the current health status (Healthy, Unhealthy, or Unknown) of one or
// more instances that are associated with a specified service.
//
// There is a brief delay between when you register an instance and when the
// health status for the instance is available.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation GetInstancesHealthStatus for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInstanceNotFound "InstanceNotFound"
// No instance exists with the specified ID, or the instance was recently registered,
// and information about the instance hasn't propagated yet.
//
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstancesHealthStatus
func (c *ServiceDiscovery) GetInstancesHealthStatus(input *GetInstancesHealthStatusInput) (*GetInstancesHealthStatusOutput, error) {
req, out := c.GetInstancesHealthStatusRequest(input)
return out, req.Send()
}
// GetInstancesHealthStatusWithContext is the same as GetInstancesHealthStatus with the addition of
// the ability to pass a context and additional request options.
//
// See GetInstancesHealthStatus for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) GetInstancesHealthStatusWithContext(ctx aws.Context, input *GetInstancesHealthStatusInput, opts ...request.Option) (*GetInstancesHealthStatusOutput, error) {
req, out := c.GetInstancesHealthStatusRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// GetInstancesHealthStatusPages iterates over the pages of a GetInstancesHealthStatus operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See GetInstancesHealthStatus method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a GetInstancesHealthStatus operation.
// pageNum := 0
// err := client.GetInstancesHealthStatusPages(params,
// func(page *servicediscovery.GetInstancesHealthStatusOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ServiceDiscovery) GetInstancesHealthStatusPages(input *GetInstancesHealthStatusInput, fn func(*GetInstancesHealthStatusOutput, bool) bool) error {
return c.GetInstancesHealthStatusPagesWithContext(aws.BackgroundContext(), input, fn)
}
// GetInstancesHealthStatusPagesWithContext same as GetInstancesHealthStatusPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) GetInstancesHealthStatusPagesWithContext(ctx aws.Context, input *GetInstancesHealthStatusInput, fn func(*GetInstancesHealthStatusOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *GetInstancesHealthStatusInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.GetInstancesHealthStatusRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*GetInstancesHealthStatusOutput), !p.HasNextPage())
}
return p.Err()
}
const opGetNamespace = "GetNamespace"
// GetNamespaceRequest generates a "aws/request.Request" representing the
// client's request for the GetNamespace operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetNamespace for more information on using the GetNamespace
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetNamespaceRequest method.
// req, resp := client.GetNamespaceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetNamespace
func (c *ServiceDiscovery) GetNamespaceRequest(input *GetNamespaceInput) (req *request.Request, output *GetNamespaceOutput) {
op := &request.Operation{
Name: opGetNamespace,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetNamespaceInput{}
}
output = &GetNamespaceOutput{}
req = c.newRequest(op, input, output)
return
}
// GetNamespace API operation for AWS Cloud Map.
//
// Gets information about a namespace.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation GetNamespace for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// * ErrCodeNamespaceNotFound "NamespaceNotFound"
// No namespace exists with the specified ID.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetNamespace
func (c *ServiceDiscovery) GetNamespace(input *GetNamespaceInput) (*GetNamespaceOutput, error) {
req, out := c.GetNamespaceRequest(input)
return out, req.Send()
}
// GetNamespaceWithContext is the same as GetNamespace with the addition of
// the ability to pass a context and additional request options.
//
// See GetNamespace for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) GetNamespaceWithContext(ctx aws.Context, input *GetNamespaceInput, opts ...request.Option) (*GetNamespaceOutput, error) {
req, out := c.GetNamespaceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetOperation = "GetOperation"
// GetOperationRequest generates a "aws/request.Request" representing the
// client's request for the GetOperation operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetOperation for more information on using the GetOperation
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetOperationRequest method.
// req, resp := client.GetOperationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetOperation
func (c *ServiceDiscovery) GetOperationRequest(input *GetOperationInput) (req *request.Request, output *GetOperationOutput) {
op := &request.Operation{
Name: opGetOperation,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetOperationInput{}
}
output = &GetOperationOutput{}
req = c.newRequest(op, input, output)
return
}
// GetOperation API operation for AWS Cloud Map.
//
// 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.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation GetOperation for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// * ErrCodeOperationNotFound "OperationNotFound"
// No operation exists with the specified ID.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetOperation
func (c *ServiceDiscovery) GetOperation(input *GetOperationInput) (*GetOperationOutput, error) {
req, out := c.GetOperationRequest(input)
return out, req.Send()
}
// GetOperationWithContext is the same as GetOperation with the addition of
// the ability to pass a context and additional request options.
//
// See GetOperation for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) GetOperationWithContext(ctx aws.Context, input *GetOperationInput, opts ...request.Option) (*GetOperationOutput, error) {
req, out := c.GetOperationRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetService = "GetService"
// GetServiceRequest generates a "aws/request.Request" representing the
// client's request for the GetService operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetService for more information on using the GetService
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetServiceRequest method.
// req, resp := client.GetServiceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetService
func (c *ServiceDiscovery) GetServiceRequest(input *GetServiceInput) (req *request.Request, output *GetServiceOutput) {
op := &request.Operation{
Name: opGetService,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetServiceInput{}
}
output = &GetServiceOutput{}
req = c.newRequest(op, input, output)
return
}
// GetService API operation for AWS Cloud Map.
//
// Gets the settings for a specified service.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation GetService for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetService
func (c *ServiceDiscovery) GetService(input *GetServiceInput) (*GetServiceOutput, error) {
req, out := c.GetServiceRequest(input)
return out, req.Send()
}
// GetServiceWithContext is the same as GetService with the addition of
// the ability to pass a context and additional request options.
//
// See GetService for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) GetServiceWithContext(ctx aws.Context, input *GetServiceInput, opts ...request.Option) (*GetServiceOutput, error) {
req, out := c.GetServiceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListInstances = "ListInstances"
// ListInstancesRequest generates a "aws/request.Request" representing the
// client's request for the ListInstances operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListInstances for more information on using the ListInstances
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListInstancesRequest method.
// req, resp := client.ListInstancesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListInstances
func (c *ServiceDiscovery) ListInstancesRequest(input *ListInstancesInput) (req *request.Request, output *ListInstancesOutput) {
op := &request.Operation{
Name: opListInstances,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListInstancesInput{}
}
output = &ListInstancesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListInstances API operation for AWS Cloud Map.
//
// Lists summary information about the instances that you registered by using
// a specified service.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation ListInstances for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListInstances
func (c *ServiceDiscovery) ListInstances(input *ListInstancesInput) (*ListInstancesOutput, error) {
req, out := c.ListInstancesRequest(input)
return out, req.Send()
}
// ListInstancesWithContext is the same as ListInstances with the addition of
// the ability to pass a context and additional request options.
//
// See ListInstances for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) ListInstancesWithContext(ctx aws.Context, input *ListInstancesInput, opts ...request.Option) (*ListInstancesOutput, error) {
req, out := c.ListInstancesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListInstancesPages iterates over the pages of a ListInstances operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListInstances method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListInstances operation.
// pageNum := 0
// err := client.ListInstancesPages(params,
// func(page *servicediscovery.ListInstancesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ServiceDiscovery) ListInstancesPages(input *ListInstancesInput, fn func(*ListInstancesOutput, bool) bool) error {
return c.ListInstancesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListInstancesPagesWithContext same as ListInstancesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) ListInstancesPagesWithContext(ctx aws.Context, input *ListInstancesInput, fn func(*ListInstancesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListInstancesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListInstancesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListInstancesOutput), !p.HasNextPage())
}
return p.Err()
}
const opListNamespaces = "ListNamespaces"
// ListNamespacesRequest generates a "aws/request.Request" representing the
// client's request for the ListNamespaces operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListNamespaces for more information on using the ListNamespaces
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListNamespacesRequest method.
// req, resp := client.ListNamespacesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListNamespaces
func (c *ServiceDiscovery) ListNamespacesRequest(input *ListNamespacesInput) (req *request.Request, output *ListNamespacesOutput) {
op := &request.Operation{
Name: opListNamespaces,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListNamespacesInput{}
}
output = &ListNamespacesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListNamespaces API operation for AWS Cloud Map.
//
// Lists summary information about the namespaces that were created by the current
// AWS account.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation ListNamespaces for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListNamespaces
func (c *ServiceDiscovery) ListNamespaces(input *ListNamespacesInput) (*ListNamespacesOutput, error) {
req, out := c.ListNamespacesRequest(input)
return out, req.Send()
}
// ListNamespacesWithContext is the same as ListNamespaces with the addition of
// the ability to pass a context and additional request options.
//
// See ListNamespaces for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) ListNamespacesWithContext(ctx aws.Context, input *ListNamespacesInput, opts ...request.Option) (*ListNamespacesOutput, error) {
req, out := c.ListNamespacesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListNamespacesPages iterates over the pages of a ListNamespaces operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListNamespaces method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListNamespaces operation.
// pageNum := 0
// err := client.ListNamespacesPages(params,
// func(page *servicediscovery.ListNamespacesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ServiceDiscovery) ListNamespacesPages(input *ListNamespacesInput, fn func(*ListNamespacesOutput, bool) bool) error {
return c.ListNamespacesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListNamespacesPagesWithContext same as ListNamespacesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) ListNamespacesPagesWithContext(ctx aws.Context, input *ListNamespacesInput, fn func(*ListNamespacesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListNamespacesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListNamespacesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListNamespacesOutput), !p.HasNextPage())
}
return p.Err()
}
const opListOperations = "ListOperations"
// ListOperationsRequest generates a "aws/request.Request" representing the
// client's request for the ListOperations operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListOperations for more information on using the ListOperations
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListOperationsRequest method.
// req, resp := client.ListOperationsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListOperations
func (c *ServiceDiscovery) ListOperationsRequest(input *ListOperationsInput) (req *request.Request, output *ListOperationsOutput) {
op := &request.Operation{
Name: opListOperations,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListOperationsInput{}
}
output = &ListOperationsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListOperations API operation for AWS Cloud Map.
//
// Lists operations that match the criteria that you specify.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation ListOperations for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListOperations
func (c *ServiceDiscovery) ListOperations(input *ListOperationsInput) (*ListOperationsOutput, error) {
req, out := c.ListOperationsRequest(input)
return out, req.Send()
}
// ListOperationsWithContext is the same as ListOperations with the addition of
// the ability to pass a context and additional request options.
//
// See ListOperations for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) ListOperationsWithContext(ctx aws.Context, input *ListOperationsInput, opts ...request.Option) (*ListOperationsOutput, error) {
req, out := c.ListOperationsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListOperationsPages iterates over the pages of a ListOperations operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListOperations method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListOperations operation.
// pageNum := 0
// err := client.ListOperationsPages(params,
// func(page *servicediscovery.ListOperationsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ServiceDiscovery) ListOperationsPages(input *ListOperationsInput, fn func(*ListOperationsOutput, bool) bool) error {
return c.ListOperationsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListOperationsPagesWithContext same as ListOperationsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) ListOperationsPagesWithContext(ctx aws.Context, input *ListOperationsInput, fn func(*ListOperationsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListOperationsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListOperationsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListOperationsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListServices = "ListServices"
// ListServicesRequest generates a "aws/request.Request" representing the
// client's request for the ListServices operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListServices for more information on using the ListServices
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListServicesRequest method.
// req, resp := client.ListServicesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListServices
func (c *ServiceDiscovery) ListServicesRequest(input *ListServicesInput) (req *request.Request, output *ListServicesOutput) {
op := &request.Operation{
Name: opListServices,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListServicesInput{}
}
output = &ListServicesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListServices API operation for AWS Cloud Map.
//
// Lists summary information for all the services that are associated with one
// or more specified namespaces.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation ListServices for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListServices
func (c *ServiceDiscovery) ListServices(input *ListServicesInput) (*ListServicesOutput, error) {
req, out := c.ListServicesRequest(input)
return out, req.Send()
}
// ListServicesWithContext is the same as ListServices with the addition of
// the ability to pass a context and additional request options.
//
// See ListServices for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) ListServicesWithContext(ctx aws.Context, input *ListServicesInput, opts ...request.Option) (*ListServicesOutput, error) {
req, out := c.ListServicesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListServicesPages iterates over the pages of a ListServices operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListServices method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListServices operation.
// pageNum := 0
// err := client.ListServicesPages(params,
// func(page *servicediscovery.ListServicesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ServiceDiscovery) ListServicesPages(input *ListServicesInput, fn func(*ListServicesOutput, bool) bool) error {
return c.ListServicesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListServicesPagesWithContext same as ListServicesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) ListServicesPagesWithContext(ctx aws.Context, input *ListServicesInput, fn func(*ListServicesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListServicesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListServicesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListServicesOutput), !p.HasNextPage())
}
return p.Err()
}
const opRegisterInstance = "RegisterInstance"
// RegisterInstanceRequest generates a "aws/request.Request" representing the
// client's request for the RegisterInstance operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See RegisterInstance for more information on using the RegisterInstance
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the RegisterInstanceRequest method.
// req, resp := client.RegisterInstanceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/RegisterInstance
func (c *ServiceDiscovery) RegisterInstanceRequest(input *RegisterInstanceInput) (req *request.Request, output *RegisterInstanceOutput) {
op := &request.Operation{
Name: opRegisterInstance,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RegisterInstanceInput{}
}
output = &RegisterInstanceOutput{}
req = c.newRequest(op, input, output)
return
}
// RegisterInstance API operation for AWS Cloud Map.
//
// 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 is specified
// by ServiceId, a record is created or updated in the hosted zone that is
// 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 AWS 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 limit on the number of instances that you can register using
// the same namespace and using the same service, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html)
// in the AWS Cloud Map Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation RegisterInstance for usage and error information.
//
// Returned Error Codes:
// * ErrCodeDuplicateRequest "DuplicateRequest"
// The operation is already in progress.
//
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// * ErrCodeResourceInUse "ResourceInUse"
// The specified resource can't be deleted because it contains other resources.
// For example, you can't delete a service that contains any instances.
//
// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded"
// The resource can't be created because you've reached the limit on the number
// of resources.
//
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/RegisterInstance
func (c *ServiceDiscovery) RegisterInstance(input *RegisterInstanceInput) (*RegisterInstanceOutput, error) {
req, out := c.RegisterInstanceRequest(input)
return out, req.Send()
}
// RegisterInstanceWithContext is the same as RegisterInstance with the addition of
// the ability to pass a context and additional request options.
//
// See RegisterInstance for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) RegisterInstanceWithContext(ctx aws.Context, input *RegisterInstanceInput, opts ...request.Option) (*RegisterInstanceOutput, error) {
req, out := c.RegisterInstanceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateInstanceCustomHealthStatus = "UpdateInstanceCustomHealthStatus"
// UpdateInstanceCustomHealthStatusRequest generates a "aws/request.Request" representing the
// client's request for the UpdateInstanceCustomHealthStatus operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateInstanceCustomHealthStatus for more information on using the UpdateInstanceCustomHealthStatus
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UpdateInstanceCustomHealthStatusRequest method.
// req, resp := client.UpdateInstanceCustomHealthStatusRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateInstanceCustomHealthStatus
func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatusRequest(input *UpdateInstanceCustomHealthStatusInput) (req *request.Request, output *UpdateInstanceCustomHealthStatusOutput) {
op := &request.Operation{
Name: opUpdateInstanceCustomHealthStatus,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateInstanceCustomHealthStatusInput{}
}
output = &UpdateInstanceCustomHealthStatusOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// UpdateInstanceCustomHealthStatus API operation for AWS Cloud Map.
//
// 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.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation UpdateInstanceCustomHealthStatus for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInstanceNotFound "InstanceNotFound"
// No instance exists with the specified ID, or the instance was recently registered,
// and information about the instance hasn't propagated yet.
//
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// * ErrCodeCustomHealthNotFound "CustomHealthNotFound"
// The health check for the instance that is specified by ServiceId and InstanceId
// is not a custom health check.
//
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateInstanceCustomHealthStatus
func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatus(input *UpdateInstanceCustomHealthStatusInput) (*UpdateInstanceCustomHealthStatusOutput, error) {
req, out := c.UpdateInstanceCustomHealthStatusRequest(input)
return out, req.Send()
}
// UpdateInstanceCustomHealthStatusWithContext is the same as UpdateInstanceCustomHealthStatus with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateInstanceCustomHealthStatus for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatusWithContext(ctx aws.Context, input *UpdateInstanceCustomHealthStatusInput, opts ...request.Option) (*UpdateInstanceCustomHealthStatusOutput, error) {
req, out := c.UpdateInstanceCustomHealthStatusRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateService = "UpdateService"
// UpdateServiceRequest generates a "aws/request.Request" representing the
// client's request for the UpdateService operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateService for more information on using the UpdateService
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UpdateServiceRequest method.
// req, resp := client.UpdateServiceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateService
func (c *ServiceDiscovery) UpdateServiceRequest(input *UpdateServiceInput) (req *request.Request, output *UpdateServiceOutput) {
op := &request.Operation{
Name: opUpdateService,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateServiceInput{}
}
output = &UpdateServiceOutput{}
req = c.newRequest(op, input, output)
return
}
// UpdateService API operation for AWS Cloud Map.
//
// Submits a request to perform the following operations:
//
// * Add or delete DnsRecords configurations
//
// * Update the TTL setting for existing DnsRecords configurations
//
// * Add, update, or delete HealthCheckConfig for a specified service
//
// For public and private DNS namespaces, you must specify all DnsRecords configurations
// (and, optionally, HealthCheckConfig) that you want to appear in the updated
// service. Any current configurations that don't appear in an UpdateService
// request are deleted.
//
// When you update the TTL setting for a service, AWS Cloud Map also updates
// the corresponding settings in all the records and health checks that were
// created by using the specified service.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation UpdateService for usage and error information.
//
// Returned Error Codes:
// * ErrCodeDuplicateRequest "DuplicateRequest"
// The operation is already in progress.
//
// * ErrCodeInvalidInput "InvalidInput"
// 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.
//
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateService
func (c *ServiceDiscovery) UpdateService(input *UpdateServiceInput) (*UpdateServiceOutput, error) {
req, out := c.UpdateServiceRequest(input)
return out, req.Send()
}
// UpdateServiceWithContext is the same as UpdateService with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateService for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) UpdateServiceWithContext(ctx aws.Context, input *UpdateServiceInput, opts ...request.Option) (*UpdateServiceOutput, error) {
req, out := c.UpdateServiceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
type CreateHttpNamespaceInput struct {
_ struct{} `type:"structure"`
// A unique string that identifies the request and that allows failed CreateHttpNamespace
// requests to be retried without the risk of executing the operation twice.
// CreatorRequestId can be any unique string, for example, a date/time stamp.
CreatorRequestId *string `type:"string" idempotencyToken:"true"`
// A description for the namespace.
Description *string `type:"string"`
// The name that you want to assign to this namespace.
//
// Name is a required field
Name *string `type:"string" required:"true"`
}
// String returns the string representation
func (s CreateHttpNamespaceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateHttpNamespaceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateHttpNamespaceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateHttpNamespaceInput"}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetCreatorRequestId sets the CreatorRequestId field's value.
func (s *CreateHttpNamespaceInput) SetCreatorRequestId(v string) *CreateHttpNamespaceInput {
s.CreatorRequestId = &v
return s
}
// SetDescription sets the Description field's value.
func (s *CreateHttpNamespaceInput) SetDescription(v string) *CreateHttpNamespaceInput {
s.Description = &v
return s
}
// SetName sets the Name field's value.
func (s *CreateHttpNamespaceInput) SetName(v string) *CreateHttpNamespaceInput {
s.Name = &v
return s
}
type CreateHttpNamespaceOutput struct {
_ struct{} `type:"structure"`
// A value that you can use to determine whether the request completed successfully.
// To get the status of the operation, see GetOperation.
OperationId *string `type:"string"`
}
// String returns the string representation
func (s CreateHttpNamespaceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateHttpNamespaceOutput) GoString() string {
return s.String()
}
// SetOperationId sets the OperationId field's value.
func (s *CreateHttpNamespaceOutput) SetOperationId(v string) *CreateHttpNamespaceOutput {
s.OperationId = &v
return s
}
type CreatePrivateDnsNamespaceInput struct {
_ struct{} `type:"structure"`
// A unique string that identifies the request and that allows failed CreatePrivateDnsNamespace
// requests to be retried without the risk of executing the operation twice.
// CreatorRequestId can be any unique string, for example, a date/time stamp.
CreatorRequestId *string `type:"string" idempotencyToken:"true"`
// A description for the namespace.
Description *string `type:"string"`
// The name that you want to assign to this namespace. When you create a private
// DNS namespace, AWS Cloud Map automatically creates an Amazon Route 53 private
// hosted zone that has the same name as the namespace.
//
// Name is a required field
Name *string `type:"string" required:"true"`
// The ID of the Amazon VPC that you want to associate the namespace with.
//
// Vpc is a required field
Vpc *string `type:"string" required:"true"`
}
// String returns the string representation
func (s CreatePrivateDnsNamespaceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreatePrivateDnsNamespaceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreatePrivateDnsNamespaceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreatePrivateDnsNamespaceInput"}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if s.Vpc == nil {
invalidParams.Add(request.NewErrParamRequired("Vpc"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetCreatorRequestId sets the CreatorRequestId field's value.
func (s *CreatePrivateDnsNamespaceInput) SetCreatorRequestId(v string) *CreatePrivateDnsNamespaceInput {
s.CreatorRequestId = &v
return s
}
// SetDescription sets the Description field's value.
func (s *CreatePrivateDnsNamespaceInput) SetDescription(v string) *CreatePrivateDnsNamespaceInput {
s.Description = &v
return s
}
// SetName sets the Name field's value.
func (s *CreatePrivateDnsNamespaceInput) SetName(v string) *CreatePrivateDnsNamespaceInput {
s.Name = &v
return s
}
// SetVpc sets the Vpc field's value.
func (s *CreatePrivateDnsNamespaceInput) SetVpc(v string) *CreatePrivateDnsNamespaceInput {
s.Vpc = &v
return s
}
type CreatePrivateDnsNamespaceOutput struct {
_ struct{} `type:"structure"`
// A value that you can use to determine whether the request completed successfully.
// To get the status of the operation, see GetOperation.
OperationId *string `type:"string"`
}
// String returns the string representation
func (s CreatePrivateDnsNamespaceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreatePrivateDnsNamespaceOutput) GoString() string {
return s.String()
}
// SetOperationId sets the OperationId field's value.
func (s *CreatePrivateDnsNamespaceOutput) SetOperationId(v string) *CreatePrivateDnsNamespaceOutput {
s.OperationId = &v
return s
}
type CreatePublicDnsNamespaceInput struct {
_ struct{} `type:"structure"`
// A unique string that identifies the request and that allows failed CreatePublicDnsNamespace
// requests to be retried without the risk of executing the operation twice.
// CreatorRequestId can be any unique string, for example, a date/time stamp.
CreatorRequestId *string `type:"string" idempotencyToken:"true"`
// A description for the namespace.
Description *string `type:"string"`
// The name that you want to assign to this namespace.
//
// Name is a required field
Name *string `type:"string" required:"true"`
}
// String returns the string representation
func (s CreatePublicDnsNamespaceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreatePublicDnsNamespaceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreatePublicDnsNamespaceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreatePublicDnsNamespaceInput"}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetCreatorRequestId sets the CreatorRequestId field's value.
func (s *CreatePublicDnsNamespaceInput) SetCreatorRequestId(v string) *CreatePublicDnsNamespaceInput {
s.CreatorRequestId = &v
return s
}
// SetDescription sets the Description field's value.
func (s *CreatePublicDnsNamespaceInput) SetDescription(v string) *CreatePublicDnsNamespaceInput {
s.Description = &v
return s
}
// SetName sets the Name field's value.
func (s *CreatePublicDnsNamespaceInput) SetName(v string) *CreatePublicDnsNamespaceInput {
s.Name = &v
return s
}
type CreatePublicDnsNamespaceOutput struct {
_ struct{} `type:"structure"`
// A value that you can use to determine whether the request completed successfully.
// To get the status of the operation, see GetOperation.
OperationId *string `type:"string"`
}
// String returns the string representation
func (s CreatePublicDnsNamespaceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreatePublicDnsNamespaceOutput) GoString() string {
return s.String()
}
// SetOperationId sets the OperationId field's value.
func (s *CreatePublicDnsNamespaceOutput) SetOperationId(v string) *CreatePublicDnsNamespaceOutput {
s.OperationId = &v
return s
}
type CreateServiceInput struct {
_ struct{} `type:"structure"`
// A unique string that identifies the request and that allows failed CreateService
// requests to be retried without the risk of executing the operation twice.
// CreatorRequestId can be any unique string, for example, a date/time stamp.
CreatorRequestId *string `type:"string" idempotencyToken:"true"`
// A description for the service.
Description *string `type:"string"`
// A complex type that contains information about the Amazon Route 53 records
// that you want AWS Cloud Map to create when you register an instance.
DnsConfig *DnsConfig `type:"structure"`
// Public DNS namespaces only. A complex type that contains settings for an
// optional Route 53 health check. If you specify settings for a health check,
// AWS Cloud Map associates the health check with all the Route 53 DNS records
// that you specify in DnsConfig.
//
// If you specify a health check configuration, you can specify either HealthCheckCustomConfig
// or HealthCheckConfig but not both.
//
// For information about the charges for health checks, see AWS Cloud Map Pricing
// (http://aws.amazon.com/cloud-map/pricing/).
HealthCheckConfig *HealthCheckConfig `type:"structure"`
// A complex type that contains information about an optional custom health
// check.
//
// If you specify a health check configuration, you can specify either HealthCheckCustomConfig
// or HealthCheckConfig but not both.
HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"`
// The name that you want to assign to the service.
//
// Name is a required field
Name *string `type:"string" required:"true"`
// The ID of the namespace that you want to use to create the service.
NamespaceId *string `type:"string"`
}
// String returns the string representation
func (s CreateServiceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateServiceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateServiceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateServiceInput"}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if s.DnsConfig != nil {
if err := s.DnsConfig.Validate(); err != nil {
invalidParams.AddNested("DnsConfig", err.(request.ErrInvalidParams))
}
}
if s.HealthCheckConfig != nil {
if err := s.HealthCheckConfig.Validate(); err != nil {
invalidParams.AddNested("HealthCheckConfig", err.(request.ErrInvalidParams))
}
}
if s.HealthCheckCustomConfig != nil {
if err := s.HealthCheckCustomConfig.Validate(); err != nil {
invalidParams.AddNested("HealthCheckCustomConfig", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetCreatorRequestId sets the CreatorRequestId field's value.
func (s *CreateServiceInput) SetCreatorRequestId(v string) *CreateServiceInput {
s.CreatorRequestId = &v
return s
}
// SetDescription sets the Description field's value.
func (s *CreateServiceInput) SetDescription(v string) *CreateServiceInput {
s.Description = &v
return s
}
// SetDnsConfig sets the DnsConfig field's value.
func (s *CreateServiceInput) SetDnsConfig(v *DnsConfig) *CreateServiceInput {
s.DnsConfig = v
return s
}
// SetHealthCheckConfig sets the HealthCheckConfig field's value.
func (s *CreateServiceInput) SetHealthCheckConfig(v *HealthCheckConfig) *CreateServiceInput {
s.HealthCheckConfig = v
return s
}
// SetHealthCheckCustomConfig sets the HealthCheckCustomConfig field's value.
func (s *CreateServiceInput) SetHealthCheckCustomConfig(v *HealthCheckCustomConfig) *CreateServiceInput {
s.HealthCheckCustomConfig = v
return s
}
// SetName sets the Name field's value.
func (s *CreateServiceInput) SetName(v string) *CreateServiceInput {
s.Name = &v
return s
}
// SetNamespaceId sets the NamespaceId field's value.
func (s *CreateServiceInput) SetNamespaceId(v string) *CreateServiceInput {
s.NamespaceId = &v
return s
}
type CreateServiceOutput struct {
_ struct{} `type:"structure"`
// A complex type that contains information about the new service.
Service *Service `type:"structure"`
}
// String returns the string representation
func (s CreateServiceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateServiceOutput) GoString() string {
return s.String()
}
// SetService sets the Service field's value.
func (s *CreateServiceOutput) SetService(v *Service) *CreateServiceOutput {
s.Service = v
return s
}
type DeleteNamespaceInput struct {
_ struct{} `type:"structure"`
// The ID of the namespace that you want to delete.
//
// Id is a required field
Id *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteNamespaceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteNamespaceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteNamespaceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteNamespaceInput"}
if s.Id == nil {
invalidParams.Add(request.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetId sets the Id field's value.
func (s *DeleteNamespaceInput) SetId(v string) *DeleteNamespaceInput {
s.Id = &v
return s
}
type DeleteNamespaceOutput struct {
_ struct{} `type:"structure"`
// A value that you can use to determine whether the request completed successfully.
// To get the status of the operation, see GetOperation.
OperationId *string `type:"string"`
}
// String returns the string representation
func (s DeleteNamespaceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteNamespaceOutput) GoString() string {
return s.String()
}
// SetOperationId sets the OperationId field's value.
func (s *DeleteNamespaceOutput) SetOperationId(v string) *DeleteNamespaceOutput {
s.OperationId = &v
return s
}
type DeleteServiceInput struct {
_ struct{} `type:"structure"`
// The ID of the service that you want to delete.
//
// Id is a required field
Id *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteServiceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteServiceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteServiceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteServiceInput"}
if s.Id == nil {
invalidParams.Add(request.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetId sets the Id field's value.
func (s *DeleteServiceInput) SetId(v string) *DeleteServiceInput {
s.Id = &v
return s
}
type DeleteServiceOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteServiceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteServiceOutput) GoString() string {
return s.String()
}
type DeregisterInstanceInput struct {
_ struct{} `type:"structure"`
// The value that you specified for Id in the RegisterInstance request.
//
// InstanceId is a required field
InstanceId *string `type:"string" required:"true"`
// The ID of the service that the instance is associated with.
//
// ServiceId is a required field
ServiceId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DeregisterInstanceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeregisterInstanceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeregisterInstanceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeregisterInstanceInput"}
if s.InstanceId == nil {
invalidParams.Add(request.NewErrParamRequired("InstanceId"))
}
if s.ServiceId == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetInstanceId sets the InstanceId field's value.
func (s *DeregisterInstanceInput) SetInstanceId(v string) *DeregisterInstanceInput {
s.InstanceId = &v
return s
}
// SetServiceId sets the ServiceId field's value.
func (s *DeregisterInstanceInput) SetServiceId(v string) *DeregisterInstanceInput {
s.ServiceId = &v
return s
}
type DeregisterInstanceOutput struct {
_ struct{} `type:"structure"`
// A value that you can use to determine whether the request completed successfully.
// For more information, see GetOperation.
OperationId *string `type:"string"`
}
// String returns the string representation
func (s DeregisterInstanceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeregisterInstanceOutput) GoString() string {
return s.String()
}
// SetOperationId sets the OperationId field's value.
func (s *DeregisterInstanceOutput) SetOperationId(v string) *DeregisterInstanceOutput {
s.OperationId = &v
return s
}
type DiscoverInstancesInput struct {
_ struct{} `type:"structure"`
// The health status of the instances that you want to discover.
HealthStatus *string `type:"string" enum:"HealthStatusFilter"`
// 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.
MaxResults *int64 `min:"1" type:"integer"`
// The name of the namespace that you specified when you registered the instance.
//
// NamespaceName is a required field
NamespaceName *string `type:"string" required:"true"`
// A string map that contains attributes with values that you can use to filter
// instances by any custom attribute that you specified when you registered
// the instance. Only instances that match all the specified key/value pairs
// will be returned.
QueryParameters map[string]*string `type:"map"`
// The name of the service that you specified when you registered the instance.
//
// ServiceName is a required field
ServiceName *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DiscoverInstancesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DiscoverInstancesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DiscoverInstancesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DiscoverInstancesInput"}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if s.NamespaceName == nil {
invalidParams.Add(request.NewErrParamRequired("NamespaceName"))
}
if s.ServiceName == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceName"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetHealthStatus sets the HealthStatus field's value.
func (s *DiscoverInstancesInput) SetHealthStatus(v string) *DiscoverInstancesInput {
s.HealthStatus = &v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *DiscoverInstancesInput) SetMaxResults(v int64) *DiscoverInstancesInput {
s.MaxResults = &v
return s
}
// SetNamespaceName sets the NamespaceName field's value.
func (s *DiscoverInstancesInput) SetNamespaceName(v string) *DiscoverInstancesInput {
s.NamespaceName = &v
return s
}
// SetQueryParameters sets the QueryParameters field's value.
func (s *DiscoverInstancesInput) SetQueryParameters(v map[string]*string) *DiscoverInstancesInput {
s.QueryParameters = v
return s
}
// SetServiceName sets the ServiceName field's value.
func (s *DiscoverInstancesInput) SetServiceName(v string) *DiscoverInstancesInput {
s.ServiceName = &v
return s
}
type DiscoverInstancesOutput struct {
_ struct{} `type:"structure"`
// A complex type that contains one HttpInstanceSummary for each registered
// instance.
Instances []*HttpInstanceSummary `type:"list"`
}
// String returns the string representation
func (s DiscoverInstancesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DiscoverInstancesOutput) GoString() string {
return s.String()
}
// SetInstances sets the Instances field's value.
func (s *DiscoverInstancesOutput) SetInstances(v []*HttpInstanceSummary) *DiscoverInstancesOutput {
s.Instances = v
return s
}
// A complex type that contains information about the Amazon Route 53 DNS records
// that you want AWS Cloud Map to create when you register an instance.
type DnsConfig struct {
_ struct{} `type:"structure"`
// An array that contains one DnsRecord object for each Route 53 DNS record
// that you want AWS Cloud Map to create when you register an instance.
//
// DnsRecords is a required field
DnsRecords []*DnsRecord `type:"list" required:"true"`
// The ID of the namespace to use for DNS configuration.
//
// Deprecated: Top level attribute in request should be used to reference namespace-id
NamespaceId *string `deprecated:"true" type:"string"`
// The routing policy that you want to apply to all Route 53 DNS records that
// AWS Cloud Map creates when you register an instance and specify this service.
//
// If you want to use this service to register instances that create alias records,
// specify WEIGHTED for the routing policy.
//
// You can specify the following values:
//
// MULTIVALUE
//
// If you define a health check for the service and the health check is healthy,
// Route 53 returns the applicable value for up to eight instances.
//
// For example, suppose the service includes configurations for one A record
// and a health check, and you use the service to register 10 instances. Route
// 53 responds to DNS queries with IP addresses for up to eight healthy instances.
// If fewer than eight instances are healthy, Route 53 responds to every DNS
// query with the IP addresses for all of the healthy instances.
//
// If you don't define a health check for the service, Route 53 assumes that
// all instances are healthy and returns the values for up to eight instances.
//
// For more information about the multivalue routing policy, see Multivalue
// Answer Routing (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-multivalue)
// in the Route 53 Developer Guide.
//
// WEIGHTED
//
// Route 53 returns the applicable value from one randomly selected instance
// from among the instances that you registered using the same service. Currently,
// all records have the same weight, so you can't route more or less traffic
// to any instances.
//
// For example, suppose the service includes configurations for one A record
// and a health check, and you use the service to register 10 instances. Route
// 53 responds to DNS queries with the IP address for one randomly selected
// instance from among the healthy instances. If no instances are healthy, Route
// 53 responds to DNS queries as if all of the instances were healthy.
//
// If you don't define a health check for the service, Route 53 assumes that
// all instances are healthy and returns the applicable value for one randomly
// selected instance.
//
// For more information about the weighted routing policy, see Weighted Routing
// (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-weighted)
// in the Route 53 Developer Guide.
RoutingPolicy *string `type:"string" enum:"RoutingPolicy"`
}
// String returns the string representation
func (s DnsConfig) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DnsConfig) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DnsConfig) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DnsConfig"}
if s.DnsRecords == nil {
invalidParams.Add(request.NewErrParamRequired("DnsRecords"))
}
if s.DnsRecords != nil {
for i, v := range s.DnsRecords {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DnsRecords", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDnsRecords sets the DnsRecords field's value.
func (s *DnsConfig) SetDnsRecords(v []*DnsRecord) *DnsConfig {
s.DnsRecords = v
return s
}
// SetNamespaceId sets the NamespaceId field's value.
func (s *DnsConfig) SetNamespaceId(v string) *DnsConfig {
s.NamespaceId = &v
return s
}
// SetRoutingPolicy sets the RoutingPolicy field's value.
func (s *DnsConfig) SetRoutingPolicy(v string) *DnsConfig {
s.RoutingPolicy = &v
return s
}
// A complex type that contains information about changes to the Route 53 DNS
// records that AWS Cloud Map creates when you register an instance.
type DnsConfigChange struct {
_ struct{} `type:"structure"`
// An array that contains one DnsRecord object for each Route 53 record that
// you want AWS Cloud Map to create when you register an instance.
//
// DnsRecords is a required field
DnsRecords []*DnsRecord `type:"list" required:"true"`
}
// String returns the string representation
func (s DnsConfigChange) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DnsConfigChange) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DnsConfigChange) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DnsConfigChange"}
if s.DnsRecords == nil {
invalidParams.Add(request.NewErrParamRequired("DnsRecords"))
}
if s.DnsRecords != nil {
for i, v := range s.DnsRecords {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DnsRecords", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDnsRecords sets the DnsRecords field's value.
func (s *DnsConfigChange) SetDnsRecords(v []*DnsRecord) *DnsConfigChange {
s.DnsRecords = v
return s
}
// A complex type that contains the ID for the Route 53 hosted zone that AWS
// Cloud Map creates when you create a namespace.
type DnsProperties struct {
_ struct{} `type:"structure"`
// The ID for the Route 53 hosted zone that AWS Cloud Map creates when you create
// a namespace.
HostedZoneId *string `type:"string"`
}
// String returns the string representation
func (s DnsProperties) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DnsProperties) GoString() string {
return s.String()
}
// SetHostedZoneId sets the HostedZoneId field's value.
func (s *DnsProperties) SetHostedZoneId(v string) *DnsProperties {
s.HostedZoneId = &v
return s
}
// A complex type that contains information about the Route 53 DNS records that
// you want AWS Cloud Map to create when you register an instance.
type DnsRecord struct {
_ struct{} `type:"structure"`
// The amount of time, in seconds, that you want DNS resolvers to cache the
// settings for this record.
//
// Alias records don't include a TTL because Route 53 uses the TTL for the AWS
// resource that an alias record routes traffic to. If you include the AWS_ALIAS_DNS_NAME
// attribute when you submit a RegisterInstance request, the TTL value is ignored.
// Always specify a TTL for the service; you can use a service to register instances
// that create either alias or non-alias records.
//
// TTL is a required field
TTL *int64 `type:"long" required:"true"`
// The type of the resource, which indicates the type of value that Route 53
// returns in response to DNS queries.
//
// Note the following:
//
// * A, AAAA, and SRV records: You can specify settings for a maximum of
// one A, one AAAA, and one SRV record. You can specify them in any combination.
//
// * CNAME records: If you specify CNAME for Type, you can't define any other
// records. This is a limitation of DNS: you can't create a CNAME record
// and any other type of record that has the same name as a CNAME record.
//
// * Alias records: If you want AWS Cloud Map to create a Route 53 alias
// record when you register an instance, specify A or AAAA for Type.
//
// * All records: You specify settings other than TTL and Type when you register
// an instance.
//
// The following values are supported:
//
// A
//
// Route 53 returns the IP address of the resource in IPv4 format, such as 192.0.2.44.
//
// AAAA
//
// Route 53 returns the IP address of the resource in IPv6 format, such as 2001:0db8:85a3:0000:0000:abcd:0001:2345.
//
// CNAME
//
// Route 53 returns the domain name of the resource, such as www.example.com.
// Note the following:
//
// * You specify the domain name that you want to route traffic to when you
// register an instance. For more information, see RegisterInstanceRequest$Attributes.
//
// * You must specify WEIGHTED for the value of RoutingPolicy.
//
// * You can't specify both CNAME for Type and settings for HealthCheckConfig.
// If you do, the request will fail with an InvalidInput error.
//
// SRV
//
// Route 53 returns the value for an SRV record. The value for an SRV record
// uses the following values:
//
// priority weight port service-hostname
//
// Note the following about the values:
//
// * The values of priority and weight are both set to 1 and can't be changed.
//
// * The value of port comes from the value that you specify for the AWS_INSTANCE_PORT
// attribute when you submit a RegisterInstance request.
//
// * The value of service-hostname is a concatenation of the following values:
// The value that you specify for InstanceId when you register an instance.
// The name of the service. The name of the namespace. For example, if the
// value of InstanceId is test, the name of the service is backend, and the
// name of the namespace is example.com, the value of service-hostname is:
// test.backend.example.com
//
// If you specify settings for an SRV record and if you specify values for AWS_INSTANCE_IPV4,
// AWS_INSTANCE_IPV6, or both in the RegisterInstance request, AWS Cloud Map
// automatically creates A and/or AAAA records that have the same name as the
// value of service-hostname in the SRV record. You can ignore these records.
//
// Type is a required field
Type *string `type:"string" required:"true" enum:"RecordType"`
}
// String returns the string representation
func (s DnsRecord) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DnsRecord) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DnsRecord) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DnsRecord"}
if s.TTL == nil {
invalidParams.Add(request.NewErrParamRequired("TTL"))
}
if s.Type == nil {
invalidParams.Add(request.NewErrParamRequired("Type"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetTTL sets the TTL field's value.
func (s *DnsRecord) SetTTL(v int64) *DnsRecord {
s.TTL = &v
return s
}
// SetType sets the Type field's value.
func (s *DnsRecord) SetType(v string) *DnsRecord {
s.Type = &v
return s
}
type GetInstanceInput struct {
_ struct{} `type:"structure"`
// The ID of the instance that you want to get information about.
//
// InstanceId is a required field
InstanceId *string `type:"string" required:"true"`
// The ID of the service that the instance is associated with.
//
// ServiceId is a required field
ServiceId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s GetInstanceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetInstanceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetInstanceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetInstanceInput"}
if s.InstanceId == nil {
invalidParams.Add(request.NewErrParamRequired("InstanceId"))
}
if s.ServiceId == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetInstanceId sets the InstanceId field's value.
func (s *GetInstanceInput) SetInstanceId(v string) *GetInstanceInput {
s.InstanceId = &v
return s
}
// SetServiceId sets the ServiceId field's value.
func (s *GetInstanceInput) SetServiceId(v string) *GetInstanceInput {
s.ServiceId = &v
return s
}
type GetInstanceOutput struct {
_ struct{} `type:"structure"`
// A complex type that contains information about a specified instance.
Instance *Instance `type:"structure"`
}
// String returns the string representation
func (s GetInstanceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetInstanceOutput) GoString() string {
return s.String()
}
// SetInstance sets the Instance field's value.
func (s *GetInstanceOutput) SetInstance(v *Instance) *GetInstanceOutput {
s.Instance = v
return s
}
type GetInstancesHealthStatusInput struct {
_ struct{} `type:"structure"`
// An array that contains the IDs of all the instances that you want to get
// the health status for.
//
// If you omit Instances, AWS Cloud Map returns the health status for all the
// instances that are associated with the specified service.
//
// To get the IDs for the instances that you've registered by using a specified
// service, submit a ListInstances request.
Instances []*string `min:"1" type:"list"`
// The maximum number of instances that you want AWS Cloud Map to return in
// the response to a GetInstancesHealthStatus request. If you don't specify
// a value for MaxResults, AWS Cloud Map returns up to 100 instances.
MaxResults *int64 `min:"1" type:"integer"`
// For the first GetInstancesHealthStatus request, omit this value.
//
// If more than MaxResults instances match the specified criteria, you can submit
// another GetInstancesHealthStatus request to get the next group of results.
// Specify the value of NextToken from the previous response in the next request.
NextToken *string `type:"string"`
// The ID of the service that the instance is associated with.
//
// ServiceId is a required field
ServiceId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s GetInstancesHealthStatusInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetInstancesHealthStatusInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetInstancesHealthStatusInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetInstancesHealthStatusInput"}
if s.Instances != nil && len(s.Instances) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Instances", 1))
}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if s.ServiceId == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetInstances sets the Instances field's value.
func (s *GetInstancesHealthStatusInput) SetInstances(v []*string) *GetInstancesHealthStatusInput {
s.Instances = v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *GetInstancesHealthStatusInput) SetMaxResults(v int64) *GetInstancesHealthStatusInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *GetInstancesHealthStatusInput) SetNextToken(v string) *GetInstancesHealthStatusInput {
s.NextToken = &v
return s
}
// SetServiceId sets the ServiceId field's value.
func (s *GetInstancesHealthStatusInput) SetServiceId(v string) *GetInstancesHealthStatusInput {
s.ServiceId = &v
return s
}
type GetInstancesHealthStatusOutput struct {
_ struct{} `type:"structure"`
// If more than MaxResults instances match the specified criteria, you can submit
// another GetInstancesHealthStatus request to get the next group of results.
// Specify the value of NextToken from the previous response in the next request.
NextToken *string `type:"string"`
// A complex type that contains the IDs and the health status of the instances
// that you specified in the GetInstancesHealthStatus request.
Status map[string]*string `type:"map"`
}
// String returns the string representation
func (s GetInstancesHealthStatusOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetInstancesHealthStatusOutput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
func (s *GetInstancesHealthStatusOutput) SetNextToken(v string) *GetInstancesHealthStatusOutput {
s.NextToken = &v
return s
}
// SetStatus sets the Status field's value.
func (s *GetInstancesHealthStatusOutput) SetStatus(v map[string]*string) *GetInstancesHealthStatusOutput {
s.Status = v
return s
}
type GetNamespaceInput struct {
_ struct{} `type:"structure"`
// The ID of the namespace that you want to get information about.
//
// Id is a required field
Id *string `type:"string" required:"true"`
}
// String returns the string representation
func (s GetNamespaceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetNamespaceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetNamespaceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetNamespaceInput"}
if s.Id == nil {
invalidParams.Add(request.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetId sets the Id field's value.
func (s *GetNamespaceInput) SetId(v string) *GetNamespaceInput {
s.Id = &v
return s
}
type GetNamespaceOutput struct {
_ struct{} `type:"structure"`
// A complex type that contains information about the specified namespace.
Namespace *Namespace `type:"structure"`
}
// String returns the string representation
func (s GetNamespaceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetNamespaceOutput) GoString() string {
return s.String()
}
// SetNamespace sets the Namespace field's value.
func (s *GetNamespaceOutput) SetNamespace(v *Namespace) *GetNamespaceOutput {
s.Namespace = v
return s
}
type GetOperationInput struct {
_ struct{} `type:"structure"`
// The ID of the operation that you want to get more information about.
//
// OperationId is a required field
OperationId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s GetOperationInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetOperationInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetOperationInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetOperationInput"}
if s.OperationId == nil {
invalidParams.Add(request.NewErrParamRequired("OperationId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetOperationId sets the OperationId field's value.
func (s *GetOperationInput) SetOperationId(v string) *GetOperationInput {
s.OperationId = &v
return s
}
type GetOperationOutput struct {
_ struct{} `type:"structure"`
// A complex type that contains information about the operation.
Operation *Operation `type:"structure"`
}
// String returns the string representation
func (s GetOperationOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetOperationOutput) GoString() string {
return s.String()
}
// SetOperation sets the Operation field's value.
func (s *GetOperationOutput) SetOperation(v *Operation) *GetOperationOutput {
s.Operation = v
return s
}
type GetServiceInput struct {
_ struct{} `type:"structure"`
// The ID of the service that you want to get settings for.
//
// Id is a required field
Id *string `type:"string" required:"true"`
}
// String returns the string representation
func (s GetServiceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetServiceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetServiceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetServiceInput"}
if s.Id == nil {
invalidParams.Add(request.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetId sets the Id field's value.
func (s *GetServiceInput) SetId(v string) *GetServiceInput {
s.Id = &v
return s
}
type GetServiceOutput struct {
_ struct{} `type:"structure"`
// A complex type that contains information about the service.
Service *Service `type:"structure"`
}
// String returns the string representation
func (s GetServiceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetServiceOutput) GoString() string {
return s.String()
}
// SetService sets the Service field's value.
func (s *GetServiceOutput) SetService(v *Service) *GetServiceOutput {
s.Service = v
return s
}
// Public DNS namespaces only. A complex type that contains settings for an
// optional health check. If you specify settings for a health check, AWS Cloud
// Map associates the health check with the records that you specify in DnsConfig.
//
// If you specify a health check configuration, you can specify either HealthCheckCustomConfig
// or HealthCheckConfig but not both.
//
// Health checks are basic Route 53 health checks that monitor an AWS endpoint.
// For information about pricing for health checks, see Amazon Route 53 Pricing
// (http://aws.amazon.com/route53/pricing/).
//
// Note the following about configuring health checks.
//
// A and AAAA records
//
// If DnsConfig includes configurations for both A and AAAA records, AWS Cloud
// Map creates a health check that uses the IPv4 address to check the health
// of the resource. If the endpoint that is specified by the IPv4 address is
// unhealthy, Route 53 considers both the A and AAAA records to be unhealthy.
//
// CNAME records
//
// You can't specify settings for HealthCheckConfig when the DNSConfig includes
// CNAME for the value of Type. If you do, the CreateService request will fail
// with an InvalidInput error.
//
// Request interval
//
// A Route 53 health checker in each health-checking region sends a health check
// request to an endpoint every 30 seconds. On average, your endpoint receives
// a health check request about every two seconds. However, health checkers
// don't coordinate with one another, so you'll sometimes see several requests
// per second followed by a few seconds with no health checks at all.
//
// Health checking regions
//
// Health checkers perform checks from all Route 53 health-checking regions.
// For a list of the current regions, see Regions (http://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions).
//
// Alias records
//
// When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute,
// AWS Cloud Map creates a Route 53 alias record. Note the following:
//
// * Route 53 automatically sets EvaluateTargetHealth to true for alias records.
// When EvaluateTargetHealth is true, the alias record inherits the health
// of the referenced AWS resource. such as an ELB load balancer. For more
// information, see EvaluateTargetHealth (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth).