1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package servicediscovery 4 5import ( 6 "fmt" 7 "time" 8 9 "github.com/aws/aws-sdk-go/aws" 10 "github.com/aws/aws-sdk-go/aws/awsutil" 11 "github.com/aws/aws-sdk-go/aws/request" 12 "github.com/aws/aws-sdk-go/private/protocol" 13 "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" 14) 15 16const opCreateHttpNamespace = "CreateHttpNamespace" 17 18// CreateHttpNamespaceRequest generates a "aws/request.Request" representing the 19// client's request for the CreateHttpNamespace operation. The "output" return 20// value will be populated with the request's response once the request completes 21// successfully. 22// 23// Use "Send" method on the returned Request to send the API call to the service. 24// the "output" return value is not valid until after Send returns without error. 25// 26// See CreateHttpNamespace for more information on using the CreateHttpNamespace 27// API call, and error handling. 28// 29// This method is useful when you want to inject custom logic or configuration 30// into the SDK's request lifecycle. Such as custom headers, or retry logic. 31// 32// 33// // Example sending a request using the CreateHttpNamespaceRequest method. 34// req, resp := client.CreateHttpNamespaceRequest(params) 35// 36// err := req.Send() 37// if err == nil { // resp is now filled 38// fmt.Println(resp) 39// } 40// 41// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateHttpNamespace 42func (c *ServiceDiscovery) CreateHttpNamespaceRequest(input *CreateHttpNamespaceInput) (req *request.Request, output *CreateHttpNamespaceOutput) { 43 op := &request.Operation{ 44 Name: opCreateHttpNamespace, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &CreateHttpNamespaceInput{} 51 } 52 53 output = &CreateHttpNamespaceOutput{} 54 req = c.newRequest(op, input, output) 55 return 56} 57 58// CreateHttpNamespace API operation for AWS Cloud Map. 59// 60// Creates an HTTP namespace. Service instances that you register using an HTTP 61// namespace can be discovered using a DiscoverInstances request but can't be 62// discovered using DNS. 63// 64// For the current limit on the number of namespaces that you can create using 65// the same AWS account, see AWS Cloud Map Limits (https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) 66// in the AWS Cloud Map Developer Guide. 67// 68// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 69// with awserr.Error's Code and Message methods to get detailed information about 70// the error. 71// 72// See the AWS API reference guide for AWS Cloud Map's 73// API operation CreateHttpNamespace for usage and error information. 74// 75// Returned Error Types: 76// * InvalidInput 77// One or more specified values aren't valid. For example, a required value 78// might be missing, a numeric value might be outside the allowed range, or 79// a string value might exceed length constraints. 80// 81// * NamespaceAlreadyExists 82// The namespace that you're trying to create already exists. 83// 84// * ResourceLimitExceeded 85// The resource can't be created because you've reached the limit on the number 86// of resources. 87// 88// * DuplicateRequest 89// The operation is already in progress. 90// 91// * TooManyTagsException 92// The list of tags on the resource is over the limit. The maximum number of 93// tags that can be applied to a resource is 50. 94// 95// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateHttpNamespace 96func (c *ServiceDiscovery) CreateHttpNamespace(input *CreateHttpNamespaceInput) (*CreateHttpNamespaceOutput, error) { 97 req, out := c.CreateHttpNamespaceRequest(input) 98 return out, req.Send() 99} 100 101// CreateHttpNamespaceWithContext is the same as CreateHttpNamespace with the addition of 102// the ability to pass a context and additional request options. 103// 104// See CreateHttpNamespace for details on how to use this API operation. 105// 106// The context must be non-nil and will be used for request cancellation. If 107// the context is nil a panic will occur. In the future the SDK may create 108// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 109// for more information on using Contexts. 110func (c *ServiceDiscovery) CreateHttpNamespaceWithContext(ctx aws.Context, input *CreateHttpNamespaceInput, opts ...request.Option) (*CreateHttpNamespaceOutput, error) { 111 req, out := c.CreateHttpNamespaceRequest(input) 112 req.SetContext(ctx) 113 req.ApplyOptions(opts...) 114 return out, req.Send() 115} 116 117const opCreatePrivateDnsNamespace = "CreatePrivateDnsNamespace" 118 119// CreatePrivateDnsNamespaceRequest generates a "aws/request.Request" representing the 120// client's request for the CreatePrivateDnsNamespace operation. The "output" return 121// value will be populated with the request's response once the request completes 122// successfully. 123// 124// Use "Send" method on the returned Request to send the API call to the service. 125// the "output" return value is not valid until after Send returns without error. 126// 127// See CreatePrivateDnsNamespace for more information on using the CreatePrivateDnsNamespace 128// API call, and error handling. 129// 130// This method is useful when you want to inject custom logic or configuration 131// into the SDK's request lifecycle. Such as custom headers, or retry logic. 132// 133// 134// // Example sending a request using the CreatePrivateDnsNamespaceRequest method. 135// req, resp := client.CreatePrivateDnsNamespaceRequest(params) 136// 137// err := req.Send() 138// if err == nil { // resp is now filled 139// fmt.Println(resp) 140// } 141// 142// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePrivateDnsNamespace 143func (c *ServiceDiscovery) CreatePrivateDnsNamespaceRequest(input *CreatePrivateDnsNamespaceInput) (req *request.Request, output *CreatePrivateDnsNamespaceOutput) { 144 op := &request.Operation{ 145 Name: opCreatePrivateDnsNamespace, 146 HTTPMethod: "POST", 147 HTTPPath: "/", 148 } 149 150 if input == nil { 151 input = &CreatePrivateDnsNamespaceInput{} 152 } 153 154 output = &CreatePrivateDnsNamespaceOutput{} 155 req = c.newRequest(op, input, output) 156 return 157} 158 159// CreatePrivateDnsNamespace API operation for AWS Cloud Map. 160// 161// Creates a private namespace based on DNS, which will be visible only inside 162// a specified Amazon VPC. The namespace defines your service naming scheme. 163// For example, if you name your namespace example.com and name your service 164// backend, the resulting DNS name for the service will be backend.example.com. 165// For the current limit on the number of namespaces that you can create using 166// the same AWS account, see AWS Cloud Map Limits (https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) 167// in the AWS Cloud Map Developer Guide. 168// 169// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 170// with awserr.Error's Code and Message methods to get detailed information about 171// the error. 172// 173// See the AWS API reference guide for AWS Cloud Map's 174// API operation CreatePrivateDnsNamespace for usage and error information. 175// 176// Returned Error Types: 177// * InvalidInput 178// One or more specified values aren't valid. For example, a required value 179// might be missing, a numeric value might be outside the allowed range, or 180// a string value might exceed length constraints. 181// 182// * NamespaceAlreadyExists 183// The namespace that you're trying to create already exists. 184// 185// * ResourceLimitExceeded 186// The resource can't be created because you've reached the limit on the number 187// of resources. 188// 189// * DuplicateRequest 190// The operation is already in progress. 191// 192// * TooManyTagsException 193// The list of tags on the resource is over the limit. The maximum number of 194// tags that can be applied to a resource is 50. 195// 196// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePrivateDnsNamespace 197func (c *ServiceDiscovery) CreatePrivateDnsNamespace(input *CreatePrivateDnsNamespaceInput) (*CreatePrivateDnsNamespaceOutput, error) { 198 req, out := c.CreatePrivateDnsNamespaceRequest(input) 199 return out, req.Send() 200} 201 202// CreatePrivateDnsNamespaceWithContext is the same as CreatePrivateDnsNamespace with the addition of 203// the ability to pass a context and additional request options. 204// 205// See CreatePrivateDnsNamespace for details on how to use this API operation. 206// 207// The context must be non-nil and will be used for request cancellation. If 208// the context is nil a panic will occur. In the future the SDK may create 209// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 210// for more information on using Contexts. 211func (c *ServiceDiscovery) CreatePrivateDnsNamespaceWithContext(ctx aws.Context, input *CreatePrivateDnsNamespaceInput, opts ...request.Option) (*CreatePrivateDnsNamespaceOutput, error) { 212 req, out := c.CreatePrivateDnsNamespaceRequest(input) 213 req.SetContext(ctx) 214 req.ApplyOptions(opts...) 215 return out, req.Send() 216} 217 218const opCreatePublicDnsNamespace = "CreatePublicDnsNamespace" 219 220// CreatePublicDnsNamespaceRequest generates a "aws/request.Request" representing the 221// client's request for the CreatePublicDnsNamespace operation. The "output" return 222// value will be populated with the request's response once the request completes 223// successfully. 224// 225// Use "Send" method on the returned Request to send the API call to the service. 226// the "output" return value is not valid until after Send returns without error. 227// 228// See CreatePublicDnsNamespace for more information on using the CreatePublicDnsNamespace 229// API call, and error handling. 230// 231// This method is useful when you want to inject custom logic or configuration 232// into the SDK's request lifecycle. Such as custom headers, or retry logic. 233// 234// 235// // Example sending a request using the CreatePublicDnsNamespaceRequest method. 236// req, resp := client.CreatePublicDnsNamespaceRequest(params) 237// 238// err := req.Send() 239// if err == nil { // resp is now filled 240// fmt.Println(resp) 241// } 242// 243// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePublicDnsNamespace 244func (c *ServiceDiscovery) CreatePublicDnsNamespaceRequest(input *CreatePublicDnsNamespaceInput) (req *request.Request, output *CreatePublicDnsNamespaceOutput) { 245 op := &request.Operation{ 246 Name: opCreatePublicDnsNamespace, 247 HTTPMethod: "POST", 248 HTTPPath: "/", 249 } 250 251 if input == nil { 252 input = &CreatePublicDnsNamespaceInput{} 253 } 254 255 output = &CreatePublicDnsNamespaceOutput{} 256 req = c.newRequest(op, input, output) 257 return 258} 259 260// CreatePublicDnsNamespace API operation for AWS Cloud Map. 261// 262// Creates a public namespace based on DNS, which will be visible on the internet. 263// The namespace defines your service naming scheme. For example, if you name 264// your namespace example.com and name your service backend, the resulting DNS 265// name for the service will be backend.example.com. For the current limit on 266// the number of namespaces that you can create using the same AWS account, 267// see AWS Cloud Map Limits (https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) 268// in the AWS Cloud Map Developer Guide. 269// 270// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 271// with awserr.Error's Code and Message methods to get detailed information about 272// the error. 273// 274// See the AWS API reference guide for AWS Cloud Map's 275// API operation CreatePublicDnsNamespace for usage and error information. 276// 277// Returned Error Types: 278// * InvalidInput 279// One or more specified values aren't valid. For example, a required value 280// might be missing, a numeric value might be outside the allowed range, or 281// a string value might exceed length constraints. 282// 283// * NamespaceAlreadyExists 284// The namespace that you're trying to create already exists. 285// 286// * ResourceLimitExceeded 287// The resource can't be created because you've reached the limit on the number 288// of resources. 289// 290// * DuplicateRequest 291// The operation is already in progress. 292// 293// * TooManyTagsException 294// The list of tags on the resource is over the limit. The maximum number of 295// tags that can be applied to a resource is 50. 296// 297// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePublicDnsNamespace 298func (c *ServiceDiscovery) CreatePublicDnsNamespace(input *CreatePublicDnsNamespaceInput) (*CreatePublicDnsNamespaceOutput, error) { 299 req, out := c.CreatePublicDnsNamespaceRequest(input) 300 return out, req.Send() 301} 302 303// CreatePublicDnsNamespaceWithContext is the same as CreatePublicDnsNamespace with the addition of 304// the ability to pass a context and additional request options. 305// 306// See CreatePublicDnsNamespace for details on how to use this API operation. 307// 308// The context must be non-nil and will be used for request cancellation. If 309// the context is nil a panic will occur. In the future the SDK may create 310// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 311// for more information on using Contexts. 312func (c *ServiceDiscovery) CreatePublicDnsNamespaceWithContext(ctx aws.Context, input *CreatePublicDnsNamespaceInput, opts ...request.Option) (*CreatePublicDnsNamespaceOutput, error) { 313 req, out := c.CreatePublicDnsNamespaceRequest(input) 314 req.SetContext(ctx) 315 req.ApplyOptions(opts...) 316 return out, req.Send() 317} 318 319const opCreateService = "CreateService" 320 321// CreateServiceRequest generates a "aws/request.Request" representing the 322// client's request for the CreateService operation. The "output" return 323// value will be populated with the request's response once the request completes 324// successfully. 325// 326// Use "Send" method on the returned Request to send the API call to the service. 327// the "output" return value is not valid until after Send returns without error. 328// 329// See CreateService for more information on using the CreateService 330// API call, and error handling. 331// 332// This method is useful when you want to inject custom logic or configuration 333// into the SDK's request lifecycle. Such as custom headers, or retry logic. 334// 335// 336// // Example sending a request using the CreateServiceRequest method. 337// req, resp := client.CreateServiceRequest(params) 338// 339// err := req.Send() 340// if err == nil { // resp is now filled 341// fmt.Println(resp) 342// } 343// 344// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateService 345func (c *ServiceDiscovery) CreateServiceRequest(input *CreateServiceInput) (req *request.Request, output *CreateServiceOutput) { 346 op := &request.Operation{ 347 Name: opCreateService, 348 HTTPMethod: "POST", 349 HTTPPath: "/", 350 } 351 352 if input == nil { 353 input = &CreateServiceInput{} 354 } 355 356 output = &CreateServiceOutput{} 357 req = c.newRequest(op, input, output) 358 return 359} 360 361// CreateService API operation for AWS Cloud Map. 362// 363// Creates a service, which defines the configuration for the following entities: 364// 365// * For public and private DNS namespaces, one of the following combinations 366// of DNS records in Amazon Route 53: A AAAA A and AAAA SRV CNAME 367// 368// * Optionally, a health check 369// 370// After you create the service, you can submit a RegisterInstance (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html) 371// request, and AWS Cloud Map uses the values in the configuration to create 372// the specified entities. 373// 374// For the current limit on the number of instances that you can register using 375// the same namespace and using the same service, see AWS Cloud Map Limits (https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) 376// in the AWS Cloud Map Developer Guide. 377// 378// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 379// with awserr.Error's Code and Message methods to get detailed information about 380// the error. 381// 382// See the AWS API reference guide for AWS Cloud Map's 383// API operation CreateService for usage and error information. 384// 385// Returned Error Types: 386// * InvalidInput 387// One or more specified values aren't valid. For example, a required value 388// might be missing, a numeric value might be outside the allowed range, or 389// a string value might exceed length constraints. 390// 391// * ResourceLimitExceeded 392// The resource can't be created because you've reached the limit on the number 393// of resources. 394// 395// * NamespaceNotFound 396// No namespace exists with the specified ID. 397// 398// * ServiceAlreadyExists 399// The service can't be created because a service with the same name already 400// exists. 401// 402// * TooManyTagsException 403// The list of tags on the resource is over the limit. The maximum number of 404// tags that can be applied to a resource is 50. 405// 406// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateService 407func (c *ServiceDiscovery) CreateService(input *CreateServiceInput) (*CreateServiceOutput, error) { 408 req, out := c.CreateServiceRequest(input) 409 return out, req.Send() 410} 411 412// CreateServiceWithContext is the same as CreateService with the addition of 413// the ability to pass a context and additional request options. 414// 415// See CreateService for details on how to use this API operation. 416// 417// The context must be non-nil and will be used for request cancellation. If 418// the context is nil a panic will occur. In the future the SDK may create 419// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 420// for more information on using Contexts. 421func (c *ServiceDiscovery) CreateServiceWithContext(ctx aws.Context, input *CreateServiceInput, opts ...request.Option) (*CreateServiceOutput, error) { 422 req, out := c.CreateServiceRequest(input) 423 req.SetContext(ctx) 424 req.ApplyOptions(opts...) 425 return out, req.Send() 426} 427 428const opDeleteNamespace = "DeleteNamespace" 429 430// DeleteNamespaceRequest generates a "aws/request.Request" representing the 431// client's request for the DeleteNamespace operation. The "output" return 432// value will be populated with the request's response once the request completes 433// successfully. 434// 435// Use "Send" method on the returned Request to send the API call to the service. 436// the "output" return value is not valid until after Send returns without error. 437// 438// See DeleteNamespace for more information on using the DeleteNamespace 439// API call, and error handling. 440// 441// This method is useful when you want to inject custom logic or configuration 442// into the SDK's request lifecycle. Such as custom headers, or retry logic. 443// 444// 445// // Example sending a request using the DeleteNamespaceRequest method. 446// req, resp := client.DeleteNamespaceRequest(params) 447// 448// err := req.Send() 449// if err == nil { // resp is now filled 450// fmt.Println(resp) 451// } 452// 453// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteNamespace 454func (c *ServiceDiscovery) DeleteNamespaceRequest(input *DeleteNamespaceInput) (req *request.Request, output *DeleteNamespaceOutput) { 455 op := &request.Operation{ 456 Name: opDeleteNamespace, 457 HTTPMethod: "POST", 458 HTTPPath: "/", 459 } 460 461 if input == nil { 462 input = &DeleteNamespaceInput{} 463 } 464 465 output = &DeleteNamespaceOutput{} 466 req = c.newRequest(op, input, output) 467 return 468} 469 470// DeleteNamespace API operation for AWS Cloud Map. 471// 472// Deletes a namespace from the current account. If the namespace still contains 473// one or more services, the request fails. 474// 475// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 476// with awserr.Error's Code and Message methods to get detailed information about 477// the error. 478// 479// See the AWS API reference guide for AWS Cloud Map's 480// API operation DeleteNamespace for usage and error information. 481// 482// Returned Error Types: 483// * InvalidInput 484// One or more specified values aren't valid. For example, a required value 485// might be missing, a numeric value might be outside the allowed range, or 486// a string value might exceed length constraints. 487// 488// * NamespaceNotFound 489// No namespace exists with the specified ID. 490// 491// * ResourceInUse 492// The specified resource can't be deleted because it contains other resources. 493// For example, you can't delete a service that contains any instances. 494// 495// * DuplicateRequest 496// The operation is already in progress. 497// 498// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteNamespace 499func (c *ServiceDiscovery) DeleteNamespace(input *DeleteNamespaceInput) (*DeleteNamespaceOutput, error) { 500 req, out := c.DeleteNamespaceRequest(input) 501 return out, req.Send() 502} 503 504// DeleteNamespaceWithContext is the same as DeleteNamespace with the addition of 505// the ability to pass a context and additional request options. 506// 507// See DeleteNamespace for details on how to use this API operation. 508// 509// The context must be non-nil and will be used for request cancellation. If 510// the context is nil a panic will occur. In the future the SDK may create 511// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 512// for more information on using Contexts. 513func (c *ServiceDiscovery) DeleteNamespaceWithContext(ctx aws.Context, input *DeleteNamespaceInput, opts ...request.Option) (*DeleteNamespaceOutput, error) { 514 req, out := c.DeleteNamespaceRequest(input) 515 req.SetContext(ctx) 516 req.ApplyOptions(opts...) 517 return out, req.Send() 518} 519 520const opDeleteService = "DeleteService" 521 522// DeleteServiceRequest generates a "aws/request.Request" representing the 523// client's request for the DeleteService operation. The "output" return 524// value will be populated with the request's response once the request completes 525// successfully. 526// 527// Use "Send" method on the returned Request to send the API call to the service. 528// the "output" return value is not valid until after Send returns without error. 529// 530// See DeleteService for more information on using the DeleteService 531// API call, and error handling. 532// 533// This method is useful when you want to inject custom logic or configuration 534// into the SDK's request lifecycle. Such as custom headers, or retry logic. 535// 536// 537// // Example sending a request using the DeleteServiceRequest method. 538// req, resp := client.DeleteServiceRequest(params) 539// 540// err := req.Send() 541// if err == nil { // resp is now filled 542// fmt.Println(resp) 543// } 544// 545// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteService 546func (c *ServiceDiscovery) DeleteServiceRequest(input *DeleteServiceInput) (req *request.Request, output *DeleteServiceOutput) { 547 op := &request.Operation{ 548 Name: opDeleteService, 549 HTTPMethod: "POST", 550 HTTPPath: "/", 551 } 552 553 if input == nil { 554 input = &DeleteServiceInput{} 555 } 556 557 output = &DeleteServiceOutput{} 558 req = c.newRequest(op, input, output) 559 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 560 return 561} 562 563// DeleteService API operation for AWS Cloud Map. 564// 565// Deletes a specified service. If the service still contains one or more registered 566// instances, the request fails. 567// 568// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 569// with awserr.Error's Code and Message methods to get detailed information about 570// the error. 571// 572// See the AWS API reference guide for AWS Cloud Map's 573// API operation DeleteService for usage and error information. 574// 575// Returned Error Types: 576// * InvalidInput 577// One or more specified values aren't valid. For example, a required value 578// might be missing, a numeric value might be outside the allowed range, or 579// a string value might exceed length constraints. 580// 581// * ServiceNotFound 582// No service exists with the specified ID. 583// 584// * ResourceInUse 585// The specified resource can't be deleted because it contains other resources. 586// For example, you can't delete a service that contains any instances. 587// 588// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteService 589func (c *ServiceDiscovery) DeleteService(input *DeleteServiceInput) (*DeleteServiceOutput, error) { 590 req, out := c.DeleteServiceRequest(input) 591 return out, req.Send() 592} 593 594// DeleteServiceWithContext is the same as DeleteService with the addition of 595// the ability to pass a context and additional request options. 596// 597// See DeleteService for details on how to use this API operation. 598// 599// The context must be non-nil and will be used for request cancellation. If 600// the context is nil a panic will occur. In the future the SDK may create 601// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 602// for more information on using Contexts. 603func (c *ServiceDiscovery) DeleteServiceWithContext(ctx aws.Context, input *DeleteServiceInput, opts ...request.Option) (*DeleteServiceOutput, error) { 604 req, out := c.DeleteServiceRequest(input) 605 req.SetContext(ctx) 606 req.ApplyOptions(opts...) 607 return out, req.Send() 608} 609 610const opDeregisterInstance = "DeregisterInstance" 611 612// DeregisterInstanceRequest generates a "aws/request.Request" representing the 613// client's request for the DeregisterInstance operation. The "output" return 614// value will be populated with the request's response once the request completes 615// successfully. 616// 617// Use "Send" method on the returned Request to send the API call to the service. 618// the "output" return value is not valid until after Send returns without error. 619// 620// See DeregisterInstance for more information on using the DeregisterInstance 621// API call, and error handling. 622// 623// This method is useful when you want to inject custom logic or configuration 624// into the SDK's request lifecycle. Such as custom headers, or retry logic. 625// 626// 627// // Example sending a request using the DeregisterInstanceRequest method. 628// req, resp := client.DeregisterInstanceRequest(params) 629// 630// err := req.Send() 631// if err == nil { // resp is now filled 632// fmt.Println(resp) 633// } 634// 635// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeregisterInstance 636func (c *ServiceDiscovery) DeregisterInstanceRequest(input *DeregisterInstanceInput) (req *request.Request, output *DeregisterInstanceOutput) { 637 op := &request.Operation{ 638 Name: opDeregisterInstance, 639 HTTPMethod: "POST", 640 HTTPPath: "/", 641 } 642 643 if input == nil { 644 input = &DeregisterInstanceInput{} 645 } 646 647 output = &DeregisterInstanceOutput{} 648 req = c.newRequest(op, input, output) 649 return 650} 651 652// DeregisterInstance API operation for AWS Cloud Map. 653// 654// Deletes the Amazon Route 53 DNS records and health check, if any, that AWS 655// Cloud Map created for the specified instance. 656// 657// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 658// with awserr.Error's Code and Message methods to get detailed information about 659// the error. 660// 661// See the AWS API reference guide for AWS Cloud Map's 662// API operation DeregisterInstance for usage and error information. 663// 664// Returned Error Types: 665// * DuplicateRequest 666// The operation is already in progress. 667// 668// * InvalidInput 669// One or more specified values aren't valid. For example, a required value 670// might be missing, a numeric value might be outside the allowed range, or 671// a string value might exceed length constraints. 672// 673// * InstanceNotFound 674// No instance exists with the specified ID, or the instance was recently registered, 675// and information about the instance hasn't propagated yet. 676// 677// * ResourceInUse 678// The specified resource can't be deleted because it contains other resources. 679// For example, you can't delete a service that contains any instances. 680// 681// * ServiceNotFound 682// No service exists with the specified ID. 683// 684// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeregisterInstance 685func (c *ServiceDiscovery) DeregisterInstance(input *DeregisterInstanceInput) (*DeregisterInstanceOutput, error) { 686 req, out := c.DeregisterInstanceRequest(input) 687 return out, req.Send() 688} 689 690// DeregisterInstanceWithContext is the same as DeregisterInstance with the addition of 691// the ability to pass a context and additional request options. 692// 693// See DeregisterInstance for details on how to use this API operation. 694// 695// The context must be non-nil and will be used for request cancellation. If 696// the context is nil a panic will occur. In the future the SDK may create 697// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 698// for more information on using Contexts. 699func (c *ServiceDiscovery) DeregisterInstanceWithContext(ctx aws.Context, input *DeregisterInstanceInput, opts ...request.Option) (*DeregisterInstanceOutput, error) { 700 req, out := c.DeregisterInstanceRequest(input) 701 req.SetContext(ctx) 702 req.ApplyOptions(opts...) 703 return out, req.Send() 704} 705 706const opDiscoverInstances = "DiscoverInstances" 707 708// DiscoverInstancesRequest generates a "aws/request.Request" representing the 709// client's request for the DiscoverInstances operation. The "output" return 710// value will be populated with the request's response once the request completes 711// successfully. 712// 713// Use "Send" method on the returned Request to send the API call to the service. 714// the "output" return value is not valid until after Send returns without error. 715// 716// See DiscoverInstances for more information on using the DiscoverInstances 717// API call, and error handling. 718// 719// This method is useful when you want to inject custom logic or configuration 720// into the SDK's request lifecycle. Such as custom headers, or retry logic. 721// 722// 723// // Example sending a request using the DiscoverInstancesRequest method. 724// req, resp := client.DiscoverInstancesRequest(params) 725// 726// err := req.Send() 727// if err == nil { // resp is now filled 728// fmt.Println(resp) 729// } 730// 731// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DiscoverInstances 732func (c *ServiceDiscovery) DiscoverInstancesRequest(input *DiscoverInstancesInput) (req *request.Request, output *DiscoverInstancesOutput) { 733 op := &request.Operation{ 734 Name: opDiscoverInstances, 735 HTTPMethod: "POST", 736 HTTPPath: "/", 737 } 738 739 if input == nil { 740 input = &DiscoverInstancesInput{} 741 } 742 743 output = &DiscoverInstancesOutput{} 744 req = c.newRequest(op, input, output) 745 req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("data-", nil)) 746 req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) 747 return 748} 749 750// DiscoverInstances API operation for AWS Cloud Map. 751// 752// Discovers registered instances for a specified namespace and service. You 753// can use DiscoverInstances to discover instances for any type of namespace. 754// For public and private DNS namespaces, you can also use DNS queries to discover 755// instances. 756// 757// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 758// with awserr.Error's Code and Message methods to get detailed information about 759// the error. 760// 761// See the AWS API reference guide for AWS Cloud Map's 762// API operation DiscoverInstances for usage and error information. 763// 764// Returned Error Types: 765// * ServiceNotFound 766// No service exists with the specified ID. 767// 768// * NamespaceNotFound 769// No namespace exists with the specified ID. 770// 771// * InvalidInput 772// One or more specified values aren't valid. For example, a required value 773// might be missing, a numeric value might be outside the allowed range, or 774// a string value might exceed length constraints. 775// 776// * RequestLimitExceeded 777// The operation can't be completed because you've reached the limit on the 778// number of requests. 779// 780// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DiscoverInstances 781func (c *ServiceDiscovery) DiscoverInstances(input *DiscoverInstancesInput) (*DiscoverInstancesOutput, error) { 782 req, out := c.DiscoverInstancesRequest(input) 783 return out, req.Send() 784} 785 786// DiscoverInstancesWithContext is the same as DiscoverInstances with the addition of 787// the ability to pass a context and additional request options. 788// 789// See DiscoverInstances for details on how to use this API operation. 790// 791// The context must be non-nil and will be used for request cancellation. If 792// the context is nil a panic will occur. In the future the SDK may create 793// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 794// for more information on using Contexts. 795func (c *ServiceDiscovery) DiscoverInstancesWithContext(ctx aws.Context, input *DiscoverInstancesInput, opts ...request.Option) (*DiscoverInstancesOutput, error) { 796 req, out := c.DiscoverInstancesRequest(input) 797 req.SetContext(ctx) 798 req.ApplyOptions(opts...) 799 return out, req.Send() 800} 801 802const opGetInstance = "GetInstance" 803 804// GetInstanceRequest generates a "aws/request.Request" representing the 805// client's request for the GetInstance operation. The "output" return 806// value will be populated with the request's response once the request completes 807// successfully. 808// 809// Use "Send" method on the returned Request to send the API call to the service. 810// the "output" return value is not valid until after Send returns without error. 811// 812// See GetInstance for more information on using the GetInstance 813// API call, and error handling. 814// 815// This method is useful when you want to inject custom logic or configuration 816// into the SDK's request lifecycle. Such as custom headers, or retry logic. 817// 818// 819// // Example sending a request using the GetInstanceRequest method. 820// req, resp := client.GetInstanceRequest(params) 821// 822// err := req.Send() 823// if err == nil { // resp is now filled 824// fmt.Println(resp) 825// } 826// 827// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstance 828func (c *ServiceDiscovery) GetInstanceRequest(input *GetInstanceInput) (req *request.Request, output *GetInstanceOutput) { 829 op := &request.Operation{ 830 Name: opGetInstance, 831 HTTPMethod: "POST", 832 HTTPPath: "/", 833 } 834 835 if input == nil { 836 input = &GetInstanceInput{} 837 } 838 839 output = &GetInstanceOutput{} 840 req = c.newRequest(op, input, output) 841 return 842} 843 844// GetInstance API operation for AWS Cloud Map. 845// 846// Gets information about a specified instance. 847// 848// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 849// with awserr.Error's Code and Message methods to get detailed information about 850// the error. 851// 852// See the AWS API reference guide for AWS Cloud Map's 853// API operation GetInstance for usage and error information. 854// 855// Returned Error Types: 856// * InstanceNotFound 857// No instance exists with the specified ID, or the instance was recently registered, 858// and information about the instance hasn't propagated yet. 859// 860// * InvalidInput 861// One or more specified values aren't valid. For example, a required value 862// might be missing, a numeric value might be outside the allowed range, or 863// a string value might exceed length constraints. 864// 865// * ServiceNotFound 866// No service exists with the specified ID. 867// 868// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstance 869func (c *ServiceDiscovery) GetInstance(input *GetInstanceInput) (*GetInstanceOutput, error) { 870 req, out := c.GetInstanceRequest(input) 871 return out, req.Send() 872} 873 874// GetInstanceWithContext is the same as GetInstance with the addition of 875// the ability to pass a context and additional request options. 876// 877// See GetInstance for details on how to use this API operation. 878// 879// The context must be non-nil and will be used for request cancellation. If 880// the context is nil a panic will occur. In the future the SDK may create 881// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 882// for more information on using Contexts. 883func (c *ServiceDiscovery) GetInstanceWithContext(ctx aws.Context, input *GetInstanceInput, opts ...request.Option) (*GetInstanceOutput, error) { 884 req, out := c.GetInstanceRequest(input) 885 req.SetContext(ctx) 886 req.ApplyOptions(opts...) 887 return out, req.Send() 888} 889 890const opGetInstancesHealthStatus = "GetInstancesHealthStatus" 891 892// GetInstancesHealthStatusRequest generates a "aws/request.Request" representing the 893// client's request for the GetInstancesHealthStatus operation. The "output" return 894// value will be populated with the request's response once the request completes 895// successfully. 896// 897// Use "Send" method on the returned Request to send the API call to the service. 898// the "output" return value is not valid until after Send returns without error. 899// 900// See GetInstancesHealthStatus for more information on using the GetInstancesHealthStatus 901// API call, and error handling. 902// 903// This method is useful when you want to inject custom logic or configuration 904// into the SDK's request lifecycle. Such as custom headers, or retry logic. 905// 906// 907// // Example sending a request using the GetInstancesHealthStatusRequest method. 908// req, resp := client.GetInstancesHealthStatusRequest(params) 909// 910// err := req.Send() 911// if err == nil { // resp is now filled 912// fmt.Println(resp) 913// } 914// 915// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstancesHealthStatus 916func (c *ServiceDiscovery) GetInstancesHealthStatusRequest(input *GetInstancesHealthStatusInput) (req *request.Request, output *GetInstancesHealthStatusOutput) { 917 op := &request.Operation{ 918 Name: opGetInstancesHealthStatus, 919 HTTPMethod: "POST", 920 HTTPPath: "/", 921 Paginator: &request.Paginator{ 922 InputTokens: []string{"NextToken"}, 923 OutputTokens: []string{"NextToken"}, 924 LimitToken: "MaxResults", 925 TruncationToken: "", 926 }, 927 } 928 929 if input == nil { 930 input = &GetInstancesHealthStatusInput{} 931 } 932 933 output = &GetInstancesHealthStatusOutput{} 934 req = c.newRequest(op, input, output) 935 return 936} 937 938// GetInstancesHealthStatus API operation for AWS Cloud Map. 939// 940// Gets the current health status (Healthy, Unhealthy, or Unknown) of one or 941// more instances that are associated with a specified service. 942// 943// There is a brief delay between when you register an instance and when the 944// health status for the instance is available. 945// 946// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 947// with awserr.Error's Code and Message methods to get detailed information about 948// the error. 949// 950// See the AWS API reference guide for AWS Cloud Map's 951// API operation GetInstancesHealthStatus for usage and error information. 952// 953// Returned Error Types: 954// * InstanceNotFound 955// No instance exists with the specified ID, or the instance was recently registered, 956// and information about the instance hasn't propagated yet. 957// 958// * InvalidInput 959// One or more specified values aren't valid. For example, a required value 960// might be missing, a numeric value might be outside the allowed range, or 961// a string value might exceed length constraints. 962// 963// * ServiceNotFound 964// No service exists with the specified ID. 965// 966// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstancesHealthStatus 967func (c *ServiceDiscovery) GetInstancesHealthStatus(input *GetInstancesHealthStatusInput) (*GetInstancesHealthStatusOutput, error) { 968 req, out := c.GetInstancesHealthStatusRequest(input) 969 return out, req.Send() 970} 971 972// GetInstancesHealthStatusWithContext is the same as GetInstancesHealthStatus with the addition of 973// the ability to pass a context and additional request options. 974// 975// See GetInstancesHealthStatus for details on how to use this API operation. 976// 977// The context must be non-nil and will be used for request cancellation. If 978// the context is nil a panic will occur. In the future the SDK may create 979// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 980// for more information on using Contexts. 981func (c *ServiceDiscovery) GetInstancesHealthStatusWithContext(ctx aws.Context, input *GetInstancesHealthStatusInput, opts ...request.Option) (*GetInstancesHealthStatusOutput, error) { 982 req, out := c.GetInstancesHealthStatusRequest(input) 983 req.SetContext(ctx) 984 req.ApplyOptions(opts...) 985 return out, req.Send() 986} 987 988// GetInstancesHealthStatusPages iterates over the pages of a GetInstancesHealthStatus operation, 989// calling the "fn" function with the response data for each page. To stop 990// iterating, return false from the fn function. 991// 992// See GetInstancesHealthStatus method for more information on how to use this operation. 993// 994// Note: This operation can generate multiple requests to a service. 995// 996// // Example iterating over at most 3 pages of a GetInstancesHealthStatus operation. 997// pageNum := 0 998// err := client.GetInstancesHealthStatusPages(params, 999// func(page *servicediscovery.GetInstancesHealthStatusOutput, lastPage bool) bool { 1000// pageNum++ 1001// fmt.Println(page) 1002// return pageNum <= 3 1003// }) 1004// 1005func (c *ServiceDiscovery) GetInstancesHealthStatusPages(input *GetInstancesHealthStatusInput, fn func(*GetInstancesHealthStatusOutput, bool) bool) error { 1006 return c.GetInstancesHealthStatusPagesWithContext(aws.BackgroundContext(), input, fn) 1007} 1008 1009// GetInstancesHealthStatusPagesWithContext same as GetInstancesHealthStatusPages except 1010// it takes a Context and allows setting request options on the pages. 1011// 1012// The context must be non-nil and will be used for request cancellation. If 1013// the context is nil a panic will occur. In the future the SDK may create 1014// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1015// for more information on using Contexts. 1016func (c *ServiceDiscovery) GetInstancesHealthStatusPagesWithContext(ctx aws.Context, input *GetInstancesHealthStatusInput, fn func(*GetInstancesHealthStatusOutput, bool) bool, opts ...request.Option) error { 1017 p := request.Pagination{ 1018 NewRequest: func() (*request.Request, error) { 1019 var inCpy *GetInstancesHealthStatusInput 1020 if input != nil { 1021 tmp := *input 1022 inCpy = &tmp 1023 } 1024 req, _ := c.GetInstancesHealthStatusRequest(inCpy) 1025 req.SetContext(ctx) 1026 req.ApplyOptions(opts...) 1027 return req, nil 1028 }, 1029 } 1030 1031 for p.Next() { 1032 if !fn(p.Page().(*GetInstancesHealthStatusOutput), !p.HasNextPage()) { 1033 break 1034 } 1035 } 1036 1037 return p.Err() 1038} 1039 1040const opGetNamespace = "GetNamespace" 1041 1042// GetNamespaceRequest generates a "aws/request.Request" representing the 1043// client's request for the GetNamespace operation. The "output" return 1044// value will be populated with the request's response once the request completes 1045// successfully. 1046// 1047// Use "Send" method on the returned Request to send the API call to the service. 1048// the "output" return value is not valid until after Send returns without error. 1049// 1050// See GetNamespace for more information on using the GetNamespace 1051// API call, and error handling. 1052// 1053// This method is useful when you want to inject custom logic or configuration 1054// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1055// 1056// 1057// // Example sending a request using the GetNamespaceRequest method. 1058// req, resp := client.GetNamespaceRequest(params) 1059// 1060// err := req.Send() 1061// if err == nil { // resp is now filled 1062// fmt.Println(resp) 1063// } 1064// 1065// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetNamespace 1066func (c *ServiceDiscovery) GetNamespaceRequest(input *GetNamespaceInput) (req *request.Request, output *GetNamespaceOutput) { 1067 op := &request.Operation{ 1068 Name: opGetNamespace, 1069 HTTPMethod: "POST", 1070 HTTPPath: "/", 1071 } 1072 1073 if input == nil { 1074 input = &GetNamespaceInput{} 1075 } 1076 1077 output = &GetNamespaceOutput{} 1078 req = c.newRequest(op, input, output) 1079 return 1080} 1081 1082// GetNamespace API operation for AWS Cloud Map. 1083// 1084// Gets information about a namespace. 1085// 1086// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1087// with awserr.Error's Code and Message methods to get detailed information about 1088// the error. 1089// 1090// See the AWS API reference guide for AWS Cloud Map's 1091// API operation GetNamespace for usage and error information. 1092// 1093// Returned Error Types: 1094// * InvalidInput 1095// One or more specified values aren't valid. For example, a required value 1096// might be missing, a numeric value might be outside the allowed range, or 1097// a string value might exceed length constraints. 1098// 1099// * NamespaceNotFound 1100// No namespace exists with the specified ID. 1101// 1102// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetNamespace 1103func (c *ServiceDiscovery) GetNamespace(input *GetNamespaceInput) (*GetNamespaceOutput, error) { 1104 req, out := c.GetNamespaceRequest(input) 1105 return out, req.Send() 1106} 1107 1108// GetNamespaceWithContext is the same as GetNamespace with the addition of 1109// the ability to pass a context and additional request options. 1110// 1111// See GetNamespace for details on how to use this API operation. 1112// 1113// The context must be non-nil and will be used for request cancellation. If 1114// the context is nil a panic will occur. In the future the SDK may create 1115// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1116// for more information on using Contexts. 1117func (c *ServiceDiscovery) GetNamespaceWithContext(ctx aws.Context, input *GetNamespaceInput, opts ...request.Option) (*GetNamespaceOutput, error) { 1118 req, out := c.GetNamespaceRequest(input) 1119 req.SetContext(ctx) 1120 req.ApplyOptions(opts...) 1121 return out, req.Send() 1122} 1123 1124const opGetOperation = "GetOperation" 1125 1126// GetOperationRequest generates a "aws/request.Request" representing the 1127// client's request for the GetOperation operation. The "output" return 1128// value will be populated with the request's response once the request completes 1129// successfully. 1130// 1131// Use "Send" method on the returned Request to send the API call to the service. 1132// the "output" return value is not valid until after Send returns without error. 1133// 1134// See GetOperation for more information on using the GetOperation 1135// API call, and error handling. 1136// 1137// This method is useful when you want to inject custom logic or configuration 1138// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1139// 1140// 1141// // Example sending a request using the GetOperationRequest method. 1142// req, resp := client.GetOperationRequest(params) 1143// 1144// err := req.Send() 1145// if err == nil { // resp is now filled 1146// fmt.Println(resp) 1147// } 1148// 1149// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetOperation 1150func (c *ServiceDiscovery) GetOperationRequest(input *GetOperationInput) (req *request.Request, output *GetOperationOutput) { 1151 op := &request.Operation{ 1152 Name: opGetOperation, 1153 HTTPMethod: "POST", 1154 HTTPPath: "/", 1155 } 1156 1157 if input == nil { 1158 input = &GetOperationInput{} 1159 } 1160 1161 output = &GetOperationOutput{} 1162 req = c.newRequest(op, input, output) 1163 return 1164} 1165 1166// GetOperation API operation for AWS Cloud Map. 1167// 1168// Gets information about any operation that returns an operation ID in the 1169// response, such as a CreateService request. 1170// 1171// To get a list of operations that match specified criteria, see ListOperations 1172// (https://docs.aws.amazon.com/cloud-map/latest/api/API_ListOperations.html). 1173// 1174// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1175// with awserr.Error's Code and Message methods to get detailed information about 1176// the error. 1177// 1178// See the AWS API reference guide for AWS Cloud Map's 1179// API operation GetOperation for usage and error information. 1180// 1181// Returned Error Types: 1182// * InvalidInput 1183// One or more specified values aren't valid. For example, a required value 1184// might be missing, a numeric value might be outside the allowed range, or 1185// a string value might exceed length constraints. 1186// 1187// * OperationNotFound 1188// No operation exists with the specified ID. 1189// 1190// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetOperation 1191func (c *ServiceDiscovery) GetOperation(input *GetOperationInput) (*GetOperationOutput, error) { 1192 req, out := c.GetOperationRequest(input) 1193 return out, req.Send() 1194} 1195 1196// GetOperationWithContext is the same as GetOperation with the addition of 1197// the ability to pass a context and additional request options. 1198// 1199// See GetOperation for details on how to use this API operation. 1200// 1201// The context must be non-nil and will be used for request cancellation. If 1202// the context is nil a panic will occur. In the future the SDK may create 1203// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1204// for more information on using Contexts. 1205func (c *ServiceDiscovery) GetOperationWithContext(ctx aws.Context, input *GetOperationInput, opts ...request.Option) (*GetOperationOutput, error) { 1206 req, out := c.GetOperationRequest(input) 1207 req.SetContext(ctx) 1208 req.ApplyOptions(opts...) 1209 return out, req.Send() 1210} 1211 1212const opGetService = "GetService" 1213 1214// GetServiceRequest generates a "aws/request.Request" representing the 1215// client's request for the GetService operation. The "output" return 1216// value will be populated with the request's response once the request completes 1217// successfully. 1218// 1219// Use "Send" method on the returned Request to send the API call to the service. 1220// the "output" return value is not valid until after Send returns without error. 1221// 1222// See GetService for more information on using the GetService 1223// API call, and error handling. 1224// 1225// This method is useful when you want to inject custom logic or configuration 1226// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1227// 1228// 1229// // Example sending a request using the GetServiceRequest method. 1230// req, resp := client.GetServiceRequest(params) 1231// 1232// err := req.Send() 1233// if err == nil { // resp is now filled 1234// fmt.Println(resp) 1235// } 1236// 1237// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetService 1238func (c *ServiceDiscovery) GetServiceRequest(input *GetServiceInput) (req *request.Request, output *GetServiceOutput) { 1239 op := &request.Operation{ 1240 Name: opGetService, 1241 HTTPMethod: "POST", 1242 HTTPPath: "/", 1243 } 1244 1245 if input == nil { 1246 input = &GetServiceInput{} 1247 } 1248 1249 output = &GetServiceOutput{} 1250 req = c.newRequest(op, input, output) 1251 return 1252} 1253 1254// GetService API operation for AWS Cloud Map. 1255// 1256// Gets the settings for a specified service. 1257// 1258// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1259// with awserr.Error's Code and Message methods to get detailed information about 1260// the error. 1261// 1262// See the AWS API reference guide for AWS Cloud Map's 1263// API operation GetService for usage and error information. 1264// 1265// Returned Error Types: 1266// * InvalidInput 1267// One or more specified values aren't valid. For example, a required value 1268// might be missing, a numeric value might be outside the allowed range, or 1269// a string value might exceed length constraints. 1270// 1271// * ServiceNotFound 1272// No service exists with the specified ID. 1273// 1274// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetService 1275func (c *ServiceDiscovery) GetService(input *GetServiceInput) (*GetServiceOutput, error) { 1276 req, out := c.GetServiceRequest(input) 1277 return out, req.Send() 1278} 1279 1280// GetServiceWithContext is the same as GetService with the addition of 1281// the ability to pass a context and additional request options. 1282// 1283// See GetService for details on how to use this API operation. 1284// 1285// The context must be non-nil and will be used for request cancellation. If 1286// the context is nil a panic will occur. In the future the SDK may create 1287// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1288// for more information on using Contexts. 1289func (c *ServiceDiscovery) GetServiceWithContext(ctx aws.Context, input *GetServiceInput, opts ...request.Option) (*GetServiceOutput, error) { 1290 req, out := c.GetServiceRequest(input) 1291 req.SetContext(ctx) 1292 req.ApplyOptions(opts...) 1293 return out, req.Send() 1294} 1295 1296const opListInstances = "ListInstances" 1297 1298// ListInstancesRequest generates a "aws/request.Request" representing the 1299// client's request for the ListInstances operation. The "output" return 1300// value will be populated with the request's response once the request completes 1301// successfully. 1302// 1303// Use "Send" method on the returned Request to send the API call to the service. 1304// the "output" return value is not valid until after Send returns without error. 1305// 1306// See ListInstances for more information on using the ListInstances 1307// API call, and error handling. 1308// 1309// This method is useful when you want to inject custom logic or configuration 1310// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1311// 1312// 1313// // Example sending a request using the ListInstancesRequest method. 1314// req, resp := client.ListInstancesRequest(params) 1315// 1316// err := req.Send() 1317// if err == nil { // resp is now filled 1318// fmt.Println(resp) 1319// } 1320// 1321// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListInstances 1322func (c *ServiceDiscovery) ListInstancesRequest(input *ListInstancesInput) (req *request.Request, output *ListInstancesOutput) { 1323 op := &request.Operation{ 1324 Name: opListInstances, 1325 HTTPMethod: "POST", 1326 HTTPPath: "/", 1327 Paginator: &request.Paginator{ 1328 InputTokens: []string{"NextToken"}, 1329 OutputTokens: []string{"NextToken"}, 1330 LimitToken: "MaxResults", 1331 TruncationToken: "", 1332 }, 1333 } 1334 1335 if input == nil { 1336 input = &ListInstancesInput{} 1337 } 1338 1339 output = &ListInstancesOutput{} 1340 req = c.newRequest(op, input, output) 1341 return 1342} 1343 1344// ListInstances API operation for AWS Cloud Map. 1345// 1346// Lists summary information about the instances that you registered by using 1347// a specified service. 1348// 1349// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1350// with awserr.Error's Code and Message methods to get detailed information about 1351// the error. 1352// 1353// See the AWS API reference guide for AWS Cloud Map's 1354// API operation ListInstances for usage and error information. 1355// 1356// Returned Error Types: 1357// * ServiceNotFound 1358// No service exists with the specified ID. 1359// 1360// * InvalidInput 1361// One or more specified values aren't valid. For example, a required value 1362// might be missing, a numeric value might be outside the allowed range, or 1363// a string value might exceed length constraints. 1364// 1365// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListInstances 1366func (c *ServiceDiscovery) ListInstances(input *ListInstancesInput) (*ListInstancesOutput, error) { 1367 req, out := c.ListInstancesRequest(input) 1368 return out, req.Send() 1369} 1370 1371// ListInstancesWithContext is the same as ListInstances with the addition of 1372// the ability to pass a context and additional request options. 1373// 1374// See ListInstances for details on how to use this API operation. 1375// 1376// The context must be non-nil and will be used for request cancellation. If 1377// the context is nil a panic will occur. In the future the SDK may create 1378// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1379// for more information on using Contexts. 1380func (c *ServiceDiscovery) ListInstancesWithContext(ctx aws.Context, input *ListInstancesInput, opts ...request.Option) (*ListInstancesOutput, error) { 1381 req, out := c.ListInstancesRequest(input) 1382 req.SetContext(ctx) 1383 req.ApplyOptions(opts...) 1384 return out, req.Send() 1385} 1386 1387// ListInstancesPages iterates over the pages of a ListInstances operation, 1388// calling the "fn" function with the response data for each page. To stop 1389// iterating, return false from the fn function. 1390// 1391// See ListInstances method for more information on how to use this operation. 1392// 1393// Note: This operation can generate multiple requests to a service. 1394// 1395// // Example iterating over at most 3 pages of a ListInstances operation. 1396// pageNum := 0 1397// err := client.ListInstancesPages(params, 1398// func(page *servicediscovery.ListInstancesOutput, lastPage bool) bool { 1399// pageNum++ 1400// fmt.Println(page) 1401// return pageNum <= 3 1402// }) 1403// 1404func (c *ServiceDiscovery) ListInstancesPages(input *ListInstancesInput, fn func(*ListInstancesOutput, bool) bool) error { 1405 return c.ListInstancesPagesWithContext(aws.BackgroundContext(), input, fn) 1406} 1407 1408// ListInstancesPagesWithContext same as ListInstancesPages except 1409// it takes a Context and allows setting request options on the pages. 1410// 1411// The context must be non-nil and will be used for request cancellation. If 1412// the context is nil a panic will occur. In the future the SDK may create 1413// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1414// for more information on using Contexts. 1415func (c *ServiceDiscovery) ListInstancesPagesWithContext(ctx aws.Context, input *ListInstancesInput, fn func(*ListInstancesOutput, bool) bool, opts ...request.Option) error { 1416 p := request.Pagination{ 1417 NewRequest: func() (*request.Request, error) { 1418 var inCpy *ListInstancesInput 1419 if input != nil { 1420 tmp := *input 1421 inCpy = &tmp 1422 } 1423 req, _ := c.ListInstancesRequest(inCpy) 1424 req.SetContext(ctx) 1425 req.ApplyOptions(opts...) 1426 return req, nil 1427 }, 1428 } 1429 1430 for p.Next() { 1431 if !fn(p.Page().(*ListInstancesOutput), !p.HasNextPage()) { 1432 break 1433 } 1434 } 1435 1436 return p.Err() 1437} 1438 1439const opListNamespaces = "ListNamespaces" 1440 1441// ListNamespacesRequest generates a "aws/request.Request" representing the 1442// client's request for the ListNamespaces operation. The "output" return 1443// value will be populated with the request's response once the request completes 1444// successfully. 1445// 1446// Use "Send" method on the returned Request to send the API call to the service. 1447// the "output" return value is not valid until after Send returns without error. 1448// 1449// See ListNamespaces for more information on using the ListNamespaces 1450// API call, and error handling. 1451// 1452// This method is useful when you want to inject custom logic or configuration 1453// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1454// 1455// 1456// // Example sending a request using the ListNamespacesRequest method. 1457// req, resp := client.ListNamespacesRequest(params) 1458// 1459// err := req.Send() 1460// if err == nil { // resp is now filled 1461// fmt.Println(resp) 1462// } 1463// 1464// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListNamespaces 1465func (c *ServiceDiscovery) ListNamespacesRequest(input *ListNamespacesInput) (req *request.Request, output *ListNamespacesOutput) { 1466 op := &request.Operation{ 1467 Name: opListNamespaces, 1468 HTTPMethod: "POST", 1469 HTTPPath: "/", 1470 Paginator: &request.Paginator{ 1471 InputTokens: []string{"NextToken"}, 1472 OutputTokens: []string{"NextToken"}, 1473 LimitToken: "MaxResults", 1474 TruncationToken: "", 1475 }, 1476 } 1477 1478 if input == nil { 1479 input = &ListNamespacesInput{} 1480 } 1481 1482 output = &ListNamespacesOutput{} 1483 req = c.newRequest(op, input, output) 1484 return 1485} 1486 1487// ListNamespaces API operation for AWS Cloud Map. 1488// 1489// Lists summary information about the namespaces that were created by the current 1490// AWS account. 1491// 1492// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1493// with awserr.Error's Code and Message methods to get detailed information about 1494// the error. 1495// 1496// See the AWS API reference guide for AWS Cloud Map's 1497// API operation ListNamespaces for usage and error information. 1498// 1499// Returned Error Types: 1500// * InvalidInput 1501// One or more specified values aren't valid. For example, a required value 1502// might be missing, a numeric value might be outside the allowed range, or 1503// a string value might exceed length constraints. 1504// 1505// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListNamespaces 1506func (c *ServiceDiscovery) ListNamespaces(input *ListNamespacesInput) (*ListNamespacesOutput, error) { 1507 req, out := c.ListNamespacesRequest(input) 1508 return out, req.Send() 1509} 1510 1511// ListNamespacesWithContext is the same as ListNamespaces with the addition of 1512// the ability to pass a context and additional request options. 1513// 1514// See ListNamespaces for details on how to use this API operation. 1515// 1516// The context must be non-nil and will be used for request cancellation. If 1517// the context is nil a panic will occur. In the future the SDK may create 1518// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1519// for more information on using Contexts. 1520func (c *ServiceDiscovery) ListNamespacesWithContext(ctx aws.Context, input *ListNamespacesInput, opts ...request.Option) (*ListNamespacesOutput, error) { 1521 req, out := c.ListNamespacesRequest(input) 1522 req.SetContext(ctx) 1523 req.ApplyOptions(opts...) 1524 return out, req.Send() 1525} 1526 1527// ListNamespacesPages iterates over the pages of a ListNamespaces operation, 1528// calling the "fn" function with the response data for each page. To stop 1529// iterating, return false from the fn function. 1530// 1531// See ListNamespaces method for more information on how to use this operation. 1532// 1533// Note: This operation can generate multiple requests to a service. 1534// 1535// // Example iterating over at most 3 pages of a ListNamespaces operation. 1536// pageNum := 0 1537// err := client.ListNamespacesPages(params, 1538// func(page *servicediscovery.ListNamespacesOutput, lastPage bool) bool { 1539// pageNum++ 1540// fmt.Println(page) 1541// return pageNum <= 3 1542// }) 1543// 1544func (c *ServiceDiscovery) ListNamespacesPages(input *ListNamespacesInput, fn func(*ListNamespacesOutput, bool) bool) error { 1545 return c.ListNamespacesPagesWithContext(aws.BackgroundContext(), input, fn) 1546} 1547 1548// ListNamespacesPagesWithContext same as ListNamespacesPages except 1549// it takes a Context and allows setting request options on the pages. 1550// 1551// The context must be non-nil and will be used for request cancellation. If 1552// the context is nil a panic will occur. In the future the SDK may create 1553// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1554// for more information on using Contexts. 1555func (c *ServiceDiscovery) ListNamespacesPagesWithContext(ctx aws.Context, input *ListNamespacesInput, fn func(*ListNamespacesOutput, bool) bool, opts ...request.Option) error { 1556 p := request.Pagination{ 1557 NewRequest: func() (*request.Request, error) { 1558 var inCpy *ListNamespacesInput 1559 if input != nil { 1560 tmp := *input 1561 inCpy = &tmp 1562 } 1563 req, _ := c.ListNamespacesRequest(inCpy) 1564 req.SetContext(ctx) 1565 req.ApplyOptions(opts...) 1566 return req, nil 1567 }, 1568 } 1569 1570 for p.Next() { 1571 if !fn(p.Page().(*ListNamespacesOutput), !p.HasNextPage()) { 1572 break 1573 } 1574 } 1575 1576 return p.Err() 1577} 1578 1579const opListOperations = "ListOperations" 1580 1581// ListOperationsRequest generates a "aws/request.Request" representing the 1582// client's request for the ListOperations operation. The "output" return 1583// value will be populated with the request's response once the request completes 1584// successfully. 1585// 1586// Use "Send" method on the returned Request to send the API call to the service. 1587// the "output" return value is not valid until after Send returns without error. 1588// 1589// See ListOperations for more information on using the ListOperations 1590// API call, and error handling. 1591// 1592// This method is useful when you want to inject custom logic or configuration 1593// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1594// 1595// 1596// // Example sending a request using the ListOperationsRequest method. 1597// req, resp := client.ListOperationsRequest(params) 1598// 1599// err := req.Send() 1600// if err == nil { // resp is now filled 1601// fmt.Println(resp) 1602// } 1603// 1604// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListOperations 1605func (c *ServiceDiscovery) ListOperationsRequest(input *ListOperationsInput) (req *request.Request, output *ListOperationsOutput) { 1606 op := &request.Operation{ 1607 Name: opListOperations, 1608 HTTPMethod: "POST", 1609 HTTPPath: "/", 1610 Paginator: &request.Paginator{ 1611 InputTokens: []string{"NextToken"}, 1612 OutputTokens: []string{"NextToken"}, 1613 LimitToken: "MaxResults", 1614 TruncationToken: "", 1615 }, 1616 } 1617 1618 if input == nil { 1619 input = &ListOperationsInput{} 1620 } 1621 1622 output = &ListOperationsOutput{} 1623 req = c.newRequest(op, input, output) 1624 return 1625} 1626 1627// ListOperations API operation for AWS Cloud Map. 1628// 1629// Lists operations that match the criteria that you specify. 1630// 1631// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1632// with awserr.Error's Code and Message methods to get detailed information about 1633// the error. 1634// 1635// See the AWS API reference guide for AWS Cloud Map's 1636// API operation ListOperations for usage and error information. 1637// 1638// Returned Error Types: 1639// * InvalidInput 1640// One or more specified values aren't valid. For example, a required value 1641// might be missing, a numeric value might be outside the allowed range, or 1642// a string value might exceed length constraints. 1643// 1644// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListOperations 1645func (c *ServiceDiscovery) ListOperations(input *ListOperationsInput) (*ListOperationsOutput, error) { 1646 req, out := c.ListOperationsRequest(input) 1647 return out, req.Send() 1648} 1649 1650// ListOperationsWithContext is the same as ListOperations with the addition of 1651// the ability to pass a context and additional request options. 1652// 1653// See ListOperations for details on how to use this API operation. 1654// 1655// The context must be non-nil and will be used for request cancellation. If 1656// the context is nil a panic will occur. In the future the SDK may create 1657// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1658// for more information on using Contexts. 1659func (c *ServiceDiscovery) ListOperationsWithContext(ctx aws.Context, input *ListOperationsInput, opts ...request.Option) (*ListOperationsOutput, error) { 1660 req, out := c.ListOperationsRequest(input) 1661 req.SetContext(ctx) 1662 req.ApplyOptions(opts...) 1663 return out, req.Send() 1664} 1665 1666// ListOperationsPages iterates over the pages of a ListOperations operation, 1667// calling the "fn" function with the response data for each page. To stop 1668// iterating, return false from the fn function. 1669// 1670// See ListOperations method for more information on how to use this operation. 1671// 1672// Note: This operation can generate multiple requests to a service. 1673// 1674// // Example iterating over at most 3 pages of a ListOperations operation. 1675// pageNum := 0 1676// err := client.ListOperationsPages(params, 1677// func(page *servicediscovery.ListOperationsOutput, lastPage bool) bool { 1678// pageNum++ 1679// fmt.Println(page) 1680// return pageNum <= 3 1681// }) 1682// 1683func (c *ServiceDiscovery) ListOperationsPages(input *ListOperationsInput, fn func(*ListOperationsOutput, bool) bool) error { 1684 return c.ListOperationsPagesWithContext(aws.BackgroundContext(), input, fn) 1685} 1686 1687// ListOperationsPagesWithContext same as ListOperationsPages except 1688// it takes a Context and allows setting request options on the pages. 1689// 1690// The context must be non-nil and will be used for request cancellation. If 1691// the context is nil a panic will occur. In the future the SDK may create 1692// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1693// for more information on using Contexts. 1694func (c *ServiceDiscovery) ListOperationsPagesWithContext(ctx aws.Context, input *ListOperationsInput, fn func(*ListOperationsOutput, bool) bool, opts ...request.Option) error { 1695 p := request.Pagination{ 1696 NewRequest: func() (*request.Request, error) { 1697 var inCpy *ListOperationsInput 1698 if input != nil { 1699 tmp := *input 1700 inCpy = &tmp 1701 } 1702 req, _ := c.ListOperationsRequest(inCpy) 1703 req.SetContext(ctx) 1704 req.ApplyOptions(opts...) 1705 return req, nil 1706 }, 1707 } 1708 1709 for p.Next() { 1710 if !fn(p.Page().(*ListOperationsOutput), !p.HasNextPage()) { 1711 break 1712 } 1713 } 1714 1715 return p.Err() 1716} 1717 1718const opListServices = "ListServices" 1719 1720// ListServicesRequest generates a "aws/request.Request" representing the 1721// client's request for the ListServices operation. The "output" return 1722// value will be populated with the request's response once the request completes 1723// successfully. 1724// 1725// Use "Send" method on the returned Request to send the API call to the service. 1726// the "output" return value is not valid until after Send returns without error. 1727// 1728// See ListServices for more information on using the ListServices 1729// API call, and error handling. 1730// 1731// This method is useful when you want to inject custom logic or configuration 1732// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1733// 1734// 1735// // Example sending a request using the ListServicesRequest method. 1736// req, resp := client.ListServicesRequest(params) 1737// 1738// err := req.Send() 1739// if err == nil { // resp is now filled 1740// fmt.Println(resp) 1741// } 1742// 1743// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListServices 1744func (c *ServiceDiscovery) ListServicesRequest(input *ListServicesInput) (req *request.Request, output *ListServicesOutput) { 1745 op := &request.Operation{ 1746 Name: opListServices, 1747 HTTPMethod: "POST", 1748 HTTPPath: "/", 1749 Paginator: &request.Paginator{ 1750 InputTokens: []string{"NextToken"}, 1751 OutputTokens: []string{"NextToken"}, 1752 LimitToken: "MaxResults", 1753 TruncationToken: "", 1754 }, 1755 } 1756 1757 if input == nil { 1758 input = &ListServicesInput{} 1759 } 1760 1761 output = &ListServicesOutput{} 1762 req = c.newRequest(op, input, output) 1763 return 1764} 1765 1766// ListServices API operation for AWS Cloud Map. 1767// 1768// Lists summary information for all the services that are associated with one 1769// or more specified namespaces. 1770// 1771// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1772// with awserr.Error's Code and Message methods to get detailed information about 1773// the error. 1774// 1775// See the AWS API reference guide for AWS Cloud Map's 1776// API operation ListServices for usage and error information. 1777// 1778// Returned Error Types: 1779// * InvalidInput 1780// One or more specified values aren't valid. For example, a required value 1781// might be missing, a numeric value might be outside the allowed range, or 1782// a string value might exceed length constraints. 1783// 1784// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListServices 1785func (c *ServiceDiscovery) ListServices(input *ListServicesInput) (*ListServicesOutput, error) { 1786 req, out := c.ListServicesRequest(input) 1787 return out, req.Send() 1788} 1789 1790// ListServicesWithContext is the same as ListServices with the addition of 1791// the ability to pass a context and additional request options. 1792// 1793// See ListServices for details on how to use this API operation. 1794// 1795// The context must be non-nil and will be used for request cancellation. If 1796// the context is nil a panic will occur. In the future the SDK may create 1797// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1798// for more information on using Contexts. 1799func (c *ServiceDiscovery) ListServicesWithContext(ctx aws.Context, input *ListServicesInput, opts ...request.Option) (*ListServicesOutput, error) { 1800 req, out := c.ListServicesRequest(input) 1801 req.SetContext(ctx) 1802 req.ApplyOptions(opts...) 1803 return out, req.Send() 1804} 1805 1806// ListServicesPages iterates over the pages of a ListServices operation, 1807// calling the "fn" function with the response data for each page. To stop 1808// iterating, return false from the fn function. 1809// 1810// See ListServices method for more information on how to use this operation. 1811// 1812// Note: This operation can generate multiple requests to a service. 1813// 1814// // Example iterating over at most 3 pages of a ListServices operation. 1815// pageNum := 0 1816// err := client.ListServicesPages(params, 1817// func(page *servicediscovery.ListServicesOutput, lastPage bool) bool { 1818// pageNum++ 1819// fmt.Println(page) 1820// return pageNum <= 3 1821// }) 1822// 1823func (c *ServiceDiscovery) ListServicesPages(input *ListServicesInput, fn func(*ListServicesOutput, bool) bool) error { 1824 return c.ListServicesPagesWithContext(aws.BackgroundContext(), input, fn) 1825} 1826 1827// ListServicesPagesWithContext same as ListServicesPages except 1828// it takes a Context and allows setting request options on the pages. 1829// 1830// The context must be non-nil and will be used for request cancellation. If 1831// the context is nil a panic will occur. In the future the SDK may create 1832// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1833// for more information on using Contexts. 1834func (c *ServiceDiscovery) ListServicesPagesWithContext(ctx aws.Context, input *ListServicesInput, fn func(*ListServicesOutput, bool) bool, opts ...request.Option) error { 1835 p := request.Pagination{ 1836 NewRequest: func() (*request.Request, error) { 1837 var inCpy *ListServicesInput 1838 if input != nil { 1839 tmp := *input 1840 inCpy = &tmp 1841 } 1842 req, _ := c.ListServicesRequest(inCpy) 1843 req.SetContext(ctx) 1844 req.ApplyOptions(opts...) 1845 return req, nil 1846 }, 1847 } 1848 1849 for p.Next() { 1850 if !fn(p.Page().(*ListServicesOutput), !p.HasNextPage()) { 1851 break 1852 } 1853 } 1854 1855 return p.Err() 1856} 1857 1858const opListTagsForResource = "ListTagsForResource" 1859 1860// ListTagsForResourceRequest generates a "aws/request.Request" representing the 1861// client's request for the ListTagsForResource operation. The "output" return 1862// value will be populated with the request's response once the request completes 1863// successfully. 1864// 1865// Use "Send" method on the returned Request to send the API call to the service. 1866// the "output" return value is not valid until after Send returns without error. 1867// 1868// See ListTagsForResource for more information on using the ListTagsForResource 1869// API call, and error handling. 1870// 1871// This method is useful when you want to inject custom logic or configuration 1872// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1873// 1874// 1875// // Example sending a request using the ListTagsForResourceRequest method. 1876// req, resp := client.ListTagsForResourceRequest(params) 1877// 1878// err := req.Send() 1879// if err == nil { // resp is now filled 1880// fmt.Println(resp) 1881// } 1882// 1883// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListTagsForResource 1884func (c *ServiceDiscovery) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 1885 op := &request.Operation{ 1886 Name: opListTagsForResource, 1887 HTTPMethod: "POST", 1888 HTTPPath: "/", 1889 } 1890 1891 if input == nil { 1892 input = &ListTagsForResourceInput{} 1893 } 1894 1895 output = &ListTagsForResourceOutput{} 1896 req = c.newRequest(op, input, output) 1897 return 1898} 1899 1900// ListTagsForResource API operation for AWS Cloud Map. 1901// 1902// Lists tags for the specified resource. 1903// 1904// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1905// with awserr.Error's Code and Message methods to get detailed information about 1906// the error. 1907// 1908// See the AWS API reference guide for AWS Cloud Map's 1909// API operation ListTagsForResource for usage and error information. 1910// 1911// Returned Error Types: 1912// * ResourceNotFoundException 1913// The operation can't be completed because the resource was not found. 1914// 1915// * InvalidInput 1916// One or more specified values aren't valid. For example, a required value 1917// might be missing, a numeric value might be outside the allowed range, or 1918// a string value might exceed length constraints. 1919// 1920// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListTagsForResource 1921func (c *ServiceDiscovery) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 1922 req, out := c.ListTagsForResourceRequest(input) 1923 return out, req.Send() 1924} 1925 1926// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 1927// the ability to pass a context and additional request options. 1928// 1929// See ListTagsForResource for details on how to use this API operation. 1930// 1931// The context must be non-nil and will be used for request cancellation. If 1932// the context is nil a panic will occur. In the future the SDK may create 1933// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1934// for more information on using Contexts. 1935func (c *ServiceDiscovery) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 1936 req, out := c.ListTagsForResourceRequest(input) 1937 req.SetContext(ctx) 1938 req.ApplyOptions(opts...) 1939 return out, req.Send() 1940} 1941 1942const opRegisterInstance = "RegisterInstance" 1943 1944// RegisterInstanceRequest generates a "aws/request.Request" representing the 1945// client's request for the RegisterInstance operation. The "output" return 1946// value will be populated with the request's response once the request completes 1947// successfully. 1948// 1949// Use "Send" method on the returned Request to send the API call to the service. 1950// the "output" return value is not valid until after Send returns without error. 1951// 1952// See RegisterInstance for more information on using the RegisterInstance 1953// API call, and error handling. 1954// 1955// This method is useful when you want to inject custom logic or configuration 1956// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1957// 1958// 1959// // Example sending a request using the RegisterInstanceRequest method. 1960// req, resp := client.RegisterInstanceRequest(params) 1961// 1962// err := req.Send() 1963// if err == nil { // resp is now filled 1964// fmt.Println(resp) 1965// } 1966// 1967// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/RegisterInstance 1968func (c *ServiceDiscovery) RegisterInstanceRequest(input *RegisterInstanceInput) (req *request.Request, output *RegisterInstanceOutput) { 1969 op := &request.Operation{ 1970 Name: opRegisterInstance, 1971 HTTPMethod: "POST", 1972 HTTPPath: "/", 1973 } 1974 1975 if input == nil { 1976 input = &RegisterInstanceInput{} 1977 } 1978 1979 output = &RegisterInstanceOutput{} 1980 req = c.newRequest(op, input, output) 1981 return 1982} 1983 1984// RegisterInstance API operation for AWS Cloud Map. 1985// 1986// Creates or updates one or more records and, optionally, creates a health 1987// check based on the settings in a specified service. When you submit a RegisterInstance 1988// request, the following occurs: 1989// 1990// * For each DNS record that you define in the service that is specified 1991// by ServiceId, a record is created or updated in the hosted zone that is 1992// associated with the corresponding namespace. 1993// 1994// * If the service includes HealthCheckConfig, a health check is created 1995// based on the settings in the health check configuration. 1996// 1997// * The health check, if any, is associated with each of the new or updated 1998// records. 1999// 2000// One RegisterInstance request must complete before you can submit another 2001// request and specify the same service ID and instance ID. 2002// 2003// For more information, see CreateService (https://docs.aws.amazon.com/cloud-map/latest/api/API_CreateService.html). 2004// 2005// When AWS Cloud Map receives a DNS query for the specified DNS name, it returns 2006// the applicable value: 2007// 2008// * If the health check is healthy: returns all the records 2009// 2010// * If the health check is unhealthy: returns the applicable value for the 2011// last healthy instance 2012// 2013// * If you didn't specify a health check configuration: returns all the 2014// records 2015// 2016// For the current limit on the number of instances that you can register using 2017// the same namespace and using the same service, see AWS Cloud Map Limits (https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) 2018// in the AWS Cloud Map Developer Guide. 2019// 2020// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2021// with awserr.Error's Code and Message methods to get detailed information about 2022// the error. 2023// 2024// See the AWS API reference guide for AWS Cloud Map's 2025// API operation RegisterInstance for usage and error information. 2026// 2027// Returned Error Types: 2028// * DuplicateRequest 2029// The operation is already in progress. 2030// 2031// * InvalidInput 2032// One or more specified values aren't valid. For example, a required value 2033// might be missing, a numeric value might be outside the allowed range, or 2034// a string value might exceed length constraints. 2035// 2036// * ResourceInUse 2037// The specified resource can't be deleted because it contains other resources. 2038// For example, you can't delete a service that contains any instances. 2039// 2040// * ResourceLimitExceeded 2041// The resource can't be created because you've reached the limit on the number 2042// of resources. 2043// 2044// * ServiceNotFound 2045// No service exists with the specified ID. 2046// 2047// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/RegisterInstance 2048func (c *ServiceDiscovery) RegisterInstance(input *RegisterInstanceInput) (*RegisterInstanceOutput, error) { 2049 req, out := c.RegisterInstanceRequest(input) 2050 return out, req.Send() 2051} 2052 2053// RegisterInstanceWithContext is the same as RegisterInstance with the addition of 2054// the ability to pass a context and additional request options. 2055// 2056// See RegisterInstance for details on how to use this API operation. 2057// 2058// The context must be non-nil and will be used for request cancellation. If 2059// the context is nil a panic will occur. In the future the SDK may create 2060// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2061// for more information on using Contexts. 2062func (c *ServiceDiscovery) RegisterInstanceWithContext(ctx aws.Context, input *RegisterInstanceInput, opts ...request.Option) (*RegisterInstanceOutput, error) { 2063 req, out := c.RegisterInstanceRequest(input) 2064 req.SetContext(ctx) 2065 req.ApplyOptions(opts...) 2066 return out, req.Send() 2067} 2068 2069const opTagResource = "TagResource" 2070 2071// TagResourceRequest generates a "aws/request.Request" representing the 2072// client's request for the TagResource operation. The "output" return 2073// value will be populated with the request's response once the request completes 2074// successfully. 2075// 2076// Use "Send" method on the returned Request to send the API call to the service. 2077// the "output" return value is not valid until after Send returns without error. 2078// 2079// See TagResource for more information on using the TagResource 2080// API call, and error handling. 2081// 2082// This method is useful when you want to inject custom logic or configuration 2083// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2084// 2085// 2086// // Example sending a request using the TagResourceRequest method. 2087// req, resp := client.TagResourceRequest(params) 2088// 2089// err := req.Send() 2090// if err == nil { // resp is now filled 2091// fmt.Println(resp) 2092// } 2093// 2094// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/TagResource 2095func (c *ServiceDiscovery) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 2096 op := &request.Operation{ 2097 Name: opTagResource, 2098 HTTPMethod: "POST", 2099 HTTPPath: "/", 2100 } 2101 2102 if input == nil { 2103 input = &TagResourceInput{} 2104 } 2105 2106 output = &TagResourceOutput{} 2107 req = c.newRequest(op, input, output) 2108 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2109 return 2110} 2111 2112// TagResource API operation for AWS Cloud Map. 2113// 2114// Adds one or more tags to the specified resource. 2115// 2116// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2117// with awserr.Error's Code and Message methods to get detailed information about 2118// the error. 2119// 2120// See the AWS API reference guide for AWS Cloud Map's 2121// API operation TagResource for usage and error information. 2122// 2123// Returned Error Types: 2124// * ResourceNotFoundException 2125// The operation can't be completed because the resource was not found. 2126// 2127// * TooManyTagsException 2128// The list of tags on the resource is over the limit. The maximum number of 2129// tags that can be applied to a resource is 50. 2130// 2131// * InvalidInput 2132// One or more specified values aren't valid. For example, a required value 2133// might be missing, a numeric value might be outside the allowed range, or 2134// a string value might exceed length constraints. 2135// 2136// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/TagResource 2137func (c *ServiceDiscovery) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 2138 req, out := c.TagResourceRequest(input) 2139 return out, req.Send() 2140} 2141 2142// TagResourceWithContext is the same as TagResource with the addition of 2143// the ability to pass a context and additional request options. 2144// 2145// See TagResource for details on how to use this API operation. 2146// 2147// The context must be non-nil and will be used for request cancellation. If 2148// the context is nil a panic will occur. In the future the SDK may create 2149// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2150// for more information on using Contexts. 2151func (c *ServiceDiscovery) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 2152 req, out := c.TagResourceRequest(input) 2153 req.SetContext(ctx) 2154 req.ApplyOptions(opts...) 2155 return out, req.Send() 2156} 2157 2158const opUntagResource = "UntagResource" 2159 2160// UntagResourceRequest generates a "aws/request.Request" representing the 2161// client's request for the UntagResource operation. The "output" return 2162// value will be populated with the request's response once the request completes 2163// successfully. 2164// 2165// Use "Send" method on the returned Request to send the API call to the service. 2166// the "output" return value is not valid until after Send returns without error. 2167// 2168// See UntagResource for more information on using the UntagResource 2169// API call, and error handling. 2170// 2171// This method is useful when you want to inject custom logic or configuration 2172// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2173// 2174// 2175// // Example sending a request using the UntagResourceRequest method. 2176// req, resp := client.UntagResourceRequest(params) 2177// 2178// err := req.Send() 2179// if err == nil { // resp is now filled 2180// fmt.Println(resp) 2181// } 2182// 2183// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UntagResource 2184func (c *ServiceDiscovery) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 2185 op := &request.Operation{ 2186 Name: opUntagResource, 2187 HTTPMethod: "POST", 2188 HTTPPath: "/", 2189 } 2190 2191 if input == nil { 2192 input = &UntagResourceInput{} 2193 } 2194 2195 output = &UntagResourceOutput{} 2196 req = c.newRequest(op, input, output) 2197 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2198 return 2199} 2200 2201// UntagResource API operation for AWS Cloud Map. 2202// 2203// Removes one or more tags from the specified resource. 2204// 2205// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2206// with awserr.Error's Code and Message methods to get detailed information about 2207// the error. 2208// 2209// See the AWS API reference guide for AWS Cloud Map's 2210// API operation UntagResource for usage and error information. 2211// 2212// Returned Error Types: 2213// * ResourceNotFoundException 2214// The operation can't be completed because the resource was not found. 2215// 2216// * InvalidInput 2217// One or more specified values aren't valid. For example, a required value 2218// might be missing, a numeric value might be outside the allowed range, or 2219// a string value might exceed length constraints. 2220// 2221// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UntagResource 2222func (c *ServiceDiscovery) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 2223 req, out := c.UntagResourceRequest(input) 2224 return out, req.Send() 2225} 2226 2227// UntagResourceWithContext is the same as UntagResource with the addition of 2228// the ability to pass a context and additional request options. 2229// 2230// See UntagResource for details on how to use this API operation. 2231// 2232// The context must be non-nil and will be used for request cancellation. If 2233// the context is nil a panic will occur. In the future the SDK may create 2234// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2235// for more information on using Contexts. 2236func (c *ServiceDiscovery) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 2237 req, out := c.UntagResourceRequest(input) 2238 req.SetContext(ctx) 2239 req.ApplyOptions(opts...) 2240 return out, req.Send() 2241} 2242 2243const opUpdateInstanceCustomHealthStatus = "UpdateInstanceCustomHealthStatus" 2244 2245// UpdateInstanceCustomHealthStatusRequest generates a "aws/request.Request" representing the 2246// client's request for the UpdateInstanceCustomHealthStatus operation. The "output" return 2247// value will be populated with the request's response once the request completes 2248// successfully. 2249// 2250// Use "Send" method on the returned Request to send the API call to the service. 2251// the "output" return value is not valid until after Send returns without error. 2252// 2253// See UpdateInstanceCustomHealthStatus for more information on using the UpdateInstanceCustomHealthStatus 2254// API call, and error handling. 2255// 2256// This method is useful when you want to inject custom logic or configuration 2257// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2258// 2259// 2260// // Example sending a request using the UpdateInstanceCustomHealthStatusRequest method. 2261// req, resp := client.UpdateInstanceCustomHealthStatusRequest(params) 2262// 2263// err := req.Send() 2264// if err == nil { // resp is now filled 2265// fmt.Println(resp) 2266// } 2267// 2268// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateInstanceCustomHealthStatus 2269func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatusRequest(input *UpdateInstanceCustomHealthStatusInput) (req *request.Request, output *UpdateInstanceCustomHealthStatusOutput) { 2270 op := &request.Operation{ 2271 Name: opUpdateInstanceCustomHealthStatus, 2272 HTTPMethod: "POST", 2273 HTTPPath: "/", 2274 } 2275 2276 if input == nil { 2277 input = &UpdateInstanceCustomHealthStatusInput{} 2278 } 2279 2280 output = &UpdateInstanceCustomHealthStatusOutput{} 2281 req = c.newRequest(op, input, output) 2282 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2283 return 2284} 2285 2286// UpdateInstanceCustomHealthStatus API operation for AWS Cloud Map. 2287// 2288// Submits a request to change the health status of a custom health check to 2289// healthy or unhealthy. 2290// 2291// You can use UpdateInstanceCustomHealthStatus to change the status only for 2292// custom health checks, which you define using HealthCheckCustomConfig when 2293// you create a service. You can't use it to change the status for Route 53 2294// health checks, which you define using HealthCheckConfig. 2295// 2296// For more information, see HealthCheckCustomConfig (https://docs.aws.amazon.com/cloud-map/latest/api/API_HealthCheckCustomConfig.html). 2297// 2298// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2299// with awserr.Error's Code and Message methods to get detailed information about 2300// the error. 2301// 2302// See the AWS API reference guide for AWS Cloud Map's 2303// API operation UpdateInstanceCustomHealthStatus for usage and error information. 2304// 2305// Returned Error Types: 2306// * InstanceNotFound 2307// No instance exists with the specified ID, or the instance was recently registered, 2308// and information about the instance hasn't propagated yet. 2309// 2310// * ServiceNotFound 2311// No service exists with the specified ID. 2312// 2313// * CustomHealthNotFound 2314// The health check for the instance that is specified by ServiceId and InstanceId 2315// is not a custom health check. 2316// 2317// * InvalidInput 2318// One or more specified values aren't valid. For example, a required value 2319// might be missing, a numeric value might be outside the allowed range, or 2320// a string value might exceed length constraints. 2321// 2322// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateInstanceCustomHealthStatus 2323func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatus(input *UpdateInstanceCustomHealthStatusInput) (*UpdateInstanceCustomHealthStatusOutput, error) { 2324 req, out := c.UpdateInstanceCustomHealthStatusRequest(input) 2325 return out, req.Send() 2326} 2327 2328// UpdateInstanceCustomHealthStatusWithContext is the same as UpdateInstanceCustomHealthStatus with the addition of 2329// the ability to pass a context and additional request options. 2330// 2331// See UpdateInstanceCustomHealthStatus for details on how to use this API operation. 2332// 2333// The context must be non-nil and will be used for request cancellation. If 2334// the context is nil a panic will occur. In the future the SDK may create 2335// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2336// for more information on using Contexts. 2337func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatusWithContext(ctx aws.Context, input *UpdateInstanceCustomHealthStatusInput, opts ...request.Option) (*UpdateInstanceCustomHealthStatusOutput, error) { 2338 req, out := c.UpdateInstanceCustomHealthStatusRequest(input) 2339 req.SetContext(ctx) 2340 req.ApplyOptions(opts...) 2341 return out, req.Send() 2342} 2343 2344const opUpdateService = "UpdateService" 2345 2346// UpdateServiceRequest generates a "aws/request.Request" representing the 2347// client's request for the UpdateService operation. The "output" return 2348// value will be populated with the request's response once the request completes 2349// successfully. 2350// 2351// Use "Send" method on the returned Request to send the API call to the service. 2352// the "output" return value is not valid until after Send returns without error. 2353// 2354// See UpdateService for more information on using the UpdateService 2355// API call, and error handling. 2356// 2357// This method is useful when you want to inject custom logic or configuration 2358// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2359// 2360// 2361// // Example sending a request using the UpdateServiceRequest method. 2362// req, resp := client.UpdateServiceRequest(params) 2363// 2364// err := req.Send() 2365// if err == nil { // resp is now filled 2366// fmt.Println(resp) 2367// } 2368// 2369// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateService 2370func (c *ServiceDiscovery) UpdateServiceRequest(input *UpdateServiceInput) (req *request.Request, output *UpdateServiceOutput) { 2371 op := &request.Operation{ 2372 Name: opUpdateService, 2373 HTTPMethod: "POST", 2374 HTTPPath: "/", 2375 } 2376 2377 if input == nil { 2378 input = &UpdateServiceInput{} 2379 } 2380 2381 output = &UpdateServiceOutput{} 2382 req = c.newRequest(op, input, output) 2383 return 2384} 2385 2386// UpdateService API operation for AWS Cloud Map. 2387// 2388// Submits a request to perform the following operations: 2389// 2390// * Update the TTL setting for existing DnsRecords configurations 2391// 2392// * Add, update, or delete HealthCheckConfig for a specified service You 2393// can't add, update, or delete a HealthCheckCustomConfig configuration. 2394// 2395// For public and private DNS namespaces, note the following: 2396// 2397// * If you omit any existing DnsRecords or HealthCheckConfig configurations 2398// from an UpdateService request, the configurations are deleted from the 2399// service. 2400// 2401// * If you omit an existing HealthCheckCustomConfig configuration from an 2402// UpdateService request, the configuration is not deleted from the service. 2403// 2404// When you update settings for a service, AWS Cloud Map also updates the corresponding 2405// settings in all the records and health checks that were created by using 2406// the specified service. 2407// 2408// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2409// with awserr.Error's Code and Message methods to get detailed information about 2410// the error. 2411// 2412// See the AWS API reference guide for AWS Cloud Map's 2413// API operation UpdateService for usage and error information. 2414// 2415// Returned Error Types: 2416// * DuplicateRequest 2417// The operation is already in progress. 2418// 2419// * InvalidInput 2420// One or more specified values aren't valid. For example, a required value 2421// might be missing, a numeric value might be outside the allowed range, or 2422// a string value might exceed length constraints. 2423// 2424// * ServiceNotFound 2425// No service exists with the specified ID. 2426// 2427// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateService 2428func (c *ServiceDiscovery) UpdateService(input *UpdateServiceInput) (*UpdateServiceOutput, error) { 2429 req, out := c.UpdateServiceRequest(input) 2430 return out, req.Send() 2431} 2432 2433// UpdateServiceWithContext is the same as UpdateService with the addition of 2434// the ability to pass a context and additional request options. 2435// 2436// See UpdateService for details on how to use this API operation. 2437// 2438// The context must be non-nil and will be used for request cancellation. If 2439// the context is nil a panic will occur. In the future the SDK may create 2440// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2441// for more information on using Contexts. 2442func (c *ServiceDiscovery) UpdateServiceWithContext(ctx aws.Context, input *UpdateServiceInput, opts ...request.Option) (*UpdateServiceOutput, error) { 2443 req, out := c.UpdateServiceRequest(input) 2444 req.SetContext(ctx) 2445 req.ApplyOptions(opts...) 2446 return out, req.Send() 2447} 2448 2449type CreateHttpNamespaceInput struct { 2450 _ struct{} `type:"structure"` 2451 2452 // A unique string that identifies the request and that allows failed CreateHttpNamespace 2453 // requests to be retried without the risk of executing the operation twice. 2454 // CreatorRequestId can be any unique string, for example, a date/time stamp. 2455 CreatorRequestId *string `type:"string" idempotencyToken:"true"` 2456 2457 // A description for the namespace. 2458 Description *string `type:"string"` 2459 2460 // The name that you want to assign to this namespace. 2461 // 2462 // Name is a required field 2463 Name *string `type:"string" required:"true"` 2464 2465 // The tags to add to the namespace. Each tag consists of a key and an optional 2466 // value, both of which you define. Tag keys can have a maximum character length 2467 // of 128 characters, and tag values can have a maximum length of 256 characters. 2468 Tags []*Tag `type:"list"` 2469} 2470 2471// String returns the string representation 2472func (s CreateHttpNamespaceInput) String() string { 2473 return awsutil.Prettify(s) 2474} 2475 2476// GoString returns the string representation 2477func (s CreateHttpNamespaceInput) GoString() string { 2478 return s.String() 2479} 2480 2481// Validate inspects the fields of the type to determine if they are valid. 2482func (s *CreateHttpNamespaceInput) Validate() error { 2483 invalidParams := request.ErrInvalidParams{Context: "CreateHttpNamespaceInput"} 2484 if s.Name == nil { 2485 invalidParams.Add(request.NewErrParamRequired("Name")) 2486 } 2487 if s.Tags != nil { 2488 for i, v := range s.Tags { 2489 if v == nil { 2490 continue 2491 } 2492 if err := v.Validate(); err != nil { 2493 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 2494 } 2495 } 2496 } 2497 2498 if invalidParams.Len() > 0 { 2499 return invalidParams 2500 } 2501 return nil 2502} 2503 2504// SetCreatorRequestId sets the CreatorRequestId field's value. 2505func (s *CreateHttpNamespaceInput) SetCreatorRequestId(v string) *CreateHttpNamespaceInput { 2506 s.CreatorRequestId = &v 2507 return s 2508} 2509 2510// SetDescription sets the Description field's value. 2511func (s *CreateHttpNamespaceInput) SetDescription(v string) *CreateHttpNamespaceInput { 2512 s.Description = &v 2513 return s 2514} 2515 2516// SetName sets the Name field's value. 2517func (s *CreateHttpNamespaceInput) SetName(v string) *CreateHttpNamespaceInput { 2518 s.Name = &v 2519 return s 2520} 2521 2522// SetTags sets the Tags field's value. 2523func (s *CreateHttpNamespaceInput) SetTags(v []*Tag) *CreateHttpNamespaceInput { 2524 s.Tags = v 2525 return s 2526} 2527 2528type CreateHttpNamespaceOutput struct { 2529 _ struct{} `type:"structure"` 2530 2531 // A value that you can use to determine whether the request completed successfully. 2532 // To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html). 2533 OperationId *string `type:"string"` 2534} 2535 2536// String returns the string representation 2537func (s CreateHttpNamespaceOutput) String() string { 2538 return awsutil.Prettify(s) 2539} 2540 2541// GoString returns the string representation 2542func (s CreateHttpNamespaceOutput) GoString() string { 2543 return s.String() 2544} 2545 2546// SetOperationId sets the OperationId field's value. 2547func (s *CreateHttpNamespaceOutput) SetOperationId(v string) *CreateHttpNamespaceOutput { 2548 s.OperationId = &v 2549 return s 2550} 2551 2552type CreatePrivateDnsNamespaceInput struct { 2553 _ struct{} `type:"structure"` 2554 2555 // A unique string that identifies the request and that allows failed CreatePrivateDnsNamespace 2556 // requests to be retried without the risk of executing the operation twice. 2557 // CreatorRequestId can be any unique string, for example, a date/time stamp. 2558 CreatorRequestId *string `type:"string" idempotencyToken:"true"` 2559 2560 // A description for the namespace. 2561 Description *string `type:"string"` 2562 2563 // The name that you want to assign to this namespace. When you create a private 2564 // DNS namespace, AWS Cloud Map automatically creates an Amazon Route 53 private 2565 // hosted zone that has the same name as the namespace. 2566 // 2567 // Name is a required field 2568 Name *string `type:"string" required:"true"` 2569 2570 // The tags to add to the namespace. Each tag consists of a key and an optional 2571 // value, both of which you define. Tag keys can have a maximum character length 2572 // of 128 characters, and tag values can have a maximum length of 256 characters. 2573 Tags []*Tag `type:"list"` 2574 2575 // The ID of the Amazon VPC that you want to associate the namespace with. 2576 // 2577 // Vpc is a required field 2578 Vpc *string `type:"string" required:"true"` 2579} 2580 2581// String returns the string representation 2582func (s CreatePrivateDnsNamespaceInput) String() string { 2583 return awsutil.Prettify(s) 2584} 2585 2586// GoString returns the string representation 2587func (s CreatePrivateDnsNamespaceInput) GoString() string { 2588 return s.String() 2589} 2590 2591// Validate inspects the fields of the type to determine if they are valid. 2592func (s *CreatePrivateDnsNamespaceInput) Validate() error { 2593 invalidParams := request.ErrInvalidParams{Context: "CreatePrivateDnsNamespaceInput"} 2594 if s.Name == nil { 2595 invalidParams.Add(request.NewErrParamRequired("Name")) 2596 } 2597 if s.Vpc == nil { 2598 invalidParams.Add(request.NewErrParamRequired("Vpc")) 2599 } 2600 if s.Tags != nil { 2601 for i, v := range s.Tags { 2602 if v == nil { 2603 continue 2604 } 2605 if err := v.Validate(); err != nil { 2606 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 2607 } 2608 } 2609 } 2610 2611 if invalidParams.Len() > 0 { 2612 return invalidParams 2613 } 2614 return nil 2615} 2616 2617// SetCreatorRequestId sets the CreatorRequestId field's value. 2618func (s *CreatePrivateDnsNamespaceInput) SetCreatorRequestId(v string) *CreatePrivateDnsNamespaceInput { 2619 s.CreatorRequestId = &v 2620 return s 2621} 2622 2623// SetDescription sets the Description field's value. 2624func (s *CreatePrivateDnsNamespaceInput) SetDescription(v string) *CreatePrivateDnsNamespaceInput { 2625 s.Description = &v 2626 return s 2627} 2628 2629// SetName sets the Name field's value. 2630func (s *CreatePrivateDnsNamespaceInput) SetName(v string) *CreatePrivateDnsNamespaceInput { 2631 s.Name = &v 2632 return s 2633} 2634 2635// SetTags sets the Tags field's value. 2636func (s *CreatePrivateDnsNamespaceInput) SetTags(v []*Tag) *CreatePrivateDnsNamespaceInput { 2637 s.Tags = v 2638 return s 2639} 2640 2641// SetVpc sets the Vpc field's value. 2642func (s *CreatePrivateDnsNamespaceInput) SetVpc(v string) *CreatePrivateDnsNamespaceInput { 2643 s.Vpc = &v 2644 return s 2645} 2646 2647type CreatePrivateDnsNamespaceOutput struct { 2648 _ struct{} `type:"structure"` 2649 2650 // A value that you can use to determine whether the request completed successfully. 2651 // To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html). 2652 OperationId *string `type:"string"` 2653} 2654 2655// String returns the string representation 2656func (s CreatePrivateDnsNamespaceOutput) String() string { 2657 return awsutil.Prettify(s) 2658} 2659 2660// GoString returns the string representation 2661func (s CreatePrivateDnsNamespaceOutput) GoString() string { 2662 return s.String() 2663} 2664 2665// SetOperationId sets the OperationId field's value. 2666func (s *CreatePrivateDnsNamespaceOutput) SetOperationId(v string) *CreatePrivateDnsNamespaceOutput { 2667 s.OperationId = &v 2668 return s 2669} 2670 2671type CreatePublicDnsNamespaceInput struct { 2672 _ struct{} `type:"structure"` 2673 2674 // A unique string that identifies the request and that allows failed CreatePublicDnsNamespace 2675 // requests to be retried without the risk of executing the operation twice. 2676 // CreatorRequestId can be any unique string, for example, a date/time stamp. 2677 CreatorRequestId *string `type:"string" idempotencyToken:"true"` 2678 2679 // A description for the namespace. 2680 Description *string `type:"string"` 2681 2682 // The name that you want to assign to this namespace. 2683 // 2684 // Name is a required field 2685 Name *string `type:"string" required:"true"` 2686 2687 // The tags to add to the namespace. Each tag consists of a key and an optional 2688 // value, both of which you define. Tag keys can have a maximum character length 2689 // of 128 characters, and tag values can have a maximum length of 256 characters. 2690 Tags []*Tag `type:"list"` 2691} 2692 2693// String returns the string representation 2694func (s CreatePublicDnsNamespaceInput) String() string { 2695 return awsutil.Prettify(s) 2696} 2697 2698// GoString returns the string representation 2699func (s CreatePublicDnsNamespaceInput) GoString() string { 2700 return s.String() 2701} 2702 2703// Validate inspects the fields of the type to determine if they are valid. 2704func (s *CreatePublicDnsNamespaceInput) Validate() error { 2705 invalidParams := request.ErrInvalidParams{Context: "CreatePublicDnsNamespaceInput"} 2706 if s.Name == nil { 2707 invalidParams.Add(request.NewErrParamRequired("Name")) 2708 } 2709 if s.Tags != nil { 2710 for i, v := range s.Tags { 2711 if v == nil { 2712 continue 2713 } 2714 if err := v.Validate(); err != nil { 2715 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 2716 } 2717 } 2718 } 2719 2720 if invalidParams.Len() > 0 { 2721 return invalidParams 2722 } 2723 return nil 2724} 2725 2726// SetCreatorRequestId sets the CreatorRequestId field's value. 2727func (s *CreatePublicDnsNamespaceInput) SetCreatorRequestId(v string) *CreatePublicDnsNamespaceInput { 2728 s.CreatorRequestId = &v 2729 return s 2730} 2731 2732// SetDescription sets the Description field's value. 2733func (s *CreatePublicDnsNamespaceInput) SetDescription(v string) *CreatePublicDnsNamespaceInput { 2734 s.Description = &v 2735 return s 2736} 2737 2738// SetName sets the Name field's value. 2739func (s *CreatePublicDnsNamespaceInput) SetName(v string) *CreatePublicDnsNamespaceInput { 2740 s.Name = &v 2741 return s 2742} 2743 2744// SetTags sets the Tags field's value. 2745func (s *CreatePublicDnsNamespaceInput) SetTags(v []*Tag) *CreatePublicDnsNamespaceInput { 2746 s.Tags = v 2747 return s 2748} 2749 2750type CreatePublicDnsNamespaceOutput struct { 2751 _ struct{} `type:"structure"` 2752 2753 // A value that you can use to determine whether the request completed successfully. 2754 // To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html). 2755 OperationId *string `type:"string"` 2756} 2757 2758// String returns the string representation 2759func (s CreatePublicDnsNamespaceOutput) String() string { 2760 return awsutil.Prettify(s) 2761} 2762 2763// GoString returns the string representation 2764func (s CreatePublicDnsNamespaceOutput) GoString() string { 2765 return s.String() 2766} 2767 2768// SetOperationId sets the OperationId field's value. 2769func (s *CreatePublicDnsNamespaceOutput) SetOperationId(v string) *CreatePublicDnsNamespaceOutput { 2770 s.OperationId = &v 2771 return s 2772} 2773 2774type CreateServiceInput struct { 2775 _ struct{} `type:"structure"` 2776 2777 // A unique string that identifies the request and that allows failed CreateService 2778 // requests to be retried without the risk of executing the operation twice. 2779 // CreatorRequestId can be any unique string, for example, a date/time stamp. 2780 CreatorRequestId *string `type:"string" idempotencyToken:"true"` 2781 2782 // A description for the service. 2783 Description *string `type:"string"` 2784 2785 // A complex type that contains information about the Amazon Route 53 records 2786 // that you want AWS Cloud Map to create when you register an instance. 2787 DnsConfig *DnsConfig `type:"structure"` 2788 2789 // Public DNS and HTTP namespaces only. A complex type that contains settings 2790 // for an optional Route 53 health check. If you specify settings for a health 2791 // check, AWS Cloud Map associates the health check with all the Route 53 DNS 2792 // records that you specify in DnsConfig. 2793 // 2794 // If you specify a health check configuration, you can specify either HealthCheckCustomConfig 2795 // or HealthCheckConfig but not both. 2796 // 2797 // For information about the charges for health checks, see AWS Cloud Map Pricing 2798 // (http://aws.amazon.com/cloud-map/pricing/). 2799 HealthCheckConfig *HealthCheckConfig `type:"structure"` 2800 2801 // A complex type that contains information about an optional custom health 2802 // check. 2803 // 2804 // If you specify a health check configuration, you can specify either HealthCheckCustomConfig 2805 // or HealthCheckConfig but not both. 2806 // 2807 // You can't add, update, or delete a HealthCheckCustomConfig configuration 2808 // from an existing service. 2809 HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"` 2810 2811 // The name that you want to assign to the service. 2812 // 2813 // If you want AWS Cloud Map to create an SRV record when you register an instance, 2814 // and if you're using a system that requires a specific SRV format, such as 2815 // HAProxy (http://www.haproxy.org/), specify the following for Name: 2816 // 2817 // * Start the name with an underscore (_), such as _exampleservice 2818 // 2819 // * End the name with ._protocol, such as ._tcp 2820 // 2821 // When you register an instance, AWS Cloud Map creates an SRV record and assigns 2822 // a name to the record by concatenating the service name and the namespace 2823 // name, for example: 2824 // 2825 // _exampleservice._tcp.example.com 2826 // 2827 // Name is a required field 2828 Name *string `type:"string" required:"true"` 2829 2830 // The ID of the namespace that you want to use to create the service. 2831 NamespaceId *string `type:"string"` 2832 2833 // The tags to add to the service. Each tag consists of a key and an optional 2834 // value, both of which you define. Tag keys can have a maximum character length 2835 // of 128 characters, and tag values can have a maximum length of 256 characters. 2836 Tags []*Tag `type:"list"` 2837} 2838 2839// String returns the string representation 2840func (s CreateServiceInput) String() string { 2841 return awsutil.Prettify(s) 2842} 2843 2844// GoString returns the string representation 2845func (s CreateServiceInput) GoString() string { 2846 return s.String() 2847} 2848 2849// Validate inspects the fields of the type to determine if they are valid. 2850func (s *CreateServiceInput) Validate() error { 2851 invalidParams := request.ErrInvalidParams{Context: "CreateServiceInput"} 2852 if s.Name == nil { 2853 invalidParams.Add(request.NewErrParamRequired("Name")) 2854 } 2855 if s.DnsConfig != nil { 2856 if err := s.DnsConfig.Validate(); err != nil { 2857 invalidParams.AddNested("DnsConfig", err.(request.ErrInvalidParams)) 2858 } 2859 } 2860 if s.HealthCheckConfig != nil { 2861 if err := s.HealthCheckConfig.Validate(); err != nil { 2862 invalidParams.AddNested("HealthCheckConfig", err.(request.ErrInvalidParams)) 2863 } 2864 } 2865 if s.HealthCheckCustomConfig != nil { 2866 if err := s.HealthCheckCustomConfig.Validate(); err != nil { 2867 invalidParams.AddNested("HealthCheckCustomConfig", err.(request.ErrInvalidParams)) 2868 } 2869 } 2870 if s.Tags != nil { 2871 for i, v := range s.Tags { 2872 if v == nil { 2873 continue 2874 } 2875 if err := v.Validate(); err != nil { 2876 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 2877 } 2878 } 2879 } 2880 2881 if invalidParams.Len() > 0 { 2882 return invalidParams 2883 } 2884 return nil 2885} 2886 2887// SetCreatorRequestId sets the CreatorRequestId field's value. 2888func (s *CreateServiceInput) SetCreatorRequestId(v string) *CreateServiceInput { 2889 s.CreatorRequestId = &v 2890 return s 2891} 2892 2893// SetDescription sets the Description field's value. 2894func (s *CreateServiceInput) SetDescription(v string) *CreateServiceInput { 2895 s.Description = &v 2896 return s 2897} 2898 2899// SetDnsConfig sets the DnsConfig field's value. 2900func (s *CreateServiceInput) SetDnsConfig(v *DnsConfig) *CreateServiceInput { 2901 s.DnsConfig = v 2902 return s 2903} 2904 2905// SetHealthCheckConfig sets the HealthCheckConfig field's value. 2906func (s *CreateServiceInput) SetHealthCheckConfig(v *HealthCheckConfig) *CreateServiceInput { 2907 s.HealthCheckConfig = v 2908 return s 2909} 2910 2911// SetHealthCheckCustomConfig sets the HealthCheckCustomConfig field's value. 2912func (s *CreateServiceInput) SetHealthCheckCustomConfig(v *HealthCheckCustomConfig) *CreateServiceInput { 2913 s.HealthCheckCustomConfig = v 2914 return s 2915} 2916 2917// SetName sets the Name field's value. 2918func (s *CreateServiceInput) SetName(v string) *CreateServiceInput { 2919 s.Name = &v 2920 return s 2921} 2922 2923// SetNamespaceId sets the NamespaceId field's value. 2924func (s *CreateServiceInput) SetNamespaceId(v string) *CreateServiceInput { 2925 s.NamespaceId = &v 2926 return s 2927} 2928 2929// SetTags sets the Tags field's value. 2930func (s *CreateServiceInput) SetTags(v []*Tag) *CreateServiceInput { 2931 s.Tags = v 2932 return s 2933} 2934 2935type CreateServiceOutput struct { 2936 _ struct{} `type:"structure"` 2937 2938 // A complex type that contains information about the new service. 2939 Service *Service `type:"structure"` 2940} 2941 2942// String returns the string representation 2943func (s CreateServiceOutput) String() string { 2944 return awsutil.Prettify(s) 2945} 2946 2947// GoString returns the string representation 2948func (s CreateServiceOutput) GoString() string { 2949 return s.String() 2950} 2951 2952// SetService sets the Service field's value. 2953func (s *CreateServiceOutput) SetService(v *Service) *CreateServiceOutput { 2954 s.Service = v 2955 return s 2956} 2957 2958// The health check for the instance that is specified by ServiceId and InstanceId 2959// is not a custom health check. 2960type CustomHealthNotFound struct { 2961 _ struct{} `type:"structure"` 2962 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2963 2964 Message_ *string `locationName:"Message" type:"string"` 2965} 2966 2967// String returns the string representation 2968func (s CustomHealthNotFound) String() string { 2969 return awsutil.Prettify(s) 2970} 2971 2972// GoString returns the string representation 2973func (s CustomHealthNotFound) GoString() string { 2974 return s.String() 2975} 2976 2977func newErrorCustomHealthNotFound(v protocol.ResponseMetadata) error { 2978 return &CustomHealthNotFound{ 2979 RespMetadata: v, 2980 } 2981} 2982 2983// Code returns the exception type name. 2984func (s *CustomHealthNotFound) Code() string { 2985 return "CustomHealthNotFound" 2986} 2987 2988// Message returns the exception's message. 2989func (s *CustomHealthNotFound) Message() string { 2990 if s.Message_ != nil { 2991 return *s.Message_ 2992 } 2993 return "" 2994} 2995 2996// OrigErr always returns nil, satisfies awserr.Error interface. 2997func (s *CustomHealthNotFound) OrigErr() error { 2998 return nil 2999} 3000 3001func (s *CustomHealthNotFound) Error() string { 3002 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3003} 3004 3005// Status code returns the HTTP status code for the request's response error. 3006func (s *CustomHealthNotFound) StatusCode() int { 3007 return s.RespMetadata.StatusCode 3008} 3009 3010// RequestID returns the service's response RequestID for request. 3011func (s *CustomHealthNotFound) RequestID() string { 3012 return s.RespMetadata.RequestID 3013} 3014 3015type DeleteNamespaceInput struct { 3016 _ struct{} `type:"structure"` 3017 3018 // The ID of the namespace that you want to delete. 3019 // 3020 // Id is a required field 3021 Id *string `type:"string" required:"true"` 3022} 3023 3024// String returns the string representation 3025func (s DeleteNamespaceInput) String() string { 3026 return awsutil.Prettify(s) 3027} 3028 3029// GoString returns the string representation 3030func (s DeleteNamespaceInput) GoString() string { 3031 return s.String() 3032} 3033 3034// Validate inspects the fields of the type to determine if they are valid. 3035func (s *DeleteNamespaceInput) Validate() error { 3036 invalidParams := request.ErrInvalidParams{Context: "DeleteNamespaceInput"} 3037 if s.Id == nil { 3038 invalidParams.Add(request.NewErrParamRequired("Id")) 3039 } 3040 3041 if invalidParams.Len() > 0 { 3042 return invalidParams 3043 } 3044 return nil 3045} 3046 3047// SetId sets the Id field's value. 3048func (s *DeleteNamespaceInput) SetId(v string) *DeleteNamespaceInput { 3049 s.Id = &v 3050 return s 3051} 3052 3053type DeleteNamespaceOutput struct { 3054 _ struct{} `type:"structure"` 3055 3056 // A value that you can use to determine whether the request completed successfully. 3057 // To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html). 3058 OperationId *string `type:"string"` 3059} 3060 3061// String returns the string representation 3062func (s DeleteNamespaceOutput) String() string { 3063 return awsutil.Prettify(s) 3064} 3065 3066// GoString returns the string representation 3067func (s DeleteNamespaceOutput) GoString() string { 3068 return s.String() 3069} 3070 3071// SetOperationId sets the OperationId field's value. 3072func (s *DeleteNamespaceOutput) SetOperationId(v string) *DeleteNamespaceOutput { 3073 s.OperationId = &v 3074 return s 3075} 3076 3077type DeleteServiceInput struct { 3078 _ struct{} `type:"structure"` 3079 3080 // The ID of the service that you want to delete. 3081 // 3082 // Id is a required field 3083 Id *string `type:"string" required:"true"` 3084} 3085 3086// String returns the string representation 3087func (s DeleteServiceInput) String() string { 3088 return awsutil.Prettify(s) 3089} 3090 3091// GoString returns the string representation 3092func (s DeleteServiceInput) GoString() string { 3093 return s.String() 3094} 3095 3096// Validate inspects the fields of the type to determine if they are valid. 3097func (s *DeleteServiceInput) Validate() error { 3098 invalidParams := request.ErrInvalidParams{Context: "DeleteServiceInput"} 3099 if s.Id == nil { 3100 invalidParams.Add(request.NewErrParamRequired("Id")) 3101 } 3102 3103 if invalidParams.Len() > 0 { 3104 return invalidParams 3105 } 3106 return nil 3107} 3108 3109// SetId sets the Id field's value. 3110func (s *DeleteServiceInput) SetId(v string) *DeleteServiceInput { 3111 s.Id = &v 3112 return s 3113} 3114 3115type DeleteServiceOutput struct { 3116 _ struct{} `type:"structure"` 3117} 3118 3119// String returns the string representation 3120func (s DeleteServiceOutput) String() string { 3121 return awsutil.Prettify(s) 3122} 3123 3124// GoString returns the string representation 3125func (s DeleteServiceOutput) GoString() string { 3126 return s.String() 3127} 3128 3129type DeregisterInstanceInput struct { 3130 _ struct{} `type:"structure"` 3131 3132 // The value that you specified for Id in the RegisterInstance (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html) 3133 // request. 3134 // 3135 // InstanceId is a required field 3136 InstanceId *string `type:"string" required:"true"` 3137 3138 // The ID of the service that the instance is associated with. 3139 // 3140 // ServiceId is a required field 3141 ServiceId *string `type:"string" required:"true"` 3142} 3143 3144// String returns the string representation 3145func (s DeregisterInstanceInput) String() string { 3146 return awsutil.Prettify(s) 3147} 3148 3149// GoString returns the string representation 3150func (s DeregisterInstanceInput) GoString() string { 3151 return s.String() 3152} 3153 3154// Validate inspects the fields of the type to determine if they are valid. 3155func (s *DeregisterInstanceInput) Validate() error { 3156 invalidParams := request.ErrInvalidParams{Context: "DeregisterInstanceInput"} 3157 if s.InstanceId == nil { 3158 invalidParams.Add(request.NewErrParamRequired("InstanceId")) 3159 } 3160 if s.ServiceId == nil { 3161 invalidParams.Add(request.NewErrParamRequired("ServiceId")) 3162 } 3163 3164 if invalidParams.Len() > 0 { 3165 return invalidParams 3166 } 3167 return nil 3168} 3169 3170// SetInstanceId sets the InstanceId field's value. 3171func (s *DeregisterInstanceInput) SetInstanceId(v string) *DeregisterInstanceInput { 3172 s.InstanceId = &v 3173 return s 3174} 3175 3176// SetServiceId sets the ServiceId field's value. 3177func (s *DeregisterInstanceInput) SetServiceId(v string) *DeregisterInstanceInput { 3178 s.ServiceId = &v 3179 return s 3180} 3181 3182type DeregisterInstanceOutput struct { 3183 _ struct{} `type:"structure"` 3184 3185 // A value that you can use to determine whether the request completed successfully. 3186 // For more information, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html). 3187 OperationId *string `type:"string"` 3188} 3189 3190// String returns the string representation 3191func (s DeregisterInstanceOutput) String() string { 3192 return awsutil.Prettify(s) 3193} 3194 3195// GoString returns the string representation 3196func (s DeregisterInstanceOutput) GoString() string { 3197 return s.String() 3198} 3199 3200// SetOperationId sets the OperationId field's value. 3201func (s *DeregisterInstanceOutput) SetOperationId(v string) *DeregisterInstanceOutput { 3202 s.OperationId = &v 3203 return s 3204} 3205 3206type DiscoverInstancesInput struct { 3207 _ struct{} `type:"structure"` 3208 3209 // The health status of the instances that you want to discover. 3210 HealthStatus *string `type:"string" enum:"HealthStatusFilter"` 3211 3212 // The maximum number of instances that you want AWS Cloud Map to return in 3213 // the response to a DiscoverInstances request. If you don't specify a value 3214 // for MaxResults, AWS Cloud Map returns up to 100 instances. 3215 MaxResults *int64 `min:"1" type:"integer"` 3216 3217 // The name of the namespace that you specified when you registered the instance. 3218 // 3219 // NamespaceName is a required field 3220 NamespaceName *string `type:"string" required:"true"` 3221 3222 // A string map that contains attributes with values that you can use to filter 3223 // instances by any custom attribute that you specified when you registered 3224 // the instance. Only instances that match all the specified key/value pairs 3225 // will be returned. 3226 QueryParameters map[string]*string `type:"map"` 3227 3228 // The name of the service that you specified when you registered the instance. 3229 // 3230 // ServiceName is a required field 3231 ServiceName *string `type:"string" required:"true"` 3232} 3233 3234// String returns the string representation 3235func (s DiscoverInstancesInput) String() string { 3236 return awsutil.Prettify(s) 3237} 3238 3239// GoString returns the string representation 3240func (s DiscoverInstancesInput) GoString() string { 3241 return s.String() 3242} 3243 3244// Validate inspects the fields of the type to determine if they are valid. 3245func (s *DiscoverInstancesInput) Validate() error { 3246 invalidParams := request.ErrInvalidParams{Context: "DiscoverInstancesInput"} 3247 if s.MaxResults != nil && *s.MaxResults < 1 { 3248 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3249 } 3250 if s.NamespaceName == nil { 3251 invalidParams.Add(request.NewErrParamRequired("NamespaceName")) 3252 } 3253 if s.ServiceName == nil { 3254 invalidParams.Add(request.NewErrParamRequired("ServiceName")) 3255 } 3256 3257 if invalidParams.Len() > 0 { 3258 return invalidParams 3259 } 3260 return nil 3261} 3262 3263// SetHealthStatus sets the HealthStatus field's value. 3264func (s *DiscoverInstancesInput) SetHealthStatus(v string) *DiscoverInstancesInput { 3265 s.HealthStatus = &v 3266 return s 3267} 3268 3269// SetMaxResults sets the MaxResults field's value. 3270func (s *DiscoverInstancesInput) SetMaxResults(v int64) *DiscoverInstancesInput { 3271 s.MaxResults = &v 3272 return s 3273} 3274 3275// SetNamespaceName sets the NamespaceName field's value. 3276func (s *DiscoverInstancesInput) SetNamespaceName(v string) *DiscoverInstancesInput { 3277 s.NamespaceName = &v 3278 return s 3279} 3280 3281// SetQueryParameters sets the QueryParameters field's value. 3282func (s *DiscoverInstancesInput) SetQueryParameters(v map[string]*string) *DiscoverInstancesInput { 3283 s.QueryParameters = v 3284 return s 3285} 3286 3287// SetServiceName sets the ServiceName field's value. 3288func (s *DiscoverInstancesInput) SetServiceName(v string) *DiscoverInstancesInput { 3289 s.ServiceName = &v 3290 return s 3291} 3292 3293type DiscoverInstancesOutput struct { 3294 _ struct{} `type:"structure"` 3295 3296 // A complex type that contains one HttpInstanceSummary for each registered 3297 // instance. 3298 Instances []*HttpInstanceSummary `type:"list"` 3299} 3300 3301// String returns the string representation 3302func (s DiscoverInstancesOutput) String() string { 3303 return awsutil.Prettify(s) 3304} 3305 3306// GoString returns the string representation 3307func (s DiscoverInstancesOutput) GoString() string { 3308 return s.String() 3309} 3310 3311// SetInstances sets the Instances field's value. 3312func (s *DiscoverInstancesOutput) SetInstances(v []*HttpInstanceSummary) *DiscoverInstancesOutput { 3313 s.Instances = v 3314 return s 3315} 3316 3317// A complex type that contains information about the Amazon Route 53 DNS records 3318// that you want AWS Cloud Map to create when you register an instance. 3319type DnsConfig struct { 3320 _ struct{} `type:"structure"` 3321 3322 // An array that contains one DnsRecord object for each Route 53 DNS record 3323 // that you want AWS Cloud Map to create when you register an instance. 3324 // 3325 // DnsRecords is a required field 3326 DnsRecords []*DnsRecord `type:"list" required:"true"` 3327 3328 // The ID of the namespace to use for DNS configuration. 3329 // 3330 // Deprecated: Top level attribute in request should be used to reference namespace-id 3331 NamespaceId *string `deprecated:"true" type:"string"` 3332 3333 // The routing policy that you want to apply to all Route 53 DNS records that 3334 // AWS Cloud Map creates when you register an instance and specify this service. 3335 // 3336 // If you want to use this service to register instances that create alias records, 3337 // specify WEIGHTED for the routing policy. 3338 // 3339 // You can specify the following values: 3340 // 3341 // MULTIVALUE 3342 // 3343 // If you define a health check for the service and the health check is healthy, 3344 // Route 53 returns the applicable value for up to eight instances. 3345 // 3346 // For example, suppose the service includes configurations for one A record 3347 // and a health check, and you use the service to register 10 instances. Route 3348 // 53 responds to DNS queries with IP addresses for up to eight healthy instances. 3349 // If fewer than eight instances are healthy, Route 53 responds to every DNS 3350 // query with the IP addresses for all of the healthy instances. 3351 // 3352 // If you don't define a health check for the service, Route 53 assumes that 3353 // all instances are healthy and returns the values for up to eight instances. 3354 // 3355 // For more information about the multivalue routing policy, see Multivalue 3356 // Answer Routing (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-multivalue) 3357 // in the Route 53 Developer Guide. 3358 // 3359 // WEIGHTED 3360 // 3361 // Route 53 returns the applicable value from one randomly selected instance 3362 // from among the instances that you registered using the same service. Currently, 3363 // all records have the same weight, so you can't route more or less traffic 3364 // to any instances. 3365 // 3366 // For example, suppose the service includes configurations for one A record 3367 // and a health check, and you use the service to register 10 instances. Route 3368 // 53 responds to DNS queries with the IP address for one randomly selected 3369 // instance from among the healthy instances. If no instances are healthy, Route 3370 // 53 responds to DNS queries as if all of the instances were healthy. 3371 // 3372 // If you don't define a health check for the service, Route 53 assumes that 3373 // all instances are healthy and returns the applicable value for one randomly 3374 // selected instance. 3375 // 3376 // For more information about the weighted routing policy, see Weighted Routing 3377 // (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-weighted) 3378 // in the Route 53 Developer Guide. 3379 RoutingPolicy *string `type:"string" enum:"RoutingPolicy"` 3380} 3381 3382// String returns the string representation 3383func (s DnsConfig) String() string { 3384 return awsutil.Prettify(s) 3385} 3386 3387// GoString returns the string representation 3388func (s DnsConfig) GoString() string { 3389 return s.String() 3390} 3391 3392// Validate inspects the fields of the type to determine if they are valid. 3393func (s *DnsConfig) Validate() error { 3394 invalidParams := request.ErrInvalidParams{Context: "DnsConfig"} 3395 if s.DnsRecords == nil { 3396 invalidParams.Add(request.NewErrParamRequired("DnsRecords")) 3397 } 3398 if s.DnsRecords != nil { 3399 for i, v := range s.DnsRecords { 3400 if v == nil { 3401 continue 3402 } 3403 if err := v.Validate(); err != nil { 3404 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DnsRecords", i), err.(request.ErrInvalidParams)) 3405 } 3406 } 3407 } 3408 3409 if invalidParams.Len() > 0 { 3410 return invalidParams 3411 } 3412 return nil 3413} 3414 3415// SetDnsRecords sets the DnsRecords field's value. 3416func (s *DnsConfig) SetDnsRecords(v []*DnsRecord) *DnsConfig { 3417 s.DnsRecords = v 3418 return s 3419} 3420 3421// SetNamespaceId sets the NamespaceId field's value. 3422func (s *DnsConfig) SetNamespaceId(v string) *DnsConfig { 3423 s.NamespaceId = &v 3424 return s 3425} 3426 3427// SetRoutingPolicy sets the RoutingPolicy field's value. 3428func (s *DnsConfig) SetRoutingPolicy(v string) *DnsConfig { 3429 s.RoutingPolicy = &v 3430 return s 3431} 3432 3433// A complex type that contains information about changes to the Route 53 DNS 3434// records that AWS Cloud Map creates when you register an instance. 3435type DnsConfigChange struct { 3436 _ struct{} `type:"structure"` 3437 3438 // An array that contains one DnsRecord object for each Route 53 record that 3439 // you want AWS Cloud Map to create when you register an instance. 3440 // 3441 // DnsRecords is a required field 3442 DnsRecords []*DnsRecord `type:"list" required:"true"` 3443} 3444 3445// String returns the string representation 3446func (s DnsConfigChange) String() string { 3447 return awsutil.Prettify(s) 3448} 3449 3450// GoString returns the string representation 3451func (s DnsConfigChange) GoString() string { 3452 return s.String() 3453} 3454 3455// Validate inspects the fields of the type to determine if they are valid. 3456func (s *DnsConfigChange) Validate() error { 3457 invalidParams := request.ErrInvalidParams{Context: "DnsConfigChange"} 3458 if s.DnsRecords == nil { 3459 invalidParams.Add(request.NewErrParamRequired("DnsRecords")) 3460 } 3461 if s.DnsRecords != nil { 3462 for i, v := range s.DnsRecords { 3463 if v == nil { 3464 continue 3465 } 3466 if err := v.Validate(); err != nil { 3467 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DnsRecords", i), err.(request.ErrInvalidParams)) 3468 } 3469 } 3470 } 3471 3472 if invalidParams.Len() > 0 { 3473 return invalidParams 3474 } 3475 return nil 3476} 3477 3478// SetDnsRecords sets the DnsRecords field's value. 3479func (s *DnsConfigChange) SetDnsRecords(v []*DnsRecord) *DnsConfigChange { 3480 s.DnsRecords = v 3481 return s 3482} 3483 3484// A complex type that contains the ID for the Route 53 hosted zone that AWS 3485// Cloud Map creates when you create a namespace. 3486type DnsProperties struct { 3487 _ struct{} `type:"structure"` 3488 3489 // The ID for the Route 53 hosted zone that AWS Cloud Map creates when you create 3490 // a namespace. 3491 HostedZoneId *string `type:"string"` 3492} 3493 3494// String returns the string representation 3495func (s DnsProperties) String() string { 3496 return awsutil.Prettify(s) 3497} 3498 3499// GoString returns the string representation 3500func (s DnsProperties) GoString() string { 3501 return s.String() 3502} 3503 3504// SetHostedZoneId sets the HostedZoneId field's value. 3505func (s *DnsProperties) SetHostedZoneId(v string) *DnsProperties { 3506 s.HostedZoneId = &v 3507 return s 3508} 3509 3510// A complex type that contains information about the Route 53 DNS records that 3511// you want AWS Cloud Map to create when you register an instance. 3512type DnsRecord struct { 3513 _ struct{} `type:"structure"` 3514 3515 // The amount of time, in seconds, that you want DNS resolvers to cache the 3516 // settings for this record. 3517 // 3518 // Alias records don't include a TTL because Route 53 uses the TTL for the AWS 3519 // resource that an alias record routes traffic to. If you include the AWS_ALIAS_DNS_NAME 3520 // attribute when you submit a RegisterInstance (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html) 3521 // request, the TTL value is ignored. Always specify a TTL for the service; 3522 // you can use a service to register instances that create either alias or non-alias 3523 // records. 3524 // 3525 // TTL is a required field 3526 TTL *int64 `type:"long" required:"true"` 3527 3528 // The type of the resource, which indicates the type of value that Route 53 3529 // returns in response to DNS queries. You can specify values for Type in the 3530 // following combinations: 3531 // 3532 // * A 3533 // 3534 // * AAAA 3535 // 3536 // * A and AAAA 3537 // 3538 // * SRV 3539 // 3540 // * CNAME 3541 // 3542 // If you want AWS Cloud Map to create a Route 53 alias record when you register 3543 // an instance, specify A or AAAA for Type. 3544 // 3545 // You specify other settings, such as the IP address for A and AAAA records, 3546 // when you register an instance. For more information, see RegisterInstance 3547 // (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html). 3548 // 3549 // The following values are supported: 3550 // 3551 // A 3552 // 3553 // Route 53 returns the IP address of the resource in IPv4 format, such as 192.0.2.44. 3554 // 3555 // AAAA 3556 // 3557 // Route 53 returns the IP address of the resource in IPv6 format, such as 2001:0db8:85a3:0000:0000:abcd:0001:2345. 3558 // 3559 // CNAME 3560 // 3561 // Route 53 returns the domain name of the resource, such as www.example.com. 3562 // Note the following: 3563 // 3564 // * You specify the domain name that you want to route traffic to when you 3565 // register an instance. For more information, see Attributes (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html#cloudmap-RegisterInstance-request-Attributes) 3566 // in the topic RegisterInstance (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html). 3567 // 3568 // * You must specify WEIGHTED for the value of RoutingPolicy. 3569 // 3570 // * You can't specify both CNAME for Type and settings for HealthCheckConfig. 3571 // If you do, the request will fail with an InvalidInput error. 3572 // 3573 // SRV 3574 // 3575 // Route 53 returns the value for an SRV record. The value for an SRV record 3576 // uses the following values: 3577 // 3578 // priority weight port service-hostname 3579 // 3580 // Note the following about the values: 3581 // 3582 // * The values of priority and weight are both set to 1 and can't be changed. 3583 // 3584 // * The value of port comes from the value that you specify for the AWS_INSTANCE_PORT 3585 // attribute when you submit a RegisterInstance (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html) 3586 // request. 3587 // 3588 // * The value of service-hostname is a concatenation of the following values: 3589 // The value that you specify for InstanceId when you register an instance. 3590 // The name of the service. The name of the namespace. For example, if the 3591 // value of InstanceId is test, the name of the service is backend, and the 3592 // name of the namespace is example.com, the value of service-hostname is: 3593 // test.backend.example.com 3594 // 3595 // If you specify settings for an SRV record, note the following: 3596 // 3597 // * If you specify values for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both 3598 // in the RegisterInstance request, AWS Cloud Map automatically creates A 3599 // and/or AAAA records that have the same name as the value of service-hostname 3600 // in the SRV record. You can ignore these records. 3601 // 3602 // * If you're using a system that requires a specific SRV format, such as 3603 // HAProxy, see the Name (https://docs.aws.amazon.com/cloud-map/latest/api/API_CreateService.html#cloudmap-CreateService-request-Name) 3604 // element in the documentation about CreateService for information about 3605 // how to specify the correct name format. 3606 // 3607 // Type is a required field 3608 Type *string `type:"string" required:"true" enum:"RecordType"` 3609} 3610 3611// String returns the string representation 3612func (s DnsRecord) String() string { 3613 return awsutil.Prettify(s) 3614} 3615 3616// GoString returns the string representation 3617func (s DnsRecord) GoString() string { 3618 return s.String() 3619} 3620 3621// Validate inspects the fields of the type to determine if they are valid. 3622func (s *DnsRecord) Validate() error { 3623 invalidParams := request.ErrInvalidParams{Context: "DnsRecord"} 3624 if s.TTL == nil { 3625 invalidParams.Add(request.NewErrParamRequired("TTL")) 3626 } 3627 if s.Type == nil { 3628 invalidParams.Add(request.NewErrParamRequired("Type")) 3629 } 3630 3631 if invalidParams.Len() > 0 { 3632 return invalidParams 3633 } 3634 return nil 3635} 3636 3637// SetTTL sets the TTL field's value. 3638func (s *DnsRecord) SetTTL(v int64) *DnsRecord { 3639 s.TTL = &v 3640 return s 3641} 3642 3643// SetType sets the Type field's value. 3644func (s *DnsRecord) SetType(v string) *DnsRecord { 3645 s.Type = &v 3646 return s 3647} 3648 3649// The operation is already in progress. 3650type DuplicateRequest struct { 3651 _ struct{} `type:"structure"` 3652 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3653 3654 // The ID of the operation that is already in progress. 3655 DuplicateOperationId *string `type:"string"` 3656 3657 Message_ *string `locationName:"Message" type:"string"` 3658} 3659 3660// String returns the string representation 3661func (s DuplicateRequest) String() string { 3662 return awsutil.Prettify(s) 3663} 3664 3665// GoString returns the string representation 3666func (s DuplicateRequest) GoString() string { 3667 return s.String() 3668} 3669 3670func newErrorDuplicateRequest(v protocol.ResponseMetadata) error { 3671 return &DuplicateRequest{ 3672 RespMetadata: v, 3673 } 3674} 3675 3676// Code returns the exception type name. 3677func (s *DuplicateRequest) Code() string { 3678 return "DuplicateRequest" 3679} 3680 3681// Message returns the exception's message. 3682func (s *DuplicateRequest) Message() string { 3683 if s.Message_ != nil { 3684 return *s.Message_ 3685 } 3686 return "" 3687} 3688 3689// OrigErr always returns nil, satisfies awserr.Error interface. 3690func (s *DuplicateRequest) OrigErr() error { 3691 return nil 3692} 3693 3694func (s *DuplicateRequest) Error() string { 3695 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 3696} 3697 3698// Status code returns the HTTP status code for the request's response error. 3699func (s *DuplicateRequest) StatusCode() int { 3700 return s.RespMetadata.StatusCode 3701} 3702 3703// RequestID returns the service's response RequestID for request. 3704func (s *DuplicateRequest) RequestID() string { 3705 return s.RespMetadata.RequestID 3706} 3707 3708type GetInstanceInput struct { 3709 _ struct{} `type:"structure"` 3710 3711 // The ID of the instance that you want to get information about. 3712 // 3713 // InstanceId is a required field 3714 InstanceId *string `type:"string" required:"true"` 3715 3716 // The ID of the service that the instance is associated with. 3717 // 3718 // ServiceId is a required field 3719 ServiceId *string `type:"string" required:"true"` 3720} 3721 3722// String returns the string representation 3723func (s GetInstanceInput) String() string { 3724 return awsutil.Prettify(s) 3725} 3726 3727// GoString returns the string representation 3728func (s GetInstanceInput) GoString() string { 3729 return s.String() 3730} 3731 3732// Validate inspects the fields of the type to determine if they are valid. 3733func (s *GetInstanceInput) Validate() error { 3734 invalidParams := request.ErrInvalidParams{Context: "GetInstanceInput"} 3735 if s.InstanceId == nil { 3736 invalidParams.Add(request.NewErrParamRequired("InstanceId")) 3737 } 3738 if s.ServiceId == nil { 3739 invalidParams.Add(request.NewErrParamRequired("ServiceId")) 3740 } 3741 3742 if invalidParams.Len() > 0 { 3743 return invalidParams 3744 } 3745 return nil 3746} 3747 3748// SetInstanceId sets the InstanceId field's value. 3749func (s *GetInstanceInput) SetInstanceId(v string) *GetInstanceInput { 3750 s.InstanceId = &v 3751 return s 3752} 3753 3754// SetServiceId sets the ServiceId field's value. 3755func (s *GetInstanceInput) SetServiceId(v string) *GetInstanceInput { 3756 s.ServiceId = &v 3757 return s 3758} 3759 3760type GetInstanceOutput struct { 3761 _ struct{} `type:"structure"` 3762 3763 // A complex type that contains information about a specified instance. 3764 Instance *Instance `type:"structure"` 3765} 3766 3767// String returns the string representation 3768func (s GetInstanceOutput) String() string { 3769 return awsutil.Prettify(s) 3770} 3771 3772// GoString returns the string representation 3773func (s GetInstanceOutput) GoString() string { 3774 return s.String() 3775} 3776 3777// SetInstance sets the Instance field's value. 3778func (s *GetInstanceOutput) SetInstance(v *Instance) *GetInstanceOutput { 3779 s.Instance = v 3780 return s 3781} 3782 3783type GetInstancesHealthStatusInput struct { 3784 _ struct{} `type:"structure"` 3785 3786 // An array that contains the IDs of all the instances that you want to get 3787 // the health status for. 3788 // 3789 // If you omit Instances, AWS Cloud Map returns the health status for all the 3790 // instances that are associated with the specified service. 3791 // 3792 // To get the IDs for the instances that you've registered by using a specified 3793 // service, submit a ListInstances (https://docs.aws.amazon.com/cloud-map/latest/api/API_ListInstances.html) 3794 // request. 3795 Instances []*string `min:"1" type:"list"` 3796 3797 // The maximum number of instances that you want AWS Cloud Map to return in 3798 // the response to a GetInstancesHealthStatus request. If you don't specify 3799 // a value for MaxResults, AWS Cloud Map returns up to 100 instances. 3800 MaxResults *int64 `min:"1" type:"integer"` 3801 3802 // For the first GetInstancesHealthStatus request, omit this value. 3803 // 3804 // If more than MaxResults instances match the specified criteria, you can submit 3805 // another GetInstancesHealthStatus request to get the next group of results. 3806 // Specify the value of NextToken from the previous response in the next request. 3807 NextToken *string `type:"string"` 3808 3809 // The ID of the service that the instance is associated with. 3810 // 3811 // ServiceId is a required field 3812 ServiceId *string `type:"string" required:"true"` 3813} 3814 3815// String returns the string representation 3816func (s GetInstancesHealthStatusInput) String() string { 3817 return awsutil.Prettify(s) 3818} 3819 3820// GoString returns the string representation 3821func (s GetInstancesHealthStatusInput) GoString() string { 3822 return s.String() 3823} 3824 3825// Validate inspects the fields of the type to determine if they are valid. 3826func (s *GetInstancesHealthStatusInput) Validate() error { 3827 invalidParams := request.ErrInvalidParams{Context: "GetInstancesHealthStatusInput"} 3828 if s.Instances != nil && len(s.Instances) < 1 { 3829 invalidParams.Add(request.NewErrParamMinLen("Instances", 1)) 3830 } 3831 if s.MaxResults != nil && *s.MaxResults < 1 { 3832 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3833 } 3834 if s.ServiceId == nil { 3835 invalidParams.Add(request.NewErrParamRequired("ServiceId")) 3836 } 3837 3838 if invalidParams.Len() > 0 { 3839 return invalidParams 3840 } 3841 return nil 3842} 3843 3844// SetInstances sets the Instances field's value. 3845func (s *GetInstancesHealthStatusInput) SetInstances(v []*string) *GetInstancesHealthStatusInput { 3846 s.Instances = v 3847 return s 3848} 3849 3850// SetMaxResults sets the MaxResults field's value. 3851func (s *GetInstancesHealthStatusInput) SetMaxResults(v int64) *GetInstancesHealthStatusInput { 3852 s.MaxResults = &v 3853 return s 3854} 3855 3856// SetNextToken sets the NextToken field's value. 3857func (s *GetInstancesHealthStatusInput) SetNextToken(v string) *GetInstancesHealthStatusInput { 3858 s.NextToken = &v 3859 return s 3860} 3861 3862// SetServiceId sets the ServiceId field's value. 3863func (s *GetInstancesHealthStatusInput) SetServiceId(v string) *GetInstancesHealthStatusInput { 3864 s.ServiceId = &v 3865 return s 3866} 3867 3868type GetInstancesHealthStatusOutput struct { 3869 _ struct{} `type:"structure"` 3870 3871 // If more than MaxResults instances match the specified criteria, you can submit 3872 // another GetInstancesHealthStatus request to get the next group of results. 3873 // Specify the value of NextToken from the previous response in the next request. 3874 NextToken *string `type:"string"` 3875 3876 // A complex type that contains the IDs and the health status of the instances 3877 // that you specified in the GetInstancesHealthStatus request. 3878 Status map[string]*string `type:"map"` 3879} 3880 3881// String returns the string representation 3882func (s GetInstancesHealthStatusOutput) String() string { 3883 return awsutil.Prettify(s) 3884} 3885 3886// GoString returns the string representation 3887func (s GetInstancesHealthStatusOutput) GoString() string { 3888 return s.String() 3889} 3890 3891// SetNextToken sets the NextToken field's value. 3892func (s *GetInstancesHealthStatusOutput) SetNextToken(v string) *GetInstancesHealthStatusOutput { 3893 s.NextToken = &v 3894 return s 3895} 3896 3897// SetStatus sets the Status field's value. 3898func (s *GetInstancesHealthStatusOutput) SetStatus(v map[string]*string) *GetInstancesHealthStatusOutput { 3899 s.Status = v 3900 return s 3901} 3902 3903type GetNamespaceInput struct { 3904 _ struct{} `type:"structure"` 3905 3906 // The ID of the namespace that you want to get information about. 3907 // 3908 // Id is a required field 3909 Id *string `type:"string" required:"true"` 3910} 3911 3912// String returns the string representation 3913func (s GetNamespaceInput) String() string { 3914 return awsutil.Prettify(s) 3915} 3916 3917// GoString returns the string representation 3918func (s GetNamespaceInput) GoString() string { 3919 return s.String() 3920} 3921 3922// Validate inspects the fields of the type to determine if they are valid. 3923func (s *GetNamespaceInput) Validate() error { 3924 invalidParams := request.ErrInvalidParams{Context: "GetNamespaceInput"} 3925 if s.Id == nil { 3926 invalidParams.Add(request.NewErrParamRequired("Id")) 3927 } 3928 3929 if invalidParams.Len() > 0 { 3930 return invalidParams 3931 } 3932 return nil 3933} 3934 3935// SetId sets the Id field's value. 3936func (s *GetNamespaceInput) SetId(v string) *GetNamespaceInput { 3937 s.Id = &v 3938 return s 3939} 3940 3941type GetNamespaceOutput struct { 3942 _ struct{} `type:"structure"` 3943 3944 // A complex type that contains information about the specified namespace. 3945 Namespace *Namespace `type:"structure"` 3946} 3947 3948// String returns the string representation 3949func (s GetNamespaceOutput) String() string { 3950 return awsutil.Prettify(s) 3951} 3952 3953// GoString returns the string representation 3954func (s GetNamespaceOutput) GoString() string { 3955 return s.String() 3956} 3957 3958// SetNamespace sets the Namespace field's value. 3959func (s *GetNamespaceOutput) SetNamespace(v *Namespace) *GetNamespaceOutput { 3960 s.Namespace = v 3961 return s 3962} 3963 3964type GetOperationInput struct { 3965 _ struct{} `type:"structure"` 3966 3967 // The ID of the operation that you want to get more information about. 3968 // 3969 // OperationId is a required field 3970 OperationId *string `type:"string" required:"true"` 3971} 3972 3973// String returns the string representation 3974func (s GetOperationInput) String() string { 3975 return awsutil.Prettify(s) 3976} 3977 3978// GoString returns the string representation 3979func (s GetOperationInput) GoString() string { 3980 return s.String() 3981} 3982 3983// Validate inspects the fields of the type to determine if they are valid. 3984func (s *GetOperationInput) Validate() error { 3985 invalidParams := request.ErrInvalidParams{Context: "GetOperationInput"} 3986 if s.OperationId == nil { 3987 invalidParams.Add(request.NewErrParamRequired("OperationId")) 3988 } 3989 3990 if invalidParams.Len() > 0 { 3991 return invalidParams 3992 } 3993 return nil 3994} 3995 3996// SetOperationId sets the OperationId field's value. 3997func (s *GetOperationInput) SetOperationId(v string) *GetOperationInput { 3998 s.OperationId = &v 3999 return s 4000} 4001 4002type GetOperationOutput struct { 4003 _ struct{} `type:"structure"` 4004 4005 // A complex type that contains information about the operation. 4006 Operation *Operation `type:"structure"` 4007} 4008 4009// String returns the string representation 4010func (s GetOperationOutput) String() string { 4011 return awsutil.Prettify(s) 4012} 4013 4014// GoString returns the string representation 4015func (s GetOperationOutput) GoString() string { 4016 return s.String() 4017} 4018 4019// SetOperation sets the Operation field's value. 4020func (s *GetOperationOutput) SetOperation(v *Operation) *GetOperationOutput { 4021 s.Operation = v 4022 return s 4023} 4024 4025type GetServiceInput struct { 4026 _ struct{} `type:"structure"` 4027 4028 // The ID of the service that you want to get settings for. 4029 // 4030 // Id is a required field 4031 Id *string `type:"string" required:"true"` 4032} 4033 4034// String returns the string representation 4035func (s GetServiceInput) String() string { 4036 return awsutil.Prettify(s) 4037} 4038 4039// GoString returns the string representation 4040func (s GetServiceInput) GoString() string { 4041 return s.String() 4042} 4043 4044// Validate inspects the fields of the type to determine if they are valid. 4045func (s *GetServiceInput) Validate() error { 4046 invalidParams := request.ErrInvalidParams{Context: "GetServiceInput"} 4047 if s.Id == nil { 4048 invalidParams.Add(request.NewErrParamRequired("Id")) 4049 } 4050 4051 if invalidParams.Len() > 0 { 4052 return invalidParams 4053 } 4054 return nil 4055} 4056 4057// SetId sets the Id field's value. 4058func (s *GetServiceInput) SetId(v string) *GetServiceInput { 4059 s.Id = &v 4060 return s 4061} 4062 4063type GetServiceOutput struct { 4064 _ struct{} `type:"structure"` 4065 4066 // A complex type that contains information about the service. 4067 Service *Service `type:"structure"` 4068} 4069 4070// String returns the string representation 4071func (s GetServiceOutput) String() string { 4072 return awsutil.Prettify(s) 4073} 4074 4075// GoString returns the string representation 4076func (s GetServiceOutput) GoString() string { 4077 return s.String() 4078} 4079 4080// SetService sets the Service field's value. 4081func (s *GetServiceOutput) SetService(v *Service) *GetServiceOutput { 4082 s.Service = v 4083 return s 4084} 4085 4086// Public DNS and HTTP namespaces only. A complex type that contains settings 4087// for an optional health check. If you specify settings for a health check, 4088// AWS Cloud Map associates the health check with the records that you specify 4089// in DnsConfig. 4090// 4091// If you specify a health check configuration, you can specify either HealthCheckCustomConfig 4092// or HealthCheckConfig but not both. 4093// 4094// Health checks are basic Route 53 health checks that monitor an AWS endpoint. 4095// For information about pricing for health checks, see Amazon Route 53 Pricing 4096// (http://aws.amazon.com/route53/pricing/). 4097// 4098// Note the following about configuring health checks. 4099// 4100// A and AAAA records 4101// 4102// If DnsConfig includes configurations for both A and AAAA records, AWS Cloud 4103// Map creates a health check that uses the IPv4 address to check the health 4104// of the resource. If the endpoint that is specified by the IPv4 address is 4105// unhealthy, Route 53 considers both the A and AAAA records to be unhealthy. 4106// 4107// CNAME records 4108// 4109// You can't specify settings for HealthCheckConfig when the DNSConfig includes 4110// CNAME for the value of Type. If you do, the CreateService request will fail 4111// with an InvalidInput error. 4112// 4113// Request interval 4114// 4115// A Route 53 health checker in each health-checking region sends a health check 4116// request to an endpoint every 30 seconds. On average, your endpoint receives 4117// a health check request about every two seconds. However, health checkers 4118// don't coordinate with one another, so you'll sometimes see several requests 4119// per second followed by a few seconds with no health checks at all. 4120// 4121// Health checking regions 4122// 4123// Health checkers perform checks from all Route 53 health-checking regions. 4124// For a list of the current regions, see Regions (https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions). 4125// 4126// Alias records 4127// 4128// When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute, 4129// AWS Cloud Map creates a Route 53 alias record. Note the following: 4130// 4131// * Route 53 automatically sets EvaluateTargetHealth to true for alias records. 4132// When EvaluateTargetHealth is true, the alias record inherits the health 4133// of the referenced AWS resource. such as an ELB load balancer. For more 4134// information, see EvaluateTargetHealth (https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth). 4135// 4136// * If you include HealthCheckConfig and then use the service to register 4137// an instance that creates an alias record, Route 53 doesn't create the 4138// health check. 4139// 4140// Charges for health checks 4141// 4142// Health checks are basic Route 53 health checks that monitor an AWS endpoint. 4143// For information about pricing for health checks, see Amazon Route 53 Pricing 4144// (http://aws.amazon.com/route53/pricing/). 4145type HealthCheckConfig struct { 4146 _ struct{} `type:"structure"` 4147 4148 // The number of consecutive health checks that an endpoint must pass or fail 4149 // for Route 53 to change the current status of the endpoint from unhealthy 4150 // to healthy or vice versa. For more information, see How Route 53 Determines 4151 // Whether an Endpoint Is Healthy (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) 4152 // in the Route 53 Developer Guide. 4153 FailureThreshold *int64 `min:"1" type:"integer"` 4154 4155 // The path that you want Route 53 to request when performing health checks. 4156 // The path can be any value for which your endpoint will return an HTTP status 4157 // code of 2xx or 3xx when the endpoint is healthy, such as the file /docs/route53-health-check.html. 4158 // Route 53 automatically adds the DNS name for the service. If you don't specify 4159 // a value for ResourcePath, the default value is /. 4160 // 4161 // If you specify TCP for Type, you must not specify a value for ResourcePath. 4162 ResourcePath *string `type:"string"` 4163 4164 // The type of health check that you want to create, which indicates how Route 4165 // 53 determines whether an endpoint is healthy. 4166 // 4167 // You can't change the value of Type after you create a health check. 4168 // 4169 // You can create the following types of health checks: 4170 // 4171 // * HTTP: Route 53 tries to establish a TCP connection. If successful, Route 4172 // 53 submits an HTTP request and waits for an HTTP status code of 200 or 4173 // greater and less than 400. 4174 // 4175 // * HTTPS: Route 53 tries to establish a TCP connection. If successful, 4176 // Route 53 submits an HTTPS request and waits for an HTTP status code of 4177 // 200 or greater and less than 400. If you specify HTTPS for the value of 4178 // Type, the endpoint must support TLS v1.0 or later. 4179 // 4180 // * TCP: Route 53 tries to establish a TCP connection. If you specify TCP 4181 // for Type, don't specify a value for ResourcePath. 4182 // 4183 // For more information, see How Route 53 Determines Whether an Endpoint Is 4184 // Healthy (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) 4185 // in the Route 53 Developer Guide. 4186 // 4187 // Type is a required field 4188 Type *string `type:"string" required:"true" enum:"HealthCheckType"` 4189} 4190 4191// String returns the string representation 4192func (s HealthCheckConfig) String() string { 4193 return awsutil.Prettify(s) 4194} 4195 4196// GoString returns the string representation 4197func (s HealthCheckConfig) GoString() string { 4198 return s.String() 4199} 4200 4201// Validate inspects the fields of the type to determine if they are valid. 4202func (s *HealthCheckConfig) Validate() error { 4203 invalidParams := request.ErrInvalidParams{Context: "HealthCheckConfig"} 4204 if s.FailureThreshold != nil && *s.FailureThreshold < 1 { 4205 invalidParams.Add(request.NewErrParamMinValue("FailureThreshold", 1)) 4206 } 4207 if s.Type == nil { 4208 invalidParams.Add(request.NewErrParamRequired("Type")) 4209 } 4210 4211 if invalidParams.Len() > 0 { 4212 return invalidParams 4213 } 4214 return nil 4215} 4216 4217// SetFailureThreshold sets the FailureThreshold field's value. 4218func (s *HealthCheckConfig) SetFailureThreshold(v int64) *HealthCheckConfig { 4219 s.FailureThreshold = &v 4220 return s 4221} 4222 4223// SetResourcePath sets the ResourcePath field's value. 4224func (s *HealthCheckConfig) SetResourcePath(v string) *HealthCheckConfig { 4225 s.ResourcePath = &v 4226 return s 4227} 4228 4229// SetType sets the Type field's value. 4230func (s *HealthCheckConfig) SetType(v string) *HealthCheckConfig { 4231 s.Type = &v 4232 return s 4233} 4234 4235// A complex type that contains information about an optional custom health 4236// check. A custom health check, which requires that you use a third-party health 4237// checker to evaluate the health of your resources, is useful in the following 4238// circumstances: 4239// 4240// * You can't use a health check that is defined by HealthCheckConfig because 4241// the resource isn't available over the internet. For example, you can use 4242// a custom health check when the instance is in an Amazon VPC. (To check 4243// the health of resources in a VPC, the health checker must also be in the 4244// VPC.) 4245// 4246// * You want to use a third-party health checker regardless of where your 4247// resources are. 4248// 4249// If you specify a health check configuration, you can specify either HealthCheckCustomConfig 4250// or HealthCheckConfig but not both. 4251// 4252// To change the status of a custom health check, submit an UpdateInstanceCustomHealthStatus 4253// request. AWS Cloud Map doesn't monitor the status of the resource, it just 4254// keeps a record of the status specified in the most recent UpdateInstanceCustomHealthStatus 4255// request. 4256// 4257// Here's how custom health checks work: 4258// 4259// You create a service and specify a value for FailureThreshold. 4260// 4261// The failure threshold indicates the number of 30-second intervals you want 4262// AWS Cloud Map to wait between the time that your application sends an UpdateInstanceCustomHealthStatus 4263// (https://docs.aws.amazon.com/cloud-map/latest/api/API_UpdateInstanceCustomHealthStatus.html) 4264// request and the time that AWS Cloud Map stops routing internet traffic to 4265// the corresponding resource. 4266// 4267// You register an instance. 4268// 4269// You configure a third-party health checker to monitor the resource that is 4270// associated with the new instance. 4271// 4272// AWS Cloud Map doesn't check the health of the resource directly. 4273// 4274// The third-party health-checker determines that the resource is unhealthy 4275// and notifies your application. 4276// 4277// Your application submits an UpdateInstanceCustomHealthStatus request. 4278// 4279// AWS Cloud Map waits for (FailureThreshold x 30) seconds. 4280// 4281// If another UpdateInstanceCustomHealthStatus request doesn't arrive during 4282// that time to change the status back to healthy, AWS Cloud Map stops routing 4283// traffic to the resource. 4284type HealthCheckCustomConfig struct { 4285 _ struct{} `type:"structure"` 4286 4287 // The number of 30-second intervals that you want AWS Cloud Map to wait after 4288 // receiving an UpdateInstanceCustomHealthStatus request before it changes the 4289 // health status of a service instance. For example, suppose you specify a value 4290 // of 2 for FailureTheshold, and then your application sends an UpdateInstanceCustomHealthStatus 4291 // request. AWS Cloud Map waits for approximately 60 seconds (2 x 30) before 4292 // changing the status of the service instance based on that request. 4293 // 4294 // Sending a second or subsequent UpdateInstanceCustomHealthStatus request with 4295 // the same value before FailureThreshold x 30 seconds has passed doesn't accelerate 4296 // the change. AWS Cloud Map still waits FailureThreshold x 30 seconds after 4297 // the first request to make the change. 4298 FailureThreshold *int64 `min:"1" type:"integer"` 4299} 4300 4301// String returns the string representation 4302func (s HealthCheckCustomConfig) String() string { 4303 return awsutil.Prettify(s) 4304} 4305 4306// GoString returns the string representation 4307func (s HealthCheckCustomConfig) GoString() string { 4308 return s.String() 4309} 4310 4311// Validate inspects the fields of the type to determine if they are valid. 4312func (s *HealthCheckCustomConfig) Validate() error { 4313 invalidParams := request.ErrInvalidParams{Context: "HealthCheckCustomConfig"} 4314 if s.FailureThreshold != nil && *s.FailureThreshold < 1 { 4315 invalidParams.Add(request.NewErrParamMinValue("FailureThreshold", 1)) 4316 } 4317 4318 if invalidParams.Len() > 0 { 4319 return invalidParams 4320 } 4321 return nil 4322} 4323 4324// SetFailureThreshold sets the FailureThreshold field's value. 4325func (s *HealthCheckCustomConfig) SetFailureThreshold(v int64) *HealthCheckCustomConfig { 4326 s.FailureThreshold = &v 4327 return s 4328} 4329 4330// In a response to a DiscoverInstances (https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html) 4331// request, HttpInstanceSummary contains information about one instance that 4332// matches the values that you specified in the request. 4333type HttpInstanceSummary struct { 4334 _ struct{} `type:"structure"` 4335 4336 // If you included any attributes when you registered the instance, the values 4337 // of those attributes. 4338 Attributes map[string]*string `type:"map"` 4339 4340 // If you configured health checking in the service, the current health status 4341 // of the service instance. 4342 HealthStatus *string `type:"string" enum:"HealthStatus"` 4343 4344 // The ID of an instance that matches the values that you specified in the request. 4345 InstanceId *string `type:"string"` 4346 4347 // The name of the namespace that you specified when you registered the instance. 4348 NamespaceName *string `type:"string"` 4349 4350 // The name of the service that you specified when you registered the instance. 4351 ServiceName *string `type:"string"` 4352} 4353 4354// String returns the string representation 4355func (s HttpInstanceSummary) String() string { 4356 return awsutil.Prettify(s) 4357} 4358 4359// GoString returns the string representation 4360func (s HttpInstanceSummary) GoString() string { 4361 return s.String() 4362} 4363 4364// SetAttributes sets the Attributes field's value. 4365func (s *HttpInstanceSummary) SetAttributes(v map[string]*string) *HttpInstanceSummary { 4366 s.Attributes = v 4367 return s 4368} 4369 4370// SetHealthStatus sets the HealthStatus field's value. 4371func (s *HttpInstanceSummary) SetHealthStatus(v string) *HttpInstanceSummary { 4372 s.HealthStatus = &v 4373 return s 4374} 4375 4376// SetInstanceId sets the InstanceId field's value. 4377func (s *HttpInstanceSummary) SetInstanceId(v string) *HttpInstanceSummary { 4378 s.InstanceId = &v 4379 return s 4380} 4381 4382// SetNamespaceName sets the NamespaceName field's value. 4383func (s *HttpInstanceSummary) SetNamespaceName(v string) *HttpInstanceSummary { 4384 s.NamespaceName = &v 4385 return s 4386} 4387 4388// SetServiceName sets the ServiceName field's value. 4389func (s *HttpInstanceSummary) SetServiceName(v string) *HttpInstanceSummary { 4390 s.ServiceName = &v 4391 return s 4392} 4393 4394// A complex type that contains the name of an HTTP namespace. 4395type HttpProperties struct { 4396 _ struct{} `type:"structure"` 4397 4398 // The name of an HTTP namespace. 4399 HttpName *string `type:"string"` 4400} 4401 4402// String returns the string representation 4403func (s HttpProperties) String() string { 4404 return awsutil.Prettify(s) 4405} 4406 4407// GoString returns the string representation 4408func (s HttpProperties) GoString() string { 4409 return s.String() 4410} 4411 4412// SetHttpName sets the HttpName field's value. 4413func (s *HttpProperties) SetHttpName(v string) *HttpProperties { 4414 s.HttpName = &v 4415 return s 4416} 4417 4418// A complex type that contains information about an instance that AWS Cloud 4419// Map creates when you submit a RegisterInstance request. 4420type Instance struct { 4421 _ struct{} `type:"structure"` 4422 4423 // A string map that contains the following information for the service that 4424 // you specify in ServiceId: 4425 // 4426 // * The attributes that apply to the records that are defined in the service. 4427 // 4428 // * For each attribute, the applicable value. 4429 // 4430 // Supported attribute keys include the following: 4431 // 4432 // AWS_ALIAS_DNS_NAME 4433 // 4434 // If you want AWS Cloud Map to create a Route 53 alias record that routes traffic 4435 // to an Elastic Load Balancing load balancer, specify the DNS name that is 4436 // associated with the load balancer. For information about how to get the DNS 4437 // name, see "DNSName" in the topic AliasTarget (https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html). 4438 // 4439 // Note the following: 4440 // 4441 // * The configuration for the service that is specified by ServiceId must 4442 // include settings for an A record, an AAAA record, or both. 4443 // 4444 // * In the service that is specified by ServiceId, the value of RoutingPolicy 4445 // must be WEIGHTED. 4446 // 4447 // * If the service that is specified by ServiceId includes HealthCheckConfig 4448 // settings, AWS Cloud Map will create the health check, but it won't associate 4449 // the health check with the alias record. 4450 // 4451 // * Auto naming currently doesn't support creating alias records that route 4452 // traffic to AWS resources other than ELB load balancers. 4453 // 4454 // * If you specify a value for AWS_ALIAS_DNS_NAME, don't specify values 4455 // for any of the AWS_INSTANCE attributes. 4456 // 4457 // AWS_INSTANCE_CNAME 4458 // 4459 // If the service configuration includes a CNAME record, the domain name that 4460 // you want Route 53 to return in response to DNS queries, for example, example.com. 4461 // 4462 // This value is required if the service specified by ServiceId includes settings 4463 // for an CNAME record. 4464 // 4465 // AWS_INSTANCE_IPV4 4466 // 4467 // If the service configuration includes an A record, the IPv4 address that 4468 // you want Route 53 to return in response to DNS queries, for example, 192.0.2.44. 4469 // 4470 // This value is required if the service specified by ServiceId includes settings 4471 // for an A record. If the service includes settings for an SRV record, you 4472 // must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both. 4473 // 4474 // AWS_INSTANCE_IPV6 4475 // 4476 // If the service configuration includes an AAAA record, the IPv6 address that 4477 // you want Route 53 to return in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345. 4478 // 4479 // This value is required if the service specified by ServiceId includes settings 4480 // for an AAAA record. If the service includes settings for an SRV record, you 4481 // must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both. 4482 // 4483 // AWS_INSTANCE_PORT 4484 // 4485 // If the service includes an SRV record, the value that you want Route 53 to 4486 // return for the port. 4487 // 4488 // If the service includes HealthCheckConfig, the port on the endpoint that 4489 // you want Route 53 to send requests to. 4490 // 4491 // This value is required if you specified settings for an SRV record or a Route 4492 // 53 health check when you created the service. 4493 Attributes map[string]*string `type:"map"` 4494 4495 // A unique string that identifies the request and that allows failed RegisterInstance 4496 // requests to be retried without the risk of executing the operation twice. 4497 // You must use a unique CreatorRequestId string every time you submit a RegisterInstance 4498 // request if you're registering additional instances for the same namespace 4499 // and service. CreatorRequestId can be any unique string, for example, a date/time 4500 // stamp. 4501 CreatorRequestId *string `type:"string"` 4502 4503 // An identifier that you want to associate with the instance. Note the following: 4504 // 4505 // * If the service that is specified by ServiceId includes settings for 4506 // an SRV record, the value of InstanceId is automatically included as part 4507 // of the value for the SRV record. For more information, see DnsRecord > 4508 // Type (https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type). 4509 // 4510 // * You can use this value to update an existing instance. 4511 // 4512 // * To register a new instance, you must specify a value that is unique 4513 // among instances that you register by using the same service. 4514 // 4515 // * If you specify an existing InstanceId and ServiceId, AWS Cloud Map updates 4516 // the existing DNS records. If there's also an existing health check, AWS 4517 // Cloud Map deletes the old health check and creates a new one. The health 4518 // check isn't deleted immediately, so it will still appear for a while if 4519 // you submit a ListHealthChecks request, for example. 4520 // 4521 // Id is a required field 4522 Id *string `type:"string" required:"true"` 4523} 4524 4525// String returns the string representation 4526func (s Instance) String() string { 4527 return awsutil.Prettify(s) 4528} 4529 4530// GoString returns the string representation 4531func (s Instance) GoString() string { 4532 return s.String() 4533} 4534 4535// SetAttributes sets the Attributes field's value. 4536func (s *Instance) SetAttributes(v map[string]*string) *Instance { 4537 s.Attributes = v 4538 return s 4539} 4540 4541// SetCreatorRequestId sets the CreatorRequestId field's value. 4542func (s *Instance) SetCreatorRequestId(v string) *Instance { 4543 s.CreatorRequestId = &v 4544 return s 4545} 4546 4547// SetId sets the Id field's value. 4548func (s *Instance) SetId(v string) *Instance { 4549 s.Id = &v 4550 return s 4551} 4552 4553// No instance exists with the specified ID, or the instance was recently registered, 4554// and information about the instance hasn't propagated yet. 4555type InstanceNotFound struct { 4556 _ struct{} `type:"structure"` 4557 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4558 4559 Message_ *string `locationName:"Message" type:"string"` 4560} 4561 4562// String returns the string representation 4563func (s InstanceNotFound) String() string { 4564 return awsutil.Prettify(s) 4565} 4566 4567// GoString returns the string representation 4568func (s InstanceNotFound) GoString() string { 4569 return s.String() 4570} 4571 4572func newErrorInstanceNotFound(v protocol.ResponseMetadata) error { 4573 return &InstanceNotFound{ 4574 RespMetadata: v, 4575 } 4576} 4577 4578// Code returns the exception type name. 4579func (s *InstanceNotFound) Code() string { 4580 return "InstanceNotFound" 4581} 4582 4583// Message returns the exception's message. 4584func (s *InstanceNotFound) Message() string { 4585 if s.Message_ != nil { 4586 return *s.Message_ 4587 } 4588 return "" 4589} 4590 4591// OrigErr always returns nil, satisfies awserr.Error interface. 4592func (s *InstanceNotFound) OrigErr() error { 4593 return nil 4594} 4595 4596func (s *InstanceNotFound) Error() string { 4597 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4598} 4599 4600// Status code returns the HTTP status code for the request's response error. 4601func (s *InstanceNotFound) StatusCode() int { 4602 return s.RespMetadata.StatusCode 4603} 4604 4605// RequestID returns the service's response RequestID for request. 4606func (s *InstanceNotFound) RequestID() string { 4607 return s.RespMetadata.RequestID 4608} 4609 4610// A complex type that contains information about the instances that you registered 4611// by using a specified service. 4612type InstanceSummary struct { 4613 _ struct{} `type:"structure"` 4614 4615 // A string map that contains the following information: 4616 // 4617 // * The attributes that are associate with the instance. 4618 // 4619 // * For each attribute, the applicable value. 4620 // 4621 // Supported attribute keys include the following: 4622 // 4623 // * AWS_ALIAS_DNS_NAME: For an alias record that routes traffic to an Elastic 4624 // Load Balancing load balancer, the DNS name that is associated with the 4625 // load balancer. 4626 // 4627 // * AWS_INSTANCE_CNAME: For a CNAME record, the domain name that Route 53 4628 // returns in response to DNS queries, for example, example.com. 4629 // 4630 // * AWS_INSTANCE_IPV4: For an A record, the IPv4 address that Route 53 returns 4631 // in response to DNS queries, for example, 192.0.2.44. 4632 // 4633 // * AWS_INSTANCE_IPV6: For an AAAA record, the IPv6 address that Route 53 4634 // returns in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345. 4635 // 4636 // * AWS_INSTANCE_PORT: For an SRV record, the value that Route 53 returns 4637 // for the port. In addition, if the service includes HealthCheckConfig, 4638 // the port on the endpoint that Route 53 sends requests to. 4639 Attributes map[string]*string `type:"map"` 4640 4641 // The ID for an instance that you created by using a specified service. 4642 Id *string `type:"string"` 4643} 4644 4645// String returns the string representation 4646func (s InstanceSummary) String() string { 4647 return awsutil.Prettify(s) 4648} 4649 4650// GoString returns the string representation 4651func (s InstanceSummary) GoString() string { 4652 return s.String() 4653} 4654 4655// SetAttributes sets the Attributes field's value. 4656func (s *InstanceSummary) SetAttributes(v map[string]*string) *InstanceSummary { 4657 s.Attributes = v 4658 return s 4659} 4660 4661// SetId sets the Id field's value. 4662func (s *InstanceSummary) SetId(v string) *InstanceSummary { 4663 s.Id = &v 4664 return s 4665} 4666 4667// One or more specified values aren't valid. For example, a required value 4668// might be missing, a numeric value might be outside the allowed range, or 4669// a string value might exceed length constraints. 4670type InvalidInput struct { 4671 _ struct{} `type:"structure"` 4672 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4673 4674 Message_ *string `locationName:"Message" type:"string"` 4675} 4676 4677// String returns the string representation 4678func (s InvalidInput) String() string { 4679 return awsutil.Prettify(s) 4680} 4681 4682// GoString returns the string representation 4683func (s InvalidInput) GoString() string { 4684 return s.String() 4685} 4686 4687func newErrorInvalidInput(v protocol.ResponseMetadata) error { 4688 return &InvalidInput{ 4689 RespMetadata: v, 4690 } 4691} 4692 4693// Code returns the exception type name. 4694func (s *InvalidInput) Code() string { 4695 return "InvalidInput" 4696} 4697 4698// Message returns the exception's message. 4699func (s *InvalidInput) Message() string { 4700 if s.Message_ != nil { 4701 return *s.Message_ 4702 } 4703 return "" 4704} 4705 4706// OrigErr always returns nil, satisfies awserr.Error interface. 4707func (s *InvalidInput) OrigErr() error { 4708 return nil 4709} 4710 4711func (s *InvalidInput) Error() string { 4712 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4713} 4714 4715// Status code returns the HTTP status code for the request's response error. 4716func (s *InvalidInput) StatusCode() int { 4717 return s.RespMetadata.StatusCode 4718} 4719 4720// RequestID returns the service's response RequestID for request. 4721func (s *InvalidInput) RequestID() string { 4722 return s.RespMetadata.RequestID 4723} 4724 4725type ListInstancesInput struct { 4726 _ struct{} `type:"structure"` 4727 4728 // The maximum number of instances that you want AWS Cloud Map to return in 4729 // the response to a ListInstances request. If you don't specify a value for 4730 // MaxResults, AWS Cloud Map returns up to 100 instances. 4731 MaxResults *int64 `min:"1" type:"integer"` 4732 4733 // For the first ListInstances request, omit this value. 4734 // 4735 // If more than MaxResults instances match the specified criteria, you can submit 4736 // another ListInstances request to get the next group of results. Specify the 4737 // value of NextToken from the previous response in the next request. 4738 NextToken *string `type:"string"` 4739 4740 // The ID of the service that you want to list instances for. 4741 // 4742 // ServiceId is a required field 4743 ServiceId *string `type:"string" required:"true"` 4744} 4745 4746// String returns the string representation 4747func (s ListInstancesInput) String() string { 4748 return awsutil.Prettify(s) 4749} 4750 4751// GoString returns the string representation 4752func (s ListInstancesInput) GoString() string { 4753 return s.String() 4754} 4755 4756// Validate inspects the fields of the type to determine if they are valid. 4757func (s *ListInstancesInput) Validate() error { 4758 invalidParams := request.ErrInvalidParams{Context: "ListInstancesInput"} 4759 if s.MaxResults != nil && *s.MaxResults < 1 { 4760 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4761 } 4762 if s.ServiceId == nil { 4763 invalidParams.Add(request.NewErrParamRequired("ServiceId")) 4764 } 4765 4766 if invalidParams.Len() > 0 { 4767 return invalidParams 4768 } 4769 return nil 4770} 4771 4772// SetMaxResults sets the MaxResults field's value. 4773func (s *ListInstancesInput) SetMaxResults(v int64) *ListInstancesInput { 4774 s.MaxResults = &v 4775 return s 4776} 4777 4778// SetNextToken sets the NextToken field's value. 4779func (s *ListInstancesInput) SetNextToken(v string) *ListInstancesInput { 4780 s.NextToken = &v 4781 return s 4782} 4783 4784// SetServiceId sets the ServiceId field's value. 4785func (s *ListInstancesInput) SetServiceId(v string) *ListInstancesInput { 4786 s.ServiceId = &v 4787 return s 4788} 4789 4790type ListInstancesOutput struct { 4791 _ struct{} `type:"structure"` 4792 4793 // Summary information about the instances that are associated with the specified 4794 // service. 4795 Instances []*InstanceSummary `type:"list"` 4796 4797 // If more than MaxResults instances match the specified criteria, you can submit 4798 // another ListInstances request to get the next group of results. Specify the 4799 // value of NextToken from the previous response in the next request. 4800 NextToken *string `type:"string"` 4801} 4802 4803// String returns the string representation 4804func (s ListInstancesOutput) String() string { 4805 return awsutil.Prettify(s) 4806} 4807 4808// GoString returns the string representation 4809func (s ListInstancesOutput) GoString() string { 4810 return s.String() 4811} 4812 4813// SetInstances sets the Instances field's value. 4814func (s *ListInstancesOutput) SetInstances(v []*InstanceSummary) *ListInstancesOutput { 4815 s.Instances = v 4816 return s 4817} 4818 4819// SetNextToken sets the NextToken field's value. 4820func (s *ListInstancesOutput) SetNextToken(v string) *ListInstancesOutput { 4821 s.NextToken = &v 4822 return s 4823} 4824 4825type ListNamespacesInput struct { 4826 _ struct{} `type:"structure"` 4827 4828 // A complex type that contains specifications for the namespaces that you want 4829 // to list. 4830 // 4831 // If you specify more than one filter, a namespace must match all filters to 4832 // be returned by ListNamespaces. 4833 Filters []*NamespaceFilter `type:"list"` 4834 4835 // The maximum number of namespaces that you want AWS Cloud Map to return in 4836 // the response to a ListNamespaces request. If you don't specify a value for 4837 // MaxResults, AWS Cloud Map returns up to 100 namespaces. 4838 MaxResults *int64 `min:"1" type:"integer"` 4839 4840 // For the first ListNamespaces request, omit this value. 4841 // 4842 // If the response contains NextToken, submit another ListNamespaces request 4843 // to get the next group of results. Specify the value of NextToken from the 4844 // previous response in the next request. 4845 // 4846 // AWS Cloud Map gets MaxResults namespaces and then filters them based on the 4847 // specified criteria. It's possible that no namespaces in the first MaxResults 4848 // namespaces matched the specified criteria but that subsequent groups of MaxResults 4849 // namespaces do contain namespaces that match the criteria. 4850 NextToken *string `type:"string"` 4851} 4852 4853// String returns the string representation 4854func (s ListNamespacesInput) String() string { 4855 return awsutil.Prettify(s) 4856} 4857 4858// GoString returns the string representation 4859func (s ListNamespacesInput) GoString() string { 4860 return s.String() 4861} 4862 4863// Validate inspects the fields of the type to determine if they are valid. 4864func (s *ListNamespacesInput) Validate() error { 4865 invalidParams := request.ErrInvalidParams{Context: "ListNamespacesInput"} 4866 if s.MaxResults != nil && *s.MaxResults < 1 { 4867 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4868 } 4869 if s.Filters != nil { 4870 for i, v := range s.Filters { 4871 if v == nil { 4872 continue 4873 } 4874 if err := v.Validate(); err != nil { 4875 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) 4876 } 4877 } 4878 } 4879 4880 if invalidParams.Len() > 0 { 4881 return invalidParams 4882 } 4883 return nil 4884} 4885 4886// SetFilters sets the Filters field's value. 4887func (s *ListNamespacesInput) SetFilters(v []*NamespaceFilter) *ListNamespacesInput { 4888 s.Filters = v 4889 return s 4890} 4891 4892// SetMaxResults sets the MaxResults field's value. 4893func (s *ListNamespacesInput) SetMaxResults(v int64) *ListNamespacesInput { 4894 s.MaxResults = &v 4895 return s 4896} 4897 4898// SetNextToken sets the NextToken field's value. 4899func (s *ListNamespacesInput) SetNextToken(v string) *ListNamespacesInput { 4900 s.NextToken = &v 4901 return s 4902} 4903 4904type ListNamespacesOutput struct { 4905 _ struct{} `type:"structure"` 4906 4907 // An array that contains one NamespaceSummary object for each namespace that 4908 // matches the specified filter criteria. 4909 Namespaces []*NamespaceSummary `type:"list"` 4910 4911 // If the response contains NextToken, submit another ListNamespaces request 4912 // to get the next group of results. Specify the value of NextToken from the 4913 // previous response in the next request. 4914 // 4915 // AWS Cloud Map gets MaxResults namespaces and then filters them based on the 4916 // specified criteria. It's possible that no namespaces in the first MaxResults 4917 // namespaces matched the specified criteria but that subsequent groups of MaxResults 4918 // namespaces do contain namespaces that match the criteria. 4919 NextToken *string `type:"string"` 4920} 4921 4922// String returns the string representation 4923func (s ListNamespacesOutput) String() string { 4924 return awsutil.Prettify(s) 4925} 4926 4927// GoString returns the string representation 4928func (s ListNamespacesOutput) GoString() string { 4929 return s.String() 4930} 4931 4932// SetNamespaces sets the Namespaces field's value. 4933func (s *ListNamespacesOutput) SetNamespaces(v []*NamespaceSummary) *ListNamespacesOutput { 4934 s.Namespaces = v 4935 return s 4936} 4937 4938// SetNextToken sets the NextToken field's value. 4939func (s *ListNamespacesOutput) SetNextToken(v string) *ListNamespacesOutput { 4940 s.NextToken = &v 4941 return s 4942} 4943 4944type ListOperationsInput struct { 4945 _ struct{} `type:"structure"` 4946 4947 // A complex type that contains specifications for the operations that you want 4948 // to list, for example, operations that you started between a specified start 4949 // date and end date. 4950 // 4951 // If you specify more than one filter, an operation must match all filters 4952 // to be returned by ListOperations. 4953 Filters []*OperationFilter `type:"list"` 4954 4955 // The maximum number of items that you want AWS Cloud Map to return in the 4956 // response to a ListOperations request. If you don't specify a value for MaxResults, 4957 // AWS Cloud Map returns up to 100 operations. 4958 MaxResults *int64 `min:"1" type:"integer"` 4959 4960 // For the first ListOperations request, omit this value. 4961 // 4962 // If the response contains NextToken, submit another ListOperations request 4963 // to get the next group of results. Specify the value of NextToken from the 4964 // previous response in the next request. 4965 // 4966 // AWS Cloud Map gets MaxResults operations and then filters them based on the 4967 // specified criteria. It's possible that no operations in the first MaxResults 4968 // operations matched the specified criteria but that subsequent groups of MaxResults 4969 // operations do contain operations that match the criteria. 4970 NextToken *string `type:"string"` 4971} 4972 4973// String returns the string representation 4974func (s ListOperationsInput) String() string { 4975 return awsutil.Prettify(s) 4976} 4977 4978// GoString returns the string representation 4979func (s ListOperationsInput) GoString() string { 4980 return s.String() 4981} 4982 4983// Validate inspects the fields of the type to determine if they are valid. 4984func (s *ListOperationsInput) Validate() error { 4985 invalidParams := request.ErrInvalidParams{Context: "ListOperationsInput"} 4986 if s.MaxResults != nil && *s.MaxResults < 1 { 4987 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4988 } 4989 if s.Filters != nil { 4990 for i, v := range s.Filters { 4991 if v == nil { 4992 continue 4993 } 4994 if err := v.Validate(); err != nil { 4995 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) 4996 } 4997 } 4998 } 4999 5000 if invalidParams.Len() > 0 { 5001 return invalidParams 5002 } 5003 return nil 5004} 5005 5006// SetFilters sets the Filters field's value. 5007func (s *ListOperationsInput) SetFilters(v []*OperationFilter) *ListOperationsInput { 5008 s.Filters = v 5009 return s 5010} 5011 5012// SetMaxResults sets the MaxResults field's value. 5013func (s *ListOperationsInput) SetMaxResults(v int64) *ListOperationsInput { 5014 s.MaxResults = &v 5015 return s 5016} 5017 5018// SetNextToken sets the NextToken field's value. 5019func (s *ListOperationsInput) SetNextToken(v string) *ListOperationsInput { 5020 s.NextToken = &v 5021 return s 5022} 5023 5024type ListOperationsOutput struct { 5025 _ struct{} `type:"structure"` 5026 5027 // If the response contains NextToken, submit another ListOperations request 5028 // to get the next group of results. Specify the value of NextToken from the 5029 // previous response in the next request. 5030 // 5031 // AWS Cloud Map gets MaxResults operations and then filters them based on the 5032 // specified criteria. It's possible that no operations in the first MaxResults 5033 // operations matched the specified criteria but that subsequent groups of MaxResults 5034 // operations do contain operations that match the criteria. 5035 NextToken *string `type:"string"` 5036 5037 // Summary information about the operations that match the specified criteria. 5038 Operations []*OperationSummary `type:"list"` 5039} 5040 5041// String returns the string representation 5042func (s ListOperationsOutput) String() string { 5043 return awsutil.Prettify(s) 5044} 5045 5046// GoString returns the string representation 5047func (s ListOperationsOutput) GoString() string { 5048 return s.String() 5049} 5050 5051// SetNextToken sets the NextToken field's value. 5052func (s *ListOperationsOutput) SetNextToken(v string) *ListOperationsOutput { 5053 s.NextToken = &v 5054 return s 5055} 5056 5057// SetOperations sets the Operations field's value. 5058func (s *ListOperationsOutput) SetOperations(v []*OperationSummary) *ListOperationsOutput { 5059 s.Operations = v 5060 return s 5061} 5062 5063type ListServicesInput struct { 5064 _ struct{} `type:"structure"` 5065 5066 // A complex type that contains specifications for the namespaces that you want 5067 // to list services for. 5068 // 5069 // If you specify more than one filter, an operation must match all filters 5070 // to be returned by ListServices. 5071 Filters []*ServiceFilter `type:"list"` 5072 5073 // The maximum number of services that you want AWS Cloud Map to return in the 5074 // response to a ListServices request. If you don't specify a value for MaxResults, 5075 // AWS Cloud Map returns up to 100 services. 5076 MaxResults *int64 `min:"1" type:"integer"` 5077 5078 // For the first ListServices request, omit this value. 5079 // 5080 // If the response contains NextToken, submit another ListServices request to 5081 // get the next group of results. Specify the value of NextToken from the previous 5082 // response in the next request. 5083 // 5084 // AWS Cloud Map gets MaxResults services and then filters them based on the 5085 // specified criteria. It's possible that no services in the first MaxResults 5086 // services matched the specified criteria but that subsequent groups of MaxResults 5087 // services do contain services that match the criteria. 5088 NextToken *string `type:"string"` 5089} 5090 5091// String returns the string representation 5092func (s ListServicesInput) String() string { 5093 return awsutil.Prettify(s) 5094} 5095 5096// GoString returns the string representation 5097func (s ListServicesInput) GoString() string { 5098 return s.String() 5099} 5100 5101// Validate inspects the fields of the type to determine if they are valid. 5102func (s *ListServicesInput) Validate() error { 5103 invalidParams := request.ErrInvalidParams{Context: "ListServicesInput"} 5104 if s.MaxResults != nil && *s.MaxResults < 1 { 5105 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 5106 } 5107 if s.Filters != nil { 5108 for i, v := range s.Filters { 5109 if v == nil { 5110 continue 5111 } 5112 if err := v.Validate(); err != nil { 5113 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) 5114 } 5115 } 5116 } 5117 5118 if invalidParams.Len() > 0 { 5119 return invalidParams 5120 } 5121 return nil 5122} 5123 5124// SetFilters sets the Filters field's value. 5125func (s *ListServicesInput) SetFilters(v []*ServiceFilter) *ListServicesInput { 5126 s.Filters = v 5127 return s 5128} 5129 5130// SetMaxResults sets the MaxResults field's value. 5131func (s *ListServicesInput) SetMaxResults(v int64) *ListServicesInput { 5132 s.MaxResults = &v 5133 return s 5134} 5135 5136// SetNextToken sets the NextToken field's value. 5137func (s *ListServicesInput) SetNextToken(v string) *ListServicesInput { 5138 s.NextToken = &v 5139 return s 5140} 5141 5142type ListServicesOutput struct { 5143 _ struct{} `type:"structure"` 5144 5145 // If the response contains NextToken, submit another ListServices request to 5146 // get the next group of results. Specify the value of NextToken from the previous 5147 // response in the next request. 5148 // 5149 // AWS Cloud Map gets MaxResults services and then filters them based on the 5150 // specified criteria. It's possible that no services in the first MaxResults 5151 // services matched the specified criteria but that subsequent groups of MaxResults 5152 // services do contain services that match the criteria. 5153 NextToken *string `type:"string"` 5154 5155 // An array that contains one ServiceSummary object for each service that matches 5156 // the specified filter criteria. 5157 Services []*ServiceSummary `type:"list"` 5158} 5159 5160// String returns the string representation 5161func (s ListServicesOutput) String() string { 5162 return awsutil.Prettify(s) 5163} 5164 5165// GoString returns the string representation 5166func (s ListServicesOutput) GoString() string { 5167 return s.String() 5168} 5169 5170// SetNextToken sets the NextToken field's value. 5171func (s *ListServicesOutput) SetNextToken(v string) *ListServicesOutput { 5172 s.NextToken = &v 5173 return s 5174} 5175 5176// SetServices sets the Services field's value. 5177func (s *ListServicesOutput) SetServices(v []*ServiceSummary) *ListServicesOutput { 5178 s.Services = v 5179 return s 5180} 5181 5182type ListTagsForResourceInput struct { 5183 _ struct{} `type:"structure"` 5184 5185 // The Amazon Resource Name (ARN) of the resource that you want to retrieve 5186 // tags for. 5187 // 5188 // ResourceARN is a required field 5189 ResourceARN *string `min:"1" type:"string" required:"true"` 5190} 5191 5192// String returns the string representation 5193func (s ListTagsForResourceInput) String() string { 5194 return awsutil.Prettify(s) 5195} 5196 5197// GoString returns the string representation 5198func (s ListTagsForResourceInput) GoString() string { 5199 return s.String() 5200} 5201 5202// Validate inspects the fields of the type to determine if they are valid. 5203func (s *ListTagsForResourceInput) Validate() error { 5204 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 5205 if s.ResourceARN == nil { 5206 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 5207 } 5208 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 5209 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 5210 } 5211 5212 if invalidParams.Len() > 0 { 5213 return invalidParams 5214 } 5215 return nil 5216} 5217 5218// SetResourceARN sets the ResourceARN field's value. 5219func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput { 5220 s.ResourceARN = &v 5221 return s 5222} 5223 5224type ListTagsForResourceOutput struct { 5225 _ struct{} `type:"structure"` 5226 5227 // The tags that are assigned to the resource. 5228 Tags []*Tag `type:"list"` 5229} 5230 5231// String returns the string representation 5232func (s ListTagsForResourceOutput) String() string { 5233 return awsutil.Prettify(s) 5234} 5235 5236// GoString returns the string representation 5237func (s ListTagsForResourceOutput) GoString() string { 5238 return s.String() 5239} 5240 5241// SetTags sets the Tags field's value. 5242func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { 5243 s.Tags = v 5244 return s 5245} 5246 5247// A complex type that contains information about a specified namespace. 5248type Namespace struct { 5249 _ struct{} `type:"structure"` 5250 5251 // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the namespace 5252 // when you create it. 5253 Arn *string `type:"string"` 5254 5255 // The date that the namespace was created, in Unix date/time format and Coordinated 5256 // Universal Time (UTC). The value of CreateDate is accurate to milliseconds. 5257 // For example, the value 1516925490.087 represents Friday, January 26, 2018 5258 // 12:11:30.087 AM. 5259 CreateDate *time.Time `type:"timestamp"` 5260 5261 // A unique string that identifies the request and that allows failed requests 5262 // to be retried without the risk of executing an operation twice. 5263 CreatorRequestId *string `type:"string"` 5264 5265 // The description that you specify for the namespace when you create it. 5266 Description *string `type:"string"` 5267 5268 // The ID of a namespace. 5269 Id *string `type:"string"` 5270 5271 // The name of the namespace, such as example.com. 5272 Name *string `type:"string"` 5273 5274 // A complex type that contains information that's specific to the type of the 5275 // namespace. 5276 Properties *NamespaceProperties `type:"structure"` 5277 5278 // The number of services that are associated with the namespace. 5279 ServiceCount *int64 `type:"integer"` 5280 5281 // The type of the namespace. The methods for discovering instances depends 5282 // on the value that you specify: 5283 // 5284 // * HTTP: Instances can be discovered only programmatically, using the AWS 5285 // Cloud Map DiscoverInstances API. 5286 // 5287 // * DNS_PUBLIC: Instances can be discovered using public DNS queries and 5288 // using the DiscoverInstances API. 5289 // 5290 // * DNS_PRIVATE: Instances can be discovered using DNS queries in VPCs and 5291 // using the DiscoverInstances API. 5292 Type *string `type:"string" enum:"NamespaceType"` 5293} 5294 5295// String returns the string representation 5296func (s Namespace) String() string { 5297 return awsutil.Prettify(s) 5298} 5299 5300// GoString returns the string representation 5301func (s Namespace) GoString() string { 5302 return s.String() 5303} 5304 5305// SetArn sets the Arn field's value. 5306func (s *Namespace) SetArn(v string) *Namespace { 5307 s.Arn = &v 5308 return s 5309} 5310 5311// SetCreateDate sets the CreateDate field's value. 5312func (s *Namespace) SetCreateDate(v time.Time) *Namespace { 5313 s.CreateDate = &v 5314 return s 5315} 5316 5317// SetCreatorRequestId sets the CreatorRequestId field's value. 5318func (s *Namespace) SetCreatorRequestId(v string) *Namespace { 5319 s.CreatorRequestId = &v 5320 return s 5321} 5322 5323// SetDescription sets the Description field's value. 5324func (s *Namespace) SetDescription(v string) *Namespace { 5325 s.Description = &v 5326 return s 5327} 5328 5329// SetId sets the Id field's value. 5330func (s *Namespace) SetId(v string) *Namespace { 5331 s.Id = &v 5332 return s 5333} 5334 5335// SetName sets the Name field's value. 5336func (s *Namespace) SetName(v string) *Namespace { 5337 s.Name = &v 5338 return s 5339} 5340 5341// SetProperties sets the Properties field's value. 5342func (s *Namespace) SetProperties(v *NamespaceProperties) *Namespace { 5343 s.Properties = v 5344 return s 5345} 5346 5347// SetServiceCount sets the ServiceCount field's value. 5348func (s *Namespace) SetServiceCount(v int64) *Namespace { 5349 s.ServiceCount = &v 5350 return s 5351} 5352 5353// SetType sets the Type field's value. 5354func (s *Namespace) SetType(v string) *Namespace { 5355 s.Type = &v 5356 return s 5357} 5358 5359// The namespace that you're trying to create already exists. 5360type NamespaceAlreadyExists struct { 5361 _ struct{} `type:"structure"` 5362 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5363 5364 // The CreatorRequestId that was used to create the namespace. 5365 CreatorRequestId *string `type:"string"` 5366 5367 Message_ *string `locationName:"Message" type:"string"` 5368 5369 // The ID of the existing namespace. 5370 NamespaceId *string `type:"string"` 5371} 5372 5373// String returns the string representation 5374func (s NamespaceAlreadyExists) String() string { 5375 return awsutil.Prettify(s) 5376} 5377 5378// GoString returns the string representation 5379func (s NamespaceAlreadyExists) GoString() string { 5380 return s.String() 5381} 5382 5383func newErrorNamespaceAlreadyExists(v protocol.ResponseMetadata) error { 5384 return &NamespaceAlreadyExists{ 5385 RespMetadata: v, 5386 } 5387} 5388 5389// Code returns the exception type name. 5390func (s *NamespaceAlreadyExists) Code() string { 5391 return "NamespaceAlreadyExists" 5392} 5393 5394// Message returns the exception's message. 5395func (s *NamespaceAlreadyExists) Message() string { 5396 if s.Message_ != nil { 5397 return *s.Message_ 5398 } 5399 return "" 5400} 5401 5402// OrigErr always returns nil, satisfies awserr.Error interface. 5403func (s *NamespaceAlreadyExists) OrigErr() error { 5404 return nil 5405} 5406 5407func (s *NamespaceAlreadyExists) Error() string { 5408 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 5409} 5410 5411// Status code returns the HTTP status code for the request's response error. 5412func (s *NamespaceAlreadyExists) StatusCode() int { 5413 return s.RespMetadata.StatusCode 5414} 5415 5416// RequestID returns the service's response RequestID for request. 5417func (s *NamespaceAlreadyExists) RequestID() string { 5418 return s.RespMetadata.RequestID 5419} 5420 5421// A complex type that identifies the namespaces that you want to list. You 5422// can choose to list public or private namespaces. 5423type NamespaceFilter struct { 5424 _ struct{} `type:"structure"` 5425 5426 // The operator that you want to use to determine whether ListNamespaces returns 5427 // a namespace. Valid values for condition include: 5428 // 5429 // * EQ: When you specify EQ for the condition, you can choose to list only 5430 // public namespaces or private namespaces, but not both. EQ is the default 5431 // condition and can be omitted. 5432 // 5433 // * IN: When you specify IN for the condition, you can choose to list public 5434 // namespaces, private namespaces, or both. 5435 // 5436 // * BETWEEN: Not applicable 5437 Condition *string `type:"string" enum:"FilterCondition"` 5438 5439 // Specify TYPE. 5440 // 5441 // Name is a required field 5442 Name *string `type:"string" required:"true" enum:"NamespaceFilterName"` 5443 5444 // If you specify EQ for Condition, specify either DNS_PUBLIC or DNS_PRIVATE. 5445 // 5446 // If you specify IN for Condition, you can specify DNS_PUBLIC, DNS_PRIVATE, 5447 // or both. 5448 // 5449 // Values is a required field 5450 Values []*string `type:"list" required:"true"` 5451} 5452 5453// String returns the string representation 5454func (s NamespaceFilter) String() string { 5455 return awsutil.Prettify(s) 5456} 5457 5458// GoString returns the string representation 5459func (s NamespaceFilter) GoString() string { 5460 return s.String() 5461} 5462 5463// Validate inspects the fields of the type to determine if they are valid. 5464func (s *NamespaceFilter) Validate() error { 5465 invalidParams := request.ErrInvalidParams{Context: "NamespaceFilter"} 5466 if s.Name == nil { 5467 invalidParams.Add(request.NewErrParamRequired("Name")) 5468 } 5469 if s.Values == nil { 5470 invalidParams.Add(request.NewErrParamRequired("Values")) 5471 } 5472 5473 if invalidParams.Len() > 0 { 5474 return invalidParams 5475 } 5476 return nil 5477} 5478 5479// SetCondition sets the Condition field's value. 5480func (s *NamespaceFilter) SetCondition(v string) *NamespaceFilter { 5481 s.Condition = &v 5482 return s 5483} 5484 5485// SetName sets the Name field's value. 5486func (s *NamespaceFilter) SetName(v string) *NamespaceFilter { 5487 s.Name = &v 5488 return s 5489} 5490 5491// SetValues sets the Values field's value. 5492func (s *NamespaceFilter) SetValues(v []*string) *NamespaceFilter { 5493 s.Values = v 5494 return s 5495} 5496 5497// No namespace exists with the specified ID. 5498type NamespaceNotFound struct { 5499 _ struct{} `type:"structure"` 5500 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5501 5502 Message_ *string `locationName:"Message" type:"string"` 5503} 5504 5505// String returns the string representation 5506func (s NamespaceNotFound) String() string { 5507 return awsutil.Prettify(s) 5508} 5509 5510// GoString returns the string representation 5511func (s NamespaceNotFound) GoString() string { 5512 return s.String() 5513} 5514 5515func newErrorNamespaceNotFound(v protocol.ResponseMetadata) error { 5516 return &NamespaceNotFound{ 5517 RespMetadata: v, 5518 } 5519} 5520 5521// Code returns the exception type name. 5522func (s *NamespaceNotFound) Code() string { 5523 return "NamespaceNotFound" 5524} 5525 5526// Message returns the exception's message. 5527func (s *NamespaceNotFound) Message() string { 5528 if s.Message_ != nil { 5529 return *s.Message_ 5530 } 5531 return "" 5532} 5533 5534// OrigErr always returns nil, satisfies awserr.Error interface. 5535func (s *NamespaceNotFound) OrigErr() error { 5536 return nil 5537} 5538 5539func (s *NamespaceNotFound) Error() string { 5540 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 5541} 5542 5543// Status code returns the HTTP status code for the request's response error. 5544func (s *NamespaceNotFound) StatusCode() int { 5545 return s.RespMetadata.StatusCode 5546} 5547 5548// RequestID returns the service's response RequestID for request. 5549func (s *NamespaceNotFound) RequestID() string { 5550 return s.RespMetadata.RequestID 5551} 5552 5553// A complex type that contains information that is specific to the namespace 5554// type. 5555type NamespaceProperties struct { 5556 _ struct{} `type:"structure"` 5557 5558 // A complex type that contains the ID for the Route 53 hosted zone that AWS 5559 // Cloud Map creates when you create a namespace. 5560 DnsProperties *DnsProperties `type:"structure"` 5561 5562 // A complex type that contains the name of an HTTP namespace. 5563 HttpProperties *HttpProperties `type:"structure"` 5564} 5565 5566// String returns the string representation 5567func (s NamespaceProperties) String() string { 5568 return awsutil.Prettify(s) 5569} 5570 5571// GoString returns the string representation 5572func (s NamespaceProperties) GoString() string { 5573 return s.String() 5574} 5575 5576// SetDnsProperties sets the DnsProperties field's value. 5577func (s *NamespaceProperties) SetDnsProperties(v *DnsProperties) *NamespaceProperties { 5578 s.DnsProperties = v 5579 return s 5580} 5581 5582// SetHttpProperties sets the HttpProperties field's value. 5583func (s *NamespaceProperties) SetHttpProperties(v *HttpProperties) *NamespaceProperties { 5584 s.HttpProperties = v 5585 return s 5586} 5587 5588// A complex type that contains information about a namespace. 5589type NamespaceSummary struct { 5590 _ struct{} `type:"structure"` 5591 5592 // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the namespace 5593 // when you create it. 5594 Arn *string `type:"string"` 5595 5596 // The date and time that the namespace was created. 5597 CreateDate *time.Time `type:"timestamp"` 5598 5599 // A description for the namespace. 5600 Description *string `type:"string"` 5601 5602 // The ID of the namespace. 5603 Id *string `type:"string"` 5604 5605 // The name of the namespace. When you create a namespace, AWS Cloud Map automatically 5606 // creates a Route 53 hosted zone that has the same name as the namespace. 5607 Name *string `type:"string"` 5608 5609 // A complex type that contains information that is specific to the namespace 5610 // type. 5611 Properties *NamespaceProperties `type:"structure"` 5612 5613 // The number of services that were created using the namespace. 5614 ServiceCount *int64 `type:"integer"` 5615 5616 // The type of the namespace, either public or private. 5617 Type *string `type:"string" enum:"NamespaceType"` 5618} 5619 5620// String returns the string representation 5621func (s NamespaceSummary) String() string { 5622 return awsutil.Prettify(s) 5623} 5624 5625// GoString returns the string representation 5626func (s NamespaceSummary) GoString() string { 5627 return s.String() 5628} 5629 5630// SetArn sets the Arn field's value. 5631func (s *NamespaceSummary) SetArn(v string) *NamespaceSummary { 5632 s.Arn = &v 5633 return s 5634} 5635 5636// SetCreateDate sets the CreateDate field's value. 5637func (s *NamespaceSummary) SetCreateDate(v time.Time) *NamespaceSummary { 5638 s.CreateDate = &v 5639 return s 5640} 5641 5642// SetDescription sets the Description field's value. 5643func (s *NamespaceSummary) SetDescription(v string) *NamespaceSummary { 5644 s.Description = &v 5645 return s 5646} 5647 5648// SetId sets the Id field's value. 5649func (s *NamespaceSummary) SetId(v string) *NamespaceSummary { 5650 s.Id = &v 5651 return s 5652} 5653 5654// SetName sets the Name field's value. 5655func (s *NamespaceSummary) SetName(v string) *NamespaceSummary { 5656 s.Name = &v 5657 return s 5658} 5659 5660// SetProperties sets the Properties field's value. 5661func (s *NamespaceSummary) SetProperties(v *NamespaceProperties) *NamespaceSummary { 5662 s.Properties = v 5663 return s 5664} 5665 5666// SetServiceCount sets the ServiceCount field's value. 5667func (s *NamespaceSummary) SetServiceCount(v int64) *NamespaceSummary { 5668 s.ServiceCount = &v 5669 return s 5670} 5671 5672// SetType sets the Type field's value. 5673func (s *NamespaceSummary) SetType(v string) *NamespaceSummary { 5674 s.Type = &v 5675 return s 5676} 5677 5678// A complex type that contains information about a specified operation. 5679type Operation struct { 5680 _ struct{} `type:"structure"` 5681 5682 // The date and time that the request was submitted, in Unix date/time format 5683 // and Coordinated Universal Time (UTC). The value of CreateDate is accurate 5684 // to milliseconds. For example, the value 1516925490.087 represents Friday, 5685 // January 26, 2018 12:11:30.087 AM. 5686 CreateDate *time.Time `type:"timestamp"` 5687 5688 // The code associated with ErrorMessage. Values for ErrorCode include the following: 5689 // 5690 // * ACCESS_DENIED 5691 // 5692 // * CANNOT_CREATE_HOSTED_ZONE 5693 // 5694 // * EXPIRED_TOKEN 5695 // 5696 // * HOSTED_ZONE_NOT_FOUND 5697 // 5698 // * INTERNAL_FAILURE 5699 // 5700 // * INVALID_CHANGE_BATCH 5701 // 5702 // * THROTTLED_REQUEST 5703 ErrorCode *string `type:"string"` 5704 5705 // If the value of Status is FAIL, the reason that the operation failed. 5706 ErrorMessage *string `type:"string"` 5707 5708 // The ID of the operation that you want to get information about. 5709 Id *string `type:"string"` 5710 5711 // The status of the operation. Values include the following: 5712 // 5713 // * SUBMITTED: This is the initial state immediately after you submit a 5714 // request. 5715 // 5716 // * PENDING: AWS Cloud Map is performing the operation. 5717 // 5718 // * SUCCESS: The operation succeeded. 5719 // 5720 // * FAIL: The operation failed. For the failure reason, see ErrorMessage. 5721 Status *string `type:"string" enum:"OperationStatus"` 5722 5723 // The name of the target entity that is associated with the operation: 5724 // 5725 // * NAMESPACE: The namespace ID is returned in the ResourceId property. 5726 // 5727 // * SERVICE: The service ID is returned in the ResourceId property. 5728 // 5729 // * INSTANCE: The instance ID is returned in the ResourceId property. 5730 Targets map[string]*string `type:"map"` 5731 5732 // The name of the operation that is associated with the specified ID. 5733 Type *string `type:"string" enum:"OperationType"` 5734 5735 // The date and time that the value of Status changed to the current value, 5736 // in Unix date/time format and Coordinated Universal Time (UTC). The value 5737 // of UpdateDate is accurate to milliseconds. For example, the value 1516925490.087 5738 // represents Friday, January 26, 2018 12:11:30.087 AM. 5739 UpdateDate *time.Time `type:"timestamp"` 5740} 5741 5742// String returns the string representation 5743func (s Operation) String() string { 5744 return awsutil.Prettify(s) 5745} 5746 5747// GoString returns the string representation 5748func (s Operation) GoString() string { 5749 return s.String() 5750} 5751 5752// SetCreateDate sets the CreateDate field's value. 5753func (s *Operation) SetCreateDate(v time.Time) *Operation { 5754 s.CreateDate = &v 5755 return s 5756} 5757 5758// SetErrorCode sets the ErrorCode field's value. 5759func (s *Operation) SetErrorCode(v string) *Operation { 5760 s.ErrorCode = &v 5761 return s 5762} 5763 5764// SetErrorMessage sets the ErrorMessage field's value. 5765func (s *Operation) SetErrorMessage(v string) *Operation { 5766 s.ErrorMessage = &v 5767 return s 5768} 5769 5770// SetId sets the Id field's value. 5771func (s *Operation) SetId(v string) *Operation { 5772 s.Id = &v 5773 return s 5774} 5775 5776// SetStatus sets the Status field's value. 5777func (s *Operation) SetStatus(v string) *Operation { 5778 s.Status = &v 5779 return s 5780} 5781 5782// SetTargets sets the Targets field's value. 5783func (s *Operation) SetTargets(v map[string]*string) *Operation { 5784 s.Targets = v 5785 return s 5786} 5787 5788// SetType sets the Type field's value. 5789func (s *Operation) SetType(v string) *Operation { 5790 s.Type = &v 5791 return s 5792} 5793 5794// SetUpdateDate sets the UpdateDate field's value. 5795func (s *Operation) SetUpdateDate(v time.Time) *Operation { 5796 s.UpdateDate = &v 5797 return s 5798} 5799 5800// A complex type that lets you select the operations that you want to list. 5801type OperationFilter struct { 5802 _ struct{} `type:"structure"` 5803 5804 // The operator that you want to use to determine whether an operation matches 5805 // the specified value. Valid values for condition include: 5806 // 5807 // * EQ: When you specify EQ for the condition, you can specify only one 5808 // value. EQ is supported for NAMESPACE_ID, SERVICE_ID, STATUS, and TYPE. 5809 // EQ is the default condition and can be omitted. 5810 // 5811 // * IN: When you specify IN for the condition, you can specify a list of 5812 // one or more values. IN is supported for STATUS and TYPE. An operation 5813 // must match one of the specified values to be returned in the response. 5814 // 5815 // * BETWEEN: Specify a start date and an end date in Unix date/time format 5816 // and Coordinated Universal Time (UTC). The start date must be the first 5817 // value. BETWEEN is supported for UPDATE_DATE. 5818 Condition *string `type:"string" enum:"FilterCondition"` 5819 5820 // Specify the operations that you want to get: 5821 // 5822 // * NAMESPACE_ID: Gets operations related to specified namespaces. 5823 // 5824 // * SERVICE_ID: Gets operations related to specified services. 5825 // 5826 // * STATUS: Gets operations based on the status of the operations: SUBMITTED, 5827 // PENDING, SUCCEED, or FAIL. 5828 // 5829 // * TYPE: Gets specified types of operation. 5830 // 5831 // * UPDATE_DATE: Gets operations that changed status during a specified 5832 // date/time range. 5833 // 5834 // Name is a required field 5835 Name *string `type:"string" required:"true" enum:"OperationFilterName"` 5836 5837 // Specify values that are applicable to the value that you specify for Name: 5838 // 5839 // * NAMESPACE_ID: Specify one namespace ID. 5840 // 5841 // * SERVICE_ID: Specify one service ID. 5842 // 5843 // * STATUS: Specify one or more statuses: SUBMITTED, PENDING, SUCCEED, or 5844 // FAIL. 5845 // 5846 // * TYPE: Specify one or more of the following types: CREATE_NAMESPACE, 5847 // DELETE_NAMESPACE, UPDATE_SERVICE, REGISTER_INSTANCE, or DEREGISTER_INSTANCE. 5848 // 5849 // * UPDATE_DATE: Specify a start date and an end date in Unix date/time 5850 // format and Coordinated Universal Time (UTC). The start date must be the 5851 // first value. 5852 // 5853 // Values is a required field 5854 Values []*string `type:"list" required:"true"` 5855} 5856 5857// String returns the string representation 5858func (s OperationFilter) String() string { 5859 return awsutil.Prettify(s) 5860} 5861 5862// GoString returns the string representation 5863func (s OperationFilter) GoString() string { 5864 return s.String() 5865} 5866 5867// Validate inspects the fields of the type to determine if they are valid. 5868func (s *OperationFilter) Validate() error { 5869 invalidParams := request.ErrInvalidParams{Context: "OperationFilter"} 5870 if s.Name == nil { 5871 invalidParams.Add(request.NewErrParamRequired("Name")) 5872 } 5873 if s.Values == nil { 5874 invalidParams.Add(request.NewErrParamRequired("Values")) 5875 } 5876 5877 if invalidParams.Len() > 0 { 5878 return invalidParams 5879 } 5880 return nil 5881} 5882 5883// SetCondition sets the Condition field's value. 5884func (s *OperationFilter) SetCondition(v string) *OperationFilter { 5885 s.Condition = &v 5886 return s 5887} 5888 5889// SetName sets the Name field's value. 5890func (s *OperationFilter) SetName(v string) *OperationFilter { 5891 s.Name = &v 5892 return s 5893} 5894 5895// SetValues sets the Values field's value. 5896func (s *OperationFilter) SetValues(v []*string) *OperationFilter { 5897 s.Values = v 5898 return s 5899} 5900 5901// No operation exists with the specified ID. 5902type OperationNotFound struct { 5903 _ struct{} `type:"structure"` 5904 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5905 5906 Message_ *string `locationName:"Message" type:"string"` 5907} 5908 5909// String returns the string representation 5910func (s OperationNotFound) String() string { 5911 return awsutil.Prettify(s) 5912} 5913 5914// GoString returns the string representation 5915func (s OperationNotFound) GoString() string { 5916 return s.String() 5917} 5918 5919func newErrorOperationNotFound(v protocol.ResponseMetadata) error { 5920 return &OperationNotFound{ 5921 RespMetadata: v, 5922 } 5923} 5924 5925// Code returns the exception type name. 5926func (s *OperationNotFound) Code() string { 5927 return "OperationNotFound" 5928} 5929 5930// Message returns the exception's message. 5931func (s *OperationNotFound) Message() string { 5932 if s.Message_ != nil { 5933 return *s.Message_ 5934 } 5935 return "" 5936} 5937 5938// OrigErr always returns nil, satisfies awserr.Error interface. 5939func (s *OperationNotFound) OrigErr() error { 5940 return nil 5941} 5942 5943func (s *OperationNotFound) Error() string { 5944 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 5945} 5946 5947// Status code returns the HTTP status code for the request's response error. 5948func (s *OperationNotFound) StatusCode() int { 5949 return s.RespMetadata.StatusCode 5950} 5951 5952// RequestID returns the service's response RequestID for request. 5953func (s *OperationNotFound) RequestID() string { 5954 return s.RespMetadata.RequestID 5955} 5956 5957// A complex type that contains information about an operation that matches 5958// the criteria that you specified in a ListOperations (https://docs.aws.amazon.com/cloud-map/latest/api/API_ListOperations.html) 5959// request. 5960type OperationSummary struct { 5961 _ struct{} `type:"structure"` 5962 5963 // The ID for an operation. 5964 Id *string `type:"string"` 5965 5966 // The status of the operation. Values include the following: 5967 // 5968 // * SUBMITTED: This is the initial state immediately after you submit a 5969 // request. 5970 // 5971 // * PENDING: AWS Cloud Map is performing the operation. 5972 // 5973 // * SUCCESS: The operation succeeded. 5974 // 5975 // * FAIL: The operation failed. For the failure reason, see ErrorMessage. 5976 Status *string `type:"string" enum:"OperationStatus"` 5977} 5978 5979// String returns the string representation 5980func (s OperationSummary) String() string { 5981 return awsutil.Prettify(s) 5982} 5983 5984// GoString returns the string representation 5985func (s OperationSummary) GoString() string { 5986 return s.String() 5987} 5988 5989// SetId sets the Id field's value. 5990func (s *OperationSummary) SetId(v string) *OperationSummary { 5991 s.Id = &v 5992 return s 5993} 5994 5995// SetStatus sets the Status field's value. 5996func (s *OperationSummary) SetStatus(v string) *OperationSummary { 5997 s.Status = &v 5998 return s 5999} 6000 6001type RegisterInstanceInput struct { 6002 _ struct{} `type:"structure"` 6003 6004 // A string map that contains the following information for the service that 6005 // you specify in ServiceId: 6006 // 6007 // * The attributes that apply to the records that are defined in the service. 6008 // 6009 // * For each attribute, the applicable value. 6010 // 6011 // Supported attribute keys include the following: 6012 // 6013 // AWS_ALIAS_DNS_NAME 6014 // 6015 // If you want AWS Cloud Map to create an Amazon Route 53 alias record that 6016 // routes traffic to an Elastic Load Balancing load balancer, specify the DNS 6017 // name that is associated with the load balancer. For information about how 6018 // to get the DNS name, see "DNSName" in the topic AliasTarget (https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html) 6019 // in the Route 53 API Reference. 6020 // 6021 // Note the following: 6022 // 6023 // * The configuration for the service that is specified by ServiceId must 6024 // include settings for an A record, an AAAA record, or both. 6025 // 6026 // * In the service that is specified by ServiceId, the value of RoutingPolicy 6027 // must be WEIGHTED. 6028 // 6029 // * If the service that is specified by ServiceId includes HealthCheckConfig 6030 // settings, AWS Cloud Map will create the Route 53 health check, but it 6031 // won't associate the health check with the alias record. 6032 // 6033 // * Auto naming currently doesn't support creating alias records that route 6034 // traffic to AWS resources other than ELB load balancers. 6035 // 6036 // * If you specify a value for AWS_ALIAS_DNS_NAME, don't specify values 6037 // for any of the AWS_INSTANCE attributes. 6038 // 6039 // AWS_INIT_HEALTH_STATUS 6040 // 6041 // If the service configuration includes HealthCheckCustomConfig, you can optionally 6042 // use AWS_INIT_HEALTH_STATUS to specify the initial status of the custom health 6043 // check, HEALTHY or UNHEALTHY. If you don't specify a value for AWS_INIT_HEALTH_STATUS, 6044 // the initial status is HEALTHY. 6045 // 6046 // AWS_INSTANCE_CNAME 6047 // 6048 // If the service configuration includes a CNAME record, the domain name that 6049 // you want Route 53 to return in response to DNS queries, for example, example.com. 6050 // 6051 // This value is required if the service specified by ServiceId includes settings 6052 // for an CNAME record. 6053 // 6054 // AWS_INSTANCE_IPV4 6055 // 6056 // If the service configuration includes an A record, the IPv4 address that 6057 // you want Route 53 to return in response to DNS queries, for example, 192.0.2.44. 6058 // 6059 // This value is required if the service specified by ServiceId includes settings 6060 // for an A record. If the service includes settings for an SRV record, you 6061 // must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both. 6062 // 6063 // AWS_INSTANCE_IPV6 6064 // 6065 // If the service configuration includes an AAAA record, the IPv6 address that 6066 // you want Route 53 to return in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345. 6067 // 6068 // This value is required if the service specified by ServiceId includes settings 6069 // for an AAAA record. If the service includes settings for an SRV record, you 6070 // must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both. 6071 // 6072 // AWS_INSTANCE_PORT 6073 // 6074 // If the service includes an SRV record, the value that you want Route 53 to 6075 // return for the port. 6076 // 6077 // If the service includes HealthCheckConfig, the port on the endpoint that 6078 // you want Route 53 to send requests to. 6079 // 6080 // This value is required if you specified settings for an SRV record or a Route 6081 // 53 health check when you created the service. 6082 // 6083 // Custom attributes 6084 // 6085 // You can add up to 30 custom attributes. For each key-value pair, the maximum 6086 // length of the attribute name is 255 characters, and the maximum length of 6087 // the attribute value is 1,024 characters. Total size of all provided attributes 6088 // (sum of all keys and values) must not exceed 5,000 characters. 6089 // 6090 // Attributes is a required field 6091 Attributes map[string]*string `type:"map" required:"true"` 6092 6093 // A unique string that identifies the request and that allows failed RegisterInstance 6094 // requests to be retried without the risk of executing the operation twice. 6095 // You must use a unique CreatorRequestId string every time you submit a RegisterInstance 6096 // request if you're registering additional instances for the same namespace 6097 // and service. CreatorRequestId can be any unique string, for example, a date/time 6098 // stamp. 6099 CreatorRequestId *string `type:"string" idempotencyToken:"true"` 6100 6101 // An identifier that you want to associate with the instance. Note the following: 6102 // 6103 // * If the service that is specified by ServiceId includes settings for 6104 // an SRV record, the value of InstanceId is automatically included as part 6105 // of the value for the SRV record. For more information, see DnsRecord > 6106 // Type (https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type). 6107 // 6108 // * You can use this value to update an existing instance. 6109 // 6110 // * To register a new instance, you must specify a value that is unique 6111 // among instances that you register by using the same service. 6112 // 6113 // * If you specify an existing InstanceId and ServiceId, AWS Cloud Map updates 6114 // the existing DNS records, if any. If there's also an existing health check, 6115 // AWS Cloud Map deletes the old health check and creates a new one. The 6116 // health check isn't deleted immediately, so it will still appear for a 6117 // while if you submit a ListHealthChecks request, for example. 6118 // 6119 // InstanceId is a required field 6120 InstanceId *string `type:"string" required:"true"` 6121 6122 // The ID of the service that you want to use for settings for the instance. 6123 // 6124 // ServiceId is a required field 6125 ServiceId *string `type:"string" required:"true"` 6126} 6127 6128// String returns the string representation 6129func (s RegisterInstanceInput) String() string { 6130 return awsutil.Prettify(s) 6131} 6132 6133// GoString returns the string representation 6134func (s RegisterInstanceInput) GoString() string { 6135 return s.String() 6136} 6137 6138// Validate inspects the fields of the type to determine if they are valid. 6139func (s *RegisterInstanceInput) Validate() error { 6140 invalidParams := request.ErrInvalidParams{Context: "RegisterInstanceInput"} 6141 if s.Attributes == nil { 6142 invalidParams.Add(request.NewErrParamRequired("Attributes")) 6143 } 6144 if s.InstanceId == nil { 6145 invalidParams.Add(request.NewErrParamRequired("InstanceId")) 6146 } 6147 if s.ServiceId == nil { 6148 invalidParams.Add(request.NewErrParamRequired("ServiceId")) 6149 } 6150 6151 if invalidParams.Len() > 0 { 6152 return invalidParams 6153 } 6154 return nil 6155} 6156 6157// SetAttributes sets the Attributes field's value. 6158func (s *RegisterInstanceInput) SetAttributes(v map[string]*string) *RegisterInstanceInput { 6159 s.Attributes = v 6160 return s 6161} 6162 6163// SetCreatorRequestId sets the CreatorRequestId field's value. 6164func (s *RegisterInstanceInput) SetCreatorRequestId(v string) *RegisterInstanceInput { 6165 s.CreatorRequestId = &v 6166 return s 6167} 6168 6169// SetInstanceId sets the InstanceId field's value. 6170func (s *RegisterInstanceInput) SetInstanceId(v string) *RegisterInstanceInput { 6171 s.InstanceId = &v 6172 return s 6173} 6174 6175// SetServiceId sets the ServiceId field's value. 6176func (s *RegisterInstanceInput) SetServiceId(v string) *RegisterInstanceInput { 6177 s.ServiceId = &v 6178 return s 6179} 6180 6181type RegisterInstanceOutput struct { 6182 _ struct{} `type:"structure"` 6183 6184 // A value that you can use to determine whether the request completed successfully. 6185 // To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html). 6186 OperationId *string `type:"string"` 6187} 6188 6189// String returns the string representation 6190func (s RegisterInstanceOutput) String() string { 6191 return awsutil.Prettify(s) 6192} 6193 6194// GoString returns the string representation 6195func (s RegisterInstanceOutput) GoString() string { 6196 return s.String() 6197} 6198 6199// SetOperationId sets the OperationId field's value. 6200func (s *RegisterInstanceOutput) SetOperationId(v string) *RegisterInstanceOutput { 6201 s.OperationId = &v 6202 return s 6203} 6204 6205// The operation can't be completed because you've reached the limit on the 6206// number of requests. 6207type RequestLimitExceeded struct { 6208 _ struct{} `type:"structure"` 6209 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6210 6211 Message_ *string `locationName:"Message" type:"string"` 6212} 6213 6214// String returns the string representation 6215func (s RequestLimitExceeded) String() string { 6216 return awsutil.Prettify(s) 6217} 6218 6219// GoString returns the string representation 6220func (s RequestLimitExceeded) GoString() string { 6221 return s.String() 6222} 6223 6224func newErrorRequestLimitExceeded(v protocol.ResponseMetadata) error { 6225 return &RequestLimitExceeded{ 6226 RespMetadata: v, 6227 } 6228} 6229 6230// Code returns the exception type name. 6231func (s *RequestLimitExceeded) Code() string { 6232 return "RequestLimitExceeded" 6233} 6234 6235// Message returns the exception's message. 6236func (s *RequestLimitExceeded) Message() string { 6237 if s.Message_ != nil { 6238 return *s.Message_ 6239 } 6240 return "" 6241} 6242 6243// OrigErr always returns nil, satisfies awserr.Error interface. 6244func (s *RequestLimitExceeded) OrigErr() error { 6245 return nil 6246} 6247 6248func (s *RequestLimitExceeded) Error() string { 6249 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6250} 6251 6252// Status code returns the HTTP status code for the request's response error. 6253func (s *RequestLimitExceeded) StatusCode() int { 6254 return s.RespMetadata.StatusCode 6255} 6256 6257// RequestID returns the service's response RequestID for request. 6258func (s *RequestLimitExceeded) RequestID() string { 6259 return s.RespMetadata.RequestID 6260} 6261 6262// The specified resource can't be deleted because it contains other resources. 6263// For example, you can't delete a service that contains any instances. 6264type ResourceInUse struct { 6265 _ struct{} `type:"structure"` 6266 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6267 6268 Message_ *string `locationName:"Message" type:"string"` 6269} 6270 6271// String returns the string representation 6272func (s ResourceInUse) String() string { 6273 return awsutil.Prettify(s) 6274} 6275 6276// GoString returns the string representation 6277func (s ResourceInUse) GoString() string { 6278 return s.String() 6279} 6280 6281func newErrorResourceInUse(v protocol.ResponseMetadata) error { 6282 return &ResourceInUse{ 6283 RespMetadata: v, 6284 } 6285} 6286 6287// Code returns the exception type name. 6288func (s *ResourceInUse) Code() string { 6289 return "ResourceInUse" 6290} 6291 6292// Message returns the exception's message. 6293func (s *ResourceInUse) Message() string { 6294 if s.Message_ != nil { 6295 return *s.Message_ 6296 } 6297 return "" 6298} 6299 6300// OrigErr always returns nil, satisfies awserr.Error interface. 6301func (s *ResourceInUse) OrigErr() error { 6302 return nil 6303} 6304 6305func (s *ResourceInUse) Error() string { 6306 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6307} 6308 6309// Status code returns the HTTP status code for the request's response error. 6310func (s *ResourceInUse) StatusCode() int { 6311 return s.RespMetadata.StatusCode 6312} 6313 6314// RequestID returns the service's response RequestID for request. 6315func (s *ResourceInUse) RequestID() string { 6316 return s.RespMetadata.RequestID 6317} 6318 6319// The resource can't be created because you've reached the limit on the number 6320// of resources. 6321type ResourceLimitExceeded struct { 6322 _ struct{} `type:"structure"` 6323 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6324 6325 Message_ *string `locationName:"Message" type:"string"` 6326} 6327 6328// String returns the string representation 6329func (s ResourceLimitExceeded) String() string { 6330 return awsutil.Prettify(s) 6331} 6332 6333// GoString returns the string representation 6334func (s ResourceLimitExceeded) GoString() string { 6335 return s.String() 6336} 6337 6338func newErrorResourceLimitExceeded(v protocol.ResponseMetadata) error { 6339 return &ResourceLimitExceeded{ 6340 RespMetadata: v, 6341 } 6342} 6343 6344// Code returns the exception type name. 6345func (s *ResourceLimitExceeded) Code() string { 6346 return "ResourceLimitExceeded" 6347} 6348 6349// Message returns the exception's message. 6350func (s *ResourceLimitExceeded) Message() string { 6351 if s.Message_ != nil { 6352 return *s.Message_ 6353 } 6354 return "" 6355} 6356 6357// OrigErr always returns nil, satisfies awserr.Error interface. 6358func (s *ResourceLimitExceeded) OrigErr() error { 6359 return nil 6360} 6361 6362func (s *ResourceLimitExceeded) Error() string { 6363 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6364} 6365 6366// Status code returns the HTTP status code for the request's response error. 6367func (s *ResourceLimitExceeded) StatusCode() int { 6368 return s.RespMetadata.StatusCode 6369} 6370 6371// RequestID returns the service's response RequestID for request. 6372func (s *ResourceLimitExceeded) RequestID() string { 6373 return s.RespMetadata.RequestID 6374} 6375 6376// The operation can't be completed because the resource was not found. 6377type ResourceNotFoundException struct { 6378 _ struct{} `type:"structure"` 6379 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6380 6381 Message_ *string `locationName:"Message" type:"string"` 6382} 6383 6384// String returns the string representation 6385func (s ResourceNotFoundException) String() string { 6386 return awsutil.Prettify(s) 6387} 6388 6389// GoString returns the string representation 6390func (s ResourceNotFoundException) GoString() string { 6391 return s.String() 6392} 6393 6394func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 6395 return &ResourceNotFoundException{ 6396 RespMetadata: v, 6397 } 6398} 6399 6400// Code returns the exception type name. 6401func (s *ResourceNotFoundException) Code() string { 6402 return "ResourceNotFoundException" 6403} 6404 6405// Message returns the exception's message. 6406func (s *ResourceNotFoundException) Message() string { 6407 if s.Message_ != nil { 6408 return *s.Message_ 6409 } 6410 return "" 6411} 6412 6413// OrigErr always returns nil, satisfies awserr.Error interface. 6414func (s *ResourceNotFoundException) OrigErr() error { 6415 return nil 6416} 6417 6418func (s *ResourceNotFoundException) Error() string { 6419 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6420} 6421 6422// Status code returns the HTTP status code for the request's response error. 6423func (s *ResourceNotFoundException) StatusCode() int { 6424 return s.RespMetadata.StatusCode 6425} 6426 6427// RequestID returns the service's response RequestID for request. 6428func (s *ResourceNotFoundException) RequestID() string { 6429 return s.RespMetadata.RequestID 6430} 6431 6432// A complex type that contains information about the specified service. 6433type Service struct { 6434 _ struct{} `type:"structure"` 6435 6436 // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the service 6437 // when you create it. 6438 Arn *string `type:"string"` 6439 6440 // The date and time that the service was created, in Unix format and Coordinated 6441 // Universal Time (UTC). The value of CreateDate is accurate to milliseconds. 6442 // For example, the value 1516925490.087 represents Friday, January 26, 2018 6443 // 12:11:30.087 AM. 6444 CreateDate *time.Time `type:"timestamp"` 6445 6446 // A unique string that identifies the request and that allows failed requests 6447 // to be retried without the risk of executing the operation twice. CreatorRequestId 6448 // can be any unique string, for example, a date/time stamp. 6449 CreatorRequestId *string `type:"string"` 6450 6451 // The description of the service. 6452 Description *string `type:"string"` 6453 6454 // A complex type that contains information about the Route 53 DNS records that 6455 // you want AWS Cloud Map to create when you register an instance. 6456 DnsConfig *DnsConfig `type:"structure"` 6457 6458 // Public DNS and HTTP namespaces only. A complex type that contains settings 6459 // for an optional health check. If you specify settings for a health check, 6460 // AWS Cloud Map associates the health check with the records that you specify 6461 // in DnsConfig. 6462 // 6463 // For information about the charges for health checks, see Amazon Route 53 6464 // Pricing (http://aws.amazon.com/route53/pricing/). 6465 HealthCheckConfig *HealthCheckConfig `type:"structure"` 6466 6467 // A complex type that contains information about an optional custom health 6468 // check. 6469 // 6470 // If you specify a health check configuration, you can specify either HealthCheckCustomConfig 6471 // or HealthCheckConfig but not both. 6472 HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"` 6473 6474 // The ID that AWS Cloud Map assigned to the service when you created it. 6475 Id *string `type:"string"` 6476 6477 // The number of instances that are currently associated with the service. Instances 6478 // that were previously associated with the service but that have been deleted 6479 // are not included in the count. The count might not reflect pending registrations 6480 // and deregistrations. 6481 InstanceCount *int64 `type:"integer"` 6482 6483 // The name of the service. 6484 Name *string `type:"string"` 6485 6486 // The ID of the namespace that was used to create the service. 6487 NamespaceId *string `type:"string"` 6488} 6489 6490// String returns the string representation 6491func (s Service) String() string { 6492 return awsutil.Prettify(s) 6493} 6494 6495// GoString returns the string representation 6496func (s Service) GoString() string { 6497 return s.String() 6498} 6499 6500// SetArn sets the Arn field's value. 6501func (s *Service) SetArn(v string) *Service { 6502 s.Arn = &v 6503 return s 6504} 6505 6506// SetCreateDate sets the CreateDate field's value. 6507func (s *Service) SetCreateDate(v time.Time) *Service { 6508 s.CreateDate = &v 6509 return s 6510} 6511 6512// SetCreatorRequestId sets the CreatorRequestId field's value. 6513func (s *Service) SetCreatorRequestId(v string) *Service { 6514 s.CreatorRequestId = &v 6515 return s 6516} 6517 6518// SetDescription sets the Description field's value. 6519func (s *Service) SetDescription(v string) *Service { 6520 s.Description = &v 6521 return s 6522} 6523 6524// SetDnsConfig sets the DnsConfig field's value. 6525func (s *Service) SetDnsConfig(v *DnsConfig) *Service { 6526 s.DnsConfig = v 6527 return s 6528} 6529 6530// SetHealthCheckConfig sets the HealthCheckConfig field's value. 6531func (s *Service) SetHealthCheckConfig(v *HealthCheckConfig) *Service { 6532 s.HealthCheckConfig = v 6533 return s 6534} 6535 6536// SetHealthCheckCustomConfig sets the HealthCheckCustomConfig field's value. 6537func (s *Service) SetHealthCheckCustomConfig(v *HealthCheckCustomConfig) *Service { 6538 s.HealthCheckCustomConfig = v 6539 return s 6540} 6541 6542// SetId sets the Id field's value. 6543func (s *Service) SetId(v string) *Service { 6544 s.Id = &v 6545 return s 6546} 6547 6548// SetInstanceCount sets the InstanceCount field's value. 6549func (s *Service) SetInstanceCount(v int64) *Service { 6550 s.InstanceCount = &v 6551 return s 6552} 6553 6554// SetName sets the Name field's value. 6555func (s *Service) SetName(v string) *Service { 6556 s.Name = &v 6557 return s 6558} 6559 6560// SetNamespaceId sets the NamespaceId field's value. 6561func (s *Service) SetNamespaceId(v string) *Service { 6562 s.NamespaceId = &v 6563 return s 6564} 6565 6566// The service can't be created because a service with the same name already 6567// exists. 6568type ServiceAlreadyExists struct { 6569 _ struct{} `type:"structure"` 6570 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6571 6572 // The CreatorRequestId that was used to create the service. 6573 CreatorRequestId *string `type:"string"` 6574 6575 Message_ *string `locationName:"Message" type:"string"` 6576 6577 // The ID of the existing service. 6578 ServiceId *string `type:"string"` 6579} 6580 6581// String returns the string representation 6582func (s ServiceAlreadyExists) String() string { 6583 return awsutil.Prettify(s) 6584} 6585 6586// GoString returns the string representation 6587func (s ServiceAlreadyExists) GoString() string { 6588 return s.String() 6589} 6590 6591func newErrorServiceAlreadyExists(v protocol.ResponseMetadata) error { 6592 return &ServiceAlreadyExists{ 6593 RespMetadata: v, 6594 } 6595} 6596 6597// Code returns the exception type name. 6598func (s *ServiceAlreadyExists) Code() string { 6599 return "ServiceAlreadyExists" 6600} 6601 6602// Message returns the exception's message. 6603func (s *ServiceAlreadyExists) Message() string { 6604 if s.Message_ != nil { 6605 return *s.Message_ 6606 } 6607 return "" 6608} 6609 6610// OrigErr always returns nil, satisfies awserr.Error interface. 6611func (s *ServiceAlreadyExists) OrigErr() error { 6612 return nil 6613} 6614 6615func (s *ServiceAlreadyExists) Error() string { 6616 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 6617} 6618 6619// Status code returns the HTTP status code for the request's response error. 6620func (s *ServiceAlreadyExists) StatusCode() int { 6621 return s.RespMetadata.StatusCode 6622} 6623 6624// RequestID returns the service's response RequestID for request. 6625func (s *ServiceAlreadyExists) RequestID() string { 6626 return s.RespMetadata.RequestID 6627} 6628 6629// A complex type that contains changes to an existing service. 6630type ServiceChange struct { 6631 _ struct{} `type:"structure"` 6632 6633 // A description for the service. 6634 Description *string `type:"string"` 6635 6636 // A complex type that contains information about the Route 53 DNS records that 6637 // you want AWS Cloud Map to create when you register an instance. 6638 DnsConfig *DnsConfigChange `type:"structure"` 6639 6640 // Public DNS and HTTP namespaces only. A complex type that contains settings 6641 // for an optional health check. If you specify settings for a health check, 6642 // AWS Cloud Map associates the health check with the records that you specify 6643 // in DnsConfig. 6644 // 6645 // If you specify a health check configuration, you can specify either HealthCheckCustomConfig 6646 // or HealthCheckConfig but not both. 6647 // 6648 // Health checks are basic Route 53 health checks that monitor an AWS endpoint. 6649 // For information about pricing for health checks, see Amazon Route 53 Pricing 6650 // (http://aws.amazon.com/route53/pricing/). 6651 // 6652 // Note the following about configuring health checks. 6653 // 6654 // A and AAAA records 6655 // 6656 // If DnsConfig includes configurations for both A and AAAA records, AWS Cloud 6657 // Map creates a health check that uses the IPv4 address to check the health 6658 // of the resource. If the endpoint that is specified by the IPv4 address is 6659 // unhealthy, Route 53 considers both the A and AAAA records to be unhealthy. 6660 // 6661 // CNAME records 6662 // 6663 // You can't specify settings for HealthCheckConfig when the DNSConfig includes 6664 // CNAME for the value of Type. If you do, the CreateService request will fail 6665 // with an InvalidInput error. 6666 // 6667 // Request interval 6668 // 6669 // A Route 53 health checker in each health-checking region sends a health check 6670 // request to an endpoint every 30 seconds. On average, your endpoint receives 6671 // a health check request about every two seconds. However, health checkers 6672 // don't coordinate with one another, so you'll sometimes see several requests 6673 // per second followed by a few seconds with no health checks at all. 6674 // 6675 // Health checking regions 6676 // 6677 // Health checkers perform checks from all Route 53 health-checking regions. 6678 // For a list of the current regions, see Regions (https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions). 6679 // 6680 // Alias records 6681 // 6682 // When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute, 6683 // AWS Cloud Map creates a Route 53 alias record. Note the following: 6684 // 6685 // * Route 53 automatically sets EvaluateTargetHealth to true for alias records. 6686 // When EvaluateTargetHealth is true, the alias record inherits the health 6687 // of the referenced AWS resource. such as an ELB load balancer. For more 6688 // information, see EvaluateTargetHealth (https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth). 6689 // 6690 // * If you include HealthCheckConfig and then use the service to register 6691 // an instance that creates an alias record, Route 53 doesn't create the 6692 // health check. 6693 // 6694 // Charges for health checks 6695 // 6696 // Health checks are basic Route 53 health checks that monitor an AWS endpoint. 6697 // For information about pricing for health checks, see Amazon Route 53 Pricing 6698 // (http://aws.amazon.com/route53/pricing/). 6699 HealthCheckConfig *HealthCheckConfig `type:"structure"` 6700} 6701 6702// String returns the string representation 6703func (s ServiceChange) String() string { 6704 return awsutil.Prettify(s) 6705} 6706 6707// GoString returns the string representation 6708func (s ServiceChange) GoString() string { 6709 return s.String() 6710} 6711 6712// Validate inspects the fields of the type to determine if they are valid. 6713func (s *ServiceChange) Validate() error { 6714 invalidParams := request.ErrInvalidParams{Context: "ServiceChange"} 6715 if s.DnsConfig != nil { 6716 if err := s.DnsConfig.Validate(); err != nil { 6717 invalidParams.AddNested("DnsConfig", err.(request.ErrInvalidParams)) 6718 } 6719 } 6720 if s.HealthCheckConfig != nil { 6721 if err := s.HealthCheckConfig.Validate(); err != nil { 6722 invalidParams.AddNested("HealthCheckConfig", err.(request.ErrInvalidParams)) 6723 } 6724 } 6725 6726 if invalidParams.Len() > 0 { 6727 return invalidParams 6728 } 6729 return nil 6730} 6731 6732// SetDescription sets the Description field's value. 6733func (s *ServiceChange) SetDescription(v string) *ServiceChange { 6734 s.Description = &v 6735 return s 6736} 6737 6738// SetDnsConfig sets the DnsConfig field's value. 6739func (s *ServiceChange) SetDnsConfig(v *DnsConfigChange) *ServiceChange { 6740 s.DnsConfig = v 6741 return s 6742} 6743 6744// SetHealthCheckConfig sets the HealthCheckConfig field's value. 6745func (s *ServiceChange) SetHealthCheckConfig(v *HealthCheckConfig) *ServiceChange { 6746 s.HealthCheckConfig = v 6747 return s 6748} 6749 6750// A complex type that lets you specify the namespaces that you want to list 6751// services for. 6752type ServiceFilter struct { 6753 _ struct{} `type:"structure"` 6754 6755 // The operator that you want to use to determine whether a service is returned 6756 // by ListServices. Valid values for Condition include the following: 6757 // 6758 // * EQ: When you specify EQ, specify one namespace ID for Values. EQ is 6759 // the default condition and can be omitted. 6760 // 6761 // * IN: When you specify IN, specify a list of the IDs for the namespaces 6762 // that you want ListServices to return a list of services for. 6763 // 6764 // * BETWEEN: Not applicable. 6765 Condition *string `type:"string" enum:"FilterCondition"` 6766 6767 // Specify NAMESPACE_ID. 6768 // 6769 // Name is a required field 6770 Name *string `type:"string" required:"true" enum:"ServiceFilterName"` 6771 6772 // The values that are applicable to the value that you specify for Condition 6773 // to filter the list of services. 6774 // 6775 // Values is a required field 6776 Values []*string `type:"list" required:"true"` 6777} 6778 6779// String returns the string representation 6780func (s ServiceFilter) String() string { 6781 return awsutil.Prettify(s) 6782} 6783 6784// GoString returns the string representation 6785func (s ServiceFilter) GoString() string { 6786 return s.String() 6787} 6788 6789// Validate inspects the fields of the type to determine if they are valid. 6790func (s *ServiceFilter) Validate() error { 6791 invalidParams := request.ErrInvalidParams{Context: "ServiceFilter"} 6792 if s.Name == nil { 6793 invalidParams.Add(request.NewErrParamRequired("Name")) 6794 } 6795 if s.Values == nil { 6796 invalidParams.Add(request.NewErrParamRequired("Values")) 6797 } 6798 6799 if invalidParams.Len() > 0 { 6800 return invalidParams 6801 } 6802 return nil 6803} 6804 6805// SetCondition sets the Condition field's value. 6806func (s *ServiceFilter) SetCondition(v string) *ServiceFilter { 6807 s.Condition = &v 6808 return s 6809} 6810 6811// SetName sets the Name field's value. 6812func (s *ServiceFilter) SetName(v string) *ServiceFilter { 6813 s.Name = &v 6814 return s 6815} 6816 6817// SetValues sets the Values field's value. 6818func (s *ServiceFilter) SetValues(v []*string) *ServiceFilter { 6819 s.Values = v 6820 return s 6821} 6822 6823// No service exists with the specified ID. 6824type ServiceNotFound struct { 6825 _ struct{} `type:"structure"` 6826 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6827 6828 Message_ *string `locationName:"Message" type:"string"` 6829} 6830 6831// String returns the string representation 6832func (s ServiceNotFound) String() string { 6833 return awsutil.Prettify(s) 6834} 6835 6836// GoString returns the string representation 6837func (s ServiceNotFound) GoString() string { 6838 return s.String() 6839} 6840 6841func newErrorServiceNotFound(v protocol.ResponseMetadata) error { 6842 return &ServiceNotFound{ 6843 RespMetadata: v, 6844 } 6845} 6846 6847// Code returns the exception type name. 6848func (s *ServiceNotFound) Code() string { 6849 return "ServiceNotFound" 6850} 6851 6852// Message returns the exception's message. 6853func (s *ServiceNotFound) Message() string { 6854 if s.Message_ != nil { 6855 return *s.Message_ 6856 } 6857 return "" 6858} 6859 6860// OrigErr always returns nil, satisfies awserr.Error interface. 6861func (s *ServiceNotFound) OrigErr() error { 6862 return nil 6863} 6864 6865func (s *ServiceNotFound) Error() string { 6866 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6867} 6868 6869// Status code returns the HTTP status code for the request's response error. 6870func (s *ServiceNotFound) StatusCode() int { 6871 return s.RespMetadata.StatusCode 6872} 6873 6874// RequestID returns the service's response RequestID for request. 6875func (s *ServiceNotFound) RequestID() string { 6876 return s.RespMetadata.RequestID 6877} 6878 6879// A complex type that contains information about a specified service. 6880type ServiceSummary struct { 6881 _ struct{} `type:"structure"` 6882 6883 // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the service 6884 // when you create it. 6885 Arn *string `type:"string"` 6886 6887 // The date and time that the service was created. 6888 CreateDate *time.Time `type:"timestamp"` 6889 6890 // The description that you specify when you create the service. 6891 Description *string `type:"string"` 6892 6893 // A complex type that contains information about the Amazon Route 53 DNS records 6894 // that you want AWS Cloud Map to create when you register an instance. 6895 DnsConfig *DnsConfig `type:"structure"` 6896 6897 // Public DNS and HTTP namespaces only. A complex type that contains settings 6898 // for an optional health check. If you specify settings for a health check, 6899 // AWS Cloud Map associates the health check with the records that you specify 6900 // in DnsConfig. 6901 // 6902 // If you specify a health check configuration, you can specify either HealthCheckCustomConfig 6903 // or HealthCheckConfig but not both. 6904 // 6905 // Health checks are basic Route 53 health checks that monitor an AWS endpoint. 6906 // For information about pricing for health checks, see Amazon Route 53 Pricing 6907 // (http://aws.amazon.com/route53/pricing/). 6908 // 6909 // Note the following about configuring health checks. 6910 // 6911 // A and AAAA records 6912 // 6913 // If DnsConfig includes configurations for both A and AAAA records, AWS Cloud 6914 // Map creates a health check that uses the IPv4 address to check the health 6915 // of the resource. If the endpoint that is specified by the IPv4 address is 6916 // unhealthy, Route 53 considers both the A and AAAA records to be unhealthy. 6917 // 6918 // CNAME records 6919 // 6920 // You can't specify settings for HealthCheckConfig when the DNSConfig includes 6921 // CNAME for the value of Type. If you do, the CreateService request will fail 6922 // with an InvalidInput error. 6923 // 6924 // Request interval 6925 // 6926 // A Route 53 health checker in each health-checking region sends a health check 6927 // request to an endpoint every 30 seconds. On average, your endpoint receives 6928 // a health check request about every two seconds. However, health checkers 6929 // don't coordinate with one another, so you'll sometimes see several requests 6930 // per second followed by a few seconds with no health checks at all. 6931 // 6932 // Health checking regions 6933 // 6934 // Health checkers perform checks from all Route 53 health-checking regions. 6935 // For a list of the current regions, see Regions (https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions). 6936 // 6937 // Alias records 6938 // 6939 // When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute, 6940 // AWS Cloud Map creates a Route 53 alias record. Note the following: 6941 // 6942 // * Route 53 automatically sets EvaluateTargetHealth to true for alias records. 6943 // When EvaluateTargetHealth is true, the alias record inherits the health 6944 // of the referenced AWS resource. such as an ELB load balancer. For more 6945 // information, see EvaluateTargetHealth (https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth). 6946 // 6947 // * If you include HealthCheckConfig and then use the service to register 6948 // an instance that creates an alias record, Route 53 doesn't create the 6949 // health check. 6950 // 6951 // Charges for health checks 6952 // 6953 // Health checks are basic Route 53 health checks that monitor an AWS endpoint. 6954 // For information about pricing for health checks, see Amazon Route 53 Pricing 6955 // (http://aws.amazon.com/route53/pricing/). 6956 HealthCheckConfig *HealthCheckConfig `type:"structure"` 6957 6958 // A complex type that contains information about an optional custom health 6959 // check. A custom health check, which requires that you use a third-party health 6960 // checker to evaluate the health of your resources, is useful in the following 6961 // circumstances: 6962 // 6963 // * You can't use a health check that is defined by HealthCheckConfig because 6964 // the resource isn't available over the internet. For example, you can use 6965 // a custom health check when the instance is in an Amazon VPC. (To check 6966 // the health of resources in a VPC, the health checker must also be in the 6967 // VPC.) 6968 // 6969 // * You want to use a third-party health checker regardless of where your 6970 // resources are. 6971 // 6972 // If you specify a health check configuration, you can specify either HealthCheckCustomConfig 6973 // or HealthCheckConfig but not both. 6974 // 6975 // To change the status of a custom health check, submit an UpdateInstanceCustomHealthStatus 6976 // request. AWS Cloud Map doesn't monitor the status of the resource, it just 6977 // keeps a record of the status specified in the most recent UpdateInstanceCustomHealthStatus 6978 // request. 6979 // 6980 // Here's how custom health checks work: 6981 // 6982 // You create a service and specify a value for FailureThreshold. 6983 // 6984 // The failure threshold indicates the number of 30-second intervals you want 6985 // AWS Cloud Map to wait between the time that your application sends an UpdateInstanceCustomHealthStatus 6986 // (https://docs.aws.amazon.com/cloud-map/latest/api/API_UpdateInstanceCustomHealthStatus.html) 6987 // request and the time that AWS Cloud Map stops routing internet traffic to 6988 // the corresponding resource. 6989 // 6990 // You register an instance. 6991 // 6992 // You configure a third-party health checker to monitor the resource that is 6993 // associated with the new instance. 6994 // 6995 // AWS Cloud Map doesn't check the health of the resource directly. 6996 // 6997 // The third-party health-checker determines that the resource is unhealthy 6998 // and notifies your application. 6999 // 7000 // Your application submits an UpdateInstanceCustomHealthStatus request. 7001 // 7002 // AWS Cloud Map waits for (FailureThreshold x 30) seconds. 7003 // 7004 // If another UpdateInstanceCustomHealthStatus request doesn't arrive during 7005 // that time to change the status back to healthy, AWS Cloud Map stops routing 7006 // traffic to the resource. 7007 HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"` 7008 7009 // The ID that AWS Cloud Map assigned to the service when you created it. 7010 Id *string `type:"string"` 7011 7012 // The number of instances that are currently associated with the service. Instances 7013 // that were previously associated with the service but that have been deleted 7014 // are not included in the count. The count might not reflect pending registrations 7015 // and deregistrations. 7016 InstanceCount *int64 `type:"integer"` 7017 7018 // The name of the service. 7019 Name *string `type:"string"` 7020} 7021 7022// String returns the string representation 7023func (s ServiceSummary) String() string { 7024 return awsutil.Prettify(s) 7025} 7026 7027// GoString returns the string representation 7028func (s ServiceSummary) GoString() string { 7029 return s.String() 7030} 7031 7032// SetArn sets the Arn field's value. 7033func (s *ServiceSummary) SetArn(v string) *ServiceSummary { 7034 s.Arn = &v 7035 return s 7036} 7037 7038// SetCreateDate sets the CreateDate field's value. 7039func (s *ServiceSummary) SetCreateDate(v time.Time) *ServiceSummary { 7040 s.CreateDate = &v 7041 return s 7042} 7043 7044// SetDescription sets the Description field's value. 7045func (s *ServiceSummary) SetDescription(v string) *ServiceSummary { 7046 s.Description = &v 7047 return s 7048} 7049 7050// SetDnsConfig sets the DnsConfig field's value. 7051func (s *ServiceSummary) SetDnsConfig(v *DnsConfig) *ServiceSummary { 7052 s.DnsConfig = v 7053 return s 7054} 7055 7056// SetHealthCheckConfig sets the HealthCheckConfig field's value. 7057func (s *ServiceSummary) SetHealthCheckConfig(v *HealthCheckConfig) *ServiceSummary { 7058 s.HealthCheckConfig = v 7059 return s 7060} 7061 7062// SetHealthCheckCustomConfig sets the HealthCheckCustomConfig field's value. 7063func (s *ServiceSummary) SetHealthCheckCustomConfig(v *HealthCheckCustomConfig) *ServiceSummary { 7064 s.HealthCheckCustomConfig = v 7065 return s 7066} 7067 7068// SetId sets the Id field's value. 7069func (s *ServiceSummary) SetId(v string) *ServiceSummary { 7070 s.Id = &v 7071 return s 7072} 7073 7074// SetInstanceCount sets the InstanceCount field's value. 7075func (s *ServiceSummary) SetInstanceCount(v int64) *ServiceSummary { 7076 s.InstanceCount = &v 7077 return s 7078} 7079 7080// SetName sets the Name field's value. 7081func (s *ServiceSummary) SetName(v string) *ServiceSummary { 7082 s.Name = &v 7083 return s 7084} 7085 7086// A custom key-value pair associated with a resource. 7087type Tag struct { 7088 _ struct{} `type:"structure"` 7089 7090 // The key identifier, or name, of the tag. 7091 // 7092 // Key is a required field 7093 Key *string `min:"1" type:"string" required:"true"` 7094 7095 // The string value that's associated with the key of the tag. You can set the 7096 // value of a tag to an empty string, but you can't set the value of a tag to 7097 // null. 7098 // 7099 // Value is a required field 7100 Value *string `type:"string" required:"true"` 7101} 7102 7103// String returns the string representation 7104func (s Tag) String() string { 7105 return awsutil.Prettify(s) 7106} 7107 7108// GoString returns the string representation 7109func (s Tag) GoString() string { 7110 return s.String() 7111} 7112 7113// Validate inspects the fields of the type to determine if they are valid. 7114func (s *Tag) Validate() error { 7115 invalidParams := request.ErrInvalidParams{Context: "Tag"} 7116 if s.Key == nil { 7117 invalidParams.Add(request.NewErrParamRequired("Key")) 7118 } 7119 if s.Key != nil && len(*s.Key) < 1 { 7120 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 7121 } 7122 if s.Value == nil { 7123 invalidParams.Add(request.NewErrParamRequired("Value")) 7124 } 7125 7126 if invalidParams.Len() > 0 { 7127 return invalidParams 7128 } 7129 return nil 7130} 7131 7132// SetKey sets the Key field's value. 7133func (s *Tag) SetKey(v string) *Tag { 7134 s.Key = &v 7135 return s 7136} 7137 7138// SetValue sets the Value field's value. 7139func (s *Tag) SetValue(v string) *Tag { 7140 s.Value = &v 7141 return s 7142} 7143 7144type TagResourceInput struct { 7145 _ struct{} `type:"structure"` 7146 7147 // The Amazon Resource Name (ARN) of the resource that you want to retrieve 7148 // tags for. 7149 // 7150 // ResourceARN is a required field 7151 ResourceARN *string `min:"1" type:"string" required:"true"` 7152 7153 // The tags to add to the specified resource. Specifying the tag key is required. 7154 // You can set the value of a tag to an empty string, but you can't set the 7155 // value of a tag to null. 7156 // 7157 // Tags is a required field 7158 Tags []*Tag `type:"list" required:"true"` 7159} 7160 7161// String returns the string representation 7162func (s TagResourceInput) String() string { 7163 return awsutil.Prettify(s) 7164} 7165 7166// GoString returns the string representation 7167func (s TagResourceInput) GoString() string { 7168 return s.String() 7169} 7170 7171// Validate inspects the fields of the type to determine if they are valid. 7172func (s *TagResourceInput) Validate() error { 7173 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 7174 if s.ResourceARN == nil { 7175 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 7176 } 7177 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 7178 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 7179 } 7180 if s.Tags == nil { 7181 invalidParams.Add(request.NewErrParamRequired("Tags")) 7182 } 7183 if s.Tags != nil { 7184 for i, v := range s.Tags { 7185 if v == nil { 7186 continue 7187 } 7188 if err := v.Validate(); err != nil { 7189 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 7190 } 7191 } 7192 } 7193 7194 if invalidParams.Len() > 0 { 7195 return invalidParams 7196 } 7197 return nil 7198} 7199 7200// SetResourceARN sets the ResourceARN field's value. 7201func (s *TagResourceInput) SetResourceARN(v string) *TagResourceInput { 7202 s.ResourceARN = &v 7203 return s 7204} 7205 7206// SetTags sets the Tags field's value. 7207func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { 7208 s.Tags = v 7209 return s 7210} 7211 7212type TagResourceOutput struct { 7213 _ struct{} `type:"structure"` 7214} 7215 7216// String returns the string representation 7217func (s TagResourceOutput) String() string { 7218 return awsutil.Prettify(s) 7219} 7220 7221// GoString returns the string representation 7222func (s TagResourceOutput) GoString() string { 7223 return s.String() 7224} 7225 7226// The list of tags on the resource is over the limit. The maximum number of 7227// tags that can be applied to a resource is 50. 7228type TooManyTagsException struct { 7229 _ struct{} `type:"structure"` 7230 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 7231 7232 Message_ *string `locationName:"Message" type:"string"` 7233 7234 // The name of the resource. 7235 ResourceName *string `min:"1" type:"string"` 7236} 7237 7238// String returns the string representation 7239func (s TooManyTagsException) String() string { 7240 return awsutil.Prettify(s) 7241} 7242 7243// GoString returns the string representation 7244func (s TooManyTagsException) GoString() string { 7245 return s.String() 7246} 7247 7248func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { 7249 return &TooManyTagsException{ 7250 RespMetadata: v, 7251 } 7252} 7253 7254// Code returns the exception type name. 7255func (s *TooManyTagsException) Code() string { 7256 return "TooManyTagsException" 7257} 7258 7259// Message returns the exception's message. 7260func (s *TooManyTagsException) Message() string { 7261 if s.Message_ != nil { 7262 return *s.Message_ 7263 } 7264 return "" 7265} 7266 7267// OrigErr always returns nil, satisfies awserr.Error interface. 7268func (s *TooManyTagsException) OrigErr() error { 7269 return nil 7270} 7271 7272func (s *TooManyTagsException) Error() string { 7273 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 7274} 7275 7276// Status code returns the HTTP status code for the request's response error. 7277func (s *TooManyTagsException) StatusCode() int { 7278 return s.RespMetadata.StatusCode 7279} 7280 7281// RequestID returns the service's response RequestID for request. 7282func (s *TooManyTagsException) RequestID() string { 7283 return s.RespMetadata.RequestID 7284} 7285 7286type UntagResourceInput struct { 7287 _ struct{} `type:"structure"` 7288 7289 // The Amazon Resource Name (ARN) of the resource that you want to retrieve 7290 // tags for. 7291 // 7292 // ResourceARN is a required field 7293 ResourceARN *string `min:"1" type:"string" required:"true"` 7294 7295 // The tag keys to remove from the specified resource. 7296 // 7297 // TagKeys is a required field 7298 TagKeys []*string `type:"list" required:"true"` 7299} 7300 7301// String returns the string representation 7302func (s UntagResourceInput) String() string { 7303 return awsutil.Prettify(s) 7304} 7305 7306// GoString returns the string representation 7307func (s UntagResourceInput) GoString() string { 7308 return s.String() 7309} 7310 7311// Validate inspects the fields of the type to determine if they are valid. 7312func (s *UntagResourceInput) Validate() error { 7313 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 7314 if s.ResourceARN == nil { 7315 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 7316 } 7317 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 7318 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 7319 } 7320 if s.TagKeys == nil { 7321 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 7322 } 7323 7324 if invalidParams.Len() > 0 { 7325 return invalidParams 7326 } 7327 return nil 7328} 7329 7330// SetResourceARN sets the ResourceARN field's value. 7331func (s *UntagResourceInput) SetResourceARN(v string) *UntagResourceInput { 7332 s.ResourceARN = &v 7333 return s 7334} 7335 7336// SetTagKeys sets the TagKeys field's value. 7337func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 7338 s.TagKeys = v 7339 return s 7340} 7341 7342type UntagResourceOutput struct { 7343 _ struct{} `type:"structure"` 7344} 7345 7346// String returns the string representation 7347func (s UntagResourceOutput) String() string { 7348 return awsutil.Prettify(s) 7349} 7350 7351// GoString returns the string representation 7352func (s UntagResourceOutput) GoString() string { 7353 return s.String() 7354} 7355 7356type UpdateInstanceCustomHealthStatusInput struct { 7357 _ struct{} `type:"structure"` 7358 7359 // The ID of the instance that you want to change the health status for. 7360 // 7361 // InstanceId is a required field 7362 InstanceId *string `type:"string" required:"true"` 7363 7364 // The ID of the service that includes the configuration for the custom health 7365 // check that you want to change the status for. 7366 // 7367 // ServiceId is a required field 7368 ServiceId *string `type:"string" required:"true"` 7369 7370 // The new status of the instance, HEALTHY or UNHEALTHY. 7371 // 7372 // Status is a required field 7373 Status *string `type:"string" required:"true" enum:"CustomHealthStatus"` 7374} 7375 7376// String returns the string representation 7377func (s UpdateInstanceCustomHealthStatusInput) String() string { 7378 return awsutil.Prettify(s) 7379} 7380 7381// GoString returns the string representation 7382func (s UpdateInstanceCustomHealthStatusInput) GoString() string { 7383 return s.String() 7384} 7385 7386// Validate inspects the fields of the type to determine if they are valid. 7387func (s *UpdateInstanceCustomHealthStatusInput) Validate() error { 7388 invalidParams := request.ErrInvalidParams{Context: "UpdateInstanceCustomHealthStatusInput"} 7389 if s.InstanceId == nil { 7390 invalidParams.Add(request.NewErrParamRequired("InstanceId")) 7391 } 7392 if s.ServiceId == nil { 7393 invalidParams.Add(request.NewErrParamRequired("ServiceId")) 7394 } 7395 if s.Status == nil { 7396 invalidParams.Add(request.NewErrParamRequired("Status")) 7397 } 7398 7399 if invalidParams.Len() > 0 { 7400 return invalidParams 7401 } 7402 return nil 7403} 7404 7405// SetInstanceId sets the InstanceId field's value. 7406func (s *UpdateInstanceCustomHealthStatusInput) SetInstanceId(v string) *UpdateInstanceCustomHealthStatusInput { 7407 s.InstanceId = &v 7408 return s 7409} 7410 7411// SetServiceId sets the ServiceId field's value. 7412func (s *UpdateInstanceCustomHealthStatusInput) SetServiceId(v string) *UpdateInstanceCustomHealthStatusInput { 7413 s.ServiceId = &v 7414 return s 7415} 7416 7417// SetStatus sets the Status field's value. 7418func (s *UpdateInstanceCustomHealthStatusInput) SetStatus(v string) *UpdateInstanceCustomHealthStatusInput { 7419 s.Status = &v 7420 return s 7421} 7422 7423type UpdateInstanceCustomHealthStatusOutput struct { 7424 _ struct{} `type:"structure"` 7425} 7426 7427// String returns the string representation 7428func (s UpdateInstanceCustomHealthStatusOutput) String() string { 7429 return awsutil.Prettify(s) 7430} 7431 7432// GoString returns the string representation 7433func (s UpdateInstanceCustomHealthStatusOutput) GoString() string { 7434 return s.String() 7435} 7436 7437type UpdateServiceInput struct { 7438 _ struct{} `type:"structure"` 7439 7440 // The ID of the service that you want to update. 7441 // 7442 // Id is a required field 7443 Id *string `type:"string" required:"true"` 7444 7445 // A complex type that contains the new settings for the service. 7446 // 7447 // Service is a required field 7448 Service *ServiceChange `type:"structure" required:"true"` 7449} 7450 7451// String returns the string representation 7452func (s UpdateServiceInput) String() string { 7453 return awsutil.Prettify(s) 7454} 7455 7456// GoString returns the string representation 7457func (s UpdateServiceInput) GoString() string { 7458 return s.String() 7459} 7460 7461// Validate inspects the fields of the type to determine if they are valid. 7462func (s *UpdateServiceInput) Validate() error { 7463 invalidParams := request.ErrInvalidParams{Context: "UpdateServiceInput"} 7464 if s.Id == nil { 7465 invalidParams.Add(request.NewErrParamRequired("Id")) 7466 } 7467 if s.Service == nil { 7468 invalidParams.Add(request.NewErrParamRequired("Service")) 7469 } 7470 if s.Service != nil { 7471 if err := s.Service.Validate(); err != nil { 7472 invalidParams.AddNested("Service", err.(request.ErrInvalidParams)) 7473 } 7474 } 7475 7476 if invalidParams.Len() > 0 { 7477 return invalidParams 7478 } 7479 return nil 7480} 7481 7482// SetId sets the Id field's value. 7483func (s *UpdateServiceInput) SetId(v string) *UpdateServiceInput { 7484 s.Id = &v 7485 return s 7486} 7487 7488// SetService sets the Service field's value. 7489func (s *UpdateServiceInput) SetService(v *ServiceChange) *UpdateServiceInput { 7490 s.Service = v 7491 return s 7492} 7493 7494type UpdateServiceOutput struct { 7495 _ struct{} `type:"structure"` 7496 7497 // A value that you can use to determine whether the request completed successfully. 7498 // To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html). 7499 OperationId *string `type:"string"` 7500} 7501 7502// String returns the string representation 7503func (s UpdateServiceOutput) String() string { 7504 return awsutil.Prettify(s) 7505} 7506 7507// GoString returns the string representation 7508func (s UpdateServiceOutput) GoString() string { 7509 return s.String() 7510} 7511 7512// SetOperationId sets the OperationId field's value. 7513func (s *UpdateServiceOutput) SetOperationId(v string) *UpdateServiceOutput { 7514 s.OperationId = &v 7515 return s 7516} 7517 7518const ( 7519 // CustomHealthStatusHealthy is a CustomHealthStatus enum value 7520 CustomHealthStatusHealthy = "HEALTHY" 7521 7522 // CustomHealthStatusUnhealthy is a CustomHealthStatus enum value 7523 CustomHealthStatusUnhealthy = "UNHEALTHY" 7524) 7525 7526const ( 7527 // FilterConditionEq is a FilterCondition enum value 7528 FilterConditionEq = "EQ" 7529 7530 // FilterConditionIn is a FilterCondition enum value 7531 FilterConditionIn = "IN" 7532 7533 // FilterConditionBetween is a FilterCondition enum value 7534 FilterConditionBetween = "BETWEEN" 7535) 7536 7537const ( 7538 // HealthCheckTypeHttp is a HealthCheckType enum value 7539 HealthCheckTypeHttp = "HTTP" 7540 7541 // HealthCheckTypeHttps is a HealthCheckType enum value 7542 HealthCheckTypeHttps = "HTTPS" 7543 7544 // HealthCheckTypeTcp is a HealthCheckType enum value 7545 HealthCheckTypeTcp = "TCP" 7546) 7547 7548const ( 7549 // HealthStatusHealthy is a HealthStatus enum value 7550 HealthStatusHealthy = "HEALTHY" 7551 7552 // HealthStatusUnhealthy is a HealthStatus enum value 7553 HealthStatusUnhealthy = "UNHEALTHY" 7554 7555 // HealthStatusUnknown is a HealthStatus enum value 7556 HealthStatusUnknown = "UNKNOWN" 7557) 7558 7559const ( 7560 // HealthStatusFilterHealthy is a HealthStatusFilter enum value 7561 HealthStatusFilterHealthy = "HEALTHY" 7562 7563 // HealthStatusFilterUnhealthy is a HealthStatusFilter enum value 7564 HealthStatusFilterUnhealthy = "UNHEALTHY" 7565 7566 // HealthStatusFilterAll is a HealthStatusFilter enum value 7567 HealthStatusFilterAll = "ALL" 7568) 7569 7570const ( 7571 // NamespaceFilterNameType is a NamespaceFilterName enum value 7572 NamespaceFilterNameType = "TYPE" 7573) 7574 7575const ( 7576 // NamespaceTypeDnsPublic is a NamespaceType enum value 7577 NamespaceTypeDnsPublic = "DNS_PUBLIC" 7578 7579 // NamespaceTypeDnsPrivate is a NamespaceType enum value 7580 NamespaceTypeDnsPrivate = "DNS_PRIVATE" 7581 7582 // NamespaceTypeHttp is a NamespaceType enum value 7583 NamespaceTypeHttp = "HTTP" 7584) 7585 7586const ( 7587 // OperationFilterNameNamespaceId is a OperationFilterName enum value 7588 OperationFilterNameNamespaceId = "NAMESPACE_ID" 7589 7590 // OperationFilterNameServiceId is a OperationFilterName enum value 7591 OperationFilterNameServiceId = "SERVICE_ID" 7592 7593 // OperationFilterNameStatus is a OperationFilterName enum value 7594 OperationFilterNameStatus = "STATUS" 7595 7596 // OperationFilterNameType is a OperationFilterName enum value 7597 OperationFilterNameType = "TYPE" 7598 7599 // OperationFilterNameUpdateDate is a OperationFilterName enum value 7600 OperationFilterNameUpdateDate = "UPDATE_DATE" 7601) 7602 7603const ( 7604 // OperationStatusSubmitted is a OperationStatus enum value 7605 OperationStatusSubmitted = "SUBMITTED" 7606 7607 // OperationStatusPending is a OperationStatus enum value 7608 OperationStatusPending = "PENDING" 7609 7610 // OperationStatusSuccess is a OperationStatus enum value 7611 OperationStatusSuccess = "SUCCESS" 7612 7613 // OperationStatusFail is a OperationStatus enum value 7614 OperationStatusFail = "FAIL" 7615) 7616 7617const ( 7618 // OperationTargetTypeNamespace is a OperationTargetType enum value 7619 OperationTargetTypeNamespace = "NAMESPACE" 7620 7621 // OperationTargetTypeService is a OperationTargetType enum value 7622 OperationTargetTypeService = "SERVICE" 7623 7624 // OperationTargetTypeInstance is a OperationTargetType enum value 7625 OperationTargetTypeInstance = "INSTANCE" 7626) 7627 7628const ( 7629 // OperationTypeCreateNamespace is a OperationType enum value 7630 OperationTypeCreateNamespace = "CREATE_NAMESPACE" 7631 7632 // OperationTypeDeleteNamespace is a OperationType enum value 7633 OperationTypeDeleteNamespace = "DELETE_NAMESPACE" 7634 7635 // OperationTypeUpdateService is a OperationType enum value 7636 OperationTypeUpdateService = "UPDATE_SERVICE" 7637 7638 // OperationTypeRegisterInstance is a OperationType enum value 7639 OperationTypeRegisterInstance = "REGISTER_INSTANCE" 7640 7641 // OperationTypeDeregisterInstance is a OperationType enum value 7642 OperationTypeDeregisterInstance = "DEREGISTER_INSTANCE" 7643) 7644 7645const ( 7646 // RecordTypeSrv is a RecordType enum value 7647 RecordTypeSrv = "SRV" 7648 7649 // RecordTypeA is a RecordType enum value 7650 RecordTypeA = "A" 7651 7652 // RecordTypeAaaa is a RecordType enum value 7653 RecordTypeAaaa = "AAAA" 7654 7655 // RecordTypeCname is a RecordType enum value 7656 RecordTypeCname = "CNAME" 7657) 7658 7659const ( 7660 // RoutingPolicyMultivalue is a RoutingPolicy enum value 7661 RoutingPolicyMultivalue = "MULTIVALUE" 7662 7663 // RoutingPolicyWeighted is a RoutingPolicy enum value 7664 RoutingPolicyWeighted = "WEIGHTED" 7665) 7666 7667const ( 7668 // ServiceFilterNameNamespaceId is a ServiceFilterName enum value 7669 ServiceFilterNameNamespaceId = "NAMESPACE_ID" 7670) 7671