github.com/aavshr/aws-sdk-go@v1.41.3/service/sns/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package sns 4 5 import ( 6 "fmt" 7 "time" 8 9 "github.com/aavshr/aws-sdk-go/aws" 10 "github.com/aavshr/aws-sdk-go/aws/awsutil" 11 "github.com/aavshr/aws-sdk-go/aws/request" 12 "github.com/aavshr/aws-sdk-go/private/protocol" 13 "github.com/aavshr/aws-sdk-go/private/protocol/query" 14 ) 15 16 const opAddPermission = "AddPermission" 17 18 // AddPermissionRequest generates a "aws/request.Request" representing the 19 // client's request for the AddPermission 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 AddPermission for more information on using the AddPermission 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 AddPermissionRequest method. 34 // req, resp := client.AddPermissionRequest(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/sns-2010-03-31/AddPermission 42 func (c *SNS) AddPermissionRequest(input *AddPermissionInput) (req *request.Request, output *AddPermissionOutput) { 43 op := &request.Operation{ 44 Name: opAddPermission, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &AddPermissionInput{} 51 } 52 53 output = &AddPermissionOutput{} 54 req = c.newRequest(op, input, output) 55 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 56 return 57 } 58 59 // AddPermission API operation for Amazon Simple Notification Service. 60 // 61 // Adds a statement to a topic's access control policy, granting access for 62 // the specified accounts to the specified actions. 63 // 64 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 65 // with awserr.Error's Code and Message methods to get detailed information about 66 // the error. 67 // 68 // See the AWS API reference guide for Amazon Simple Notification Service's 69 // API operation AddPermission for usage and error information. 70 // 71 // Returned Error Codes: 72 // * ErrCodeInvalidParameterException "InvalidParameter" 73 // Indicates that a request parameter does not comply with the associated constraints. 74 // 75 // * ErrCodeInternalErrorException "InternalError" 76 // Indicates an internal service error. 77 // 78 // * ErrCodeAuthorizationErrorException "AuthorizationError" 79 // Indicates that the user has been denied access to the requested resource. 80 // 81 // * ErrCodeNotFoundException "NotFound" 82 // Indicates that the requested resource does not exist. 83 // 84 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/AddPermission 85 func (c *SNS) AddPermission(input *AddPermissionInput) (*AddPermissionOutput, error) { 86 req, out := c.AddPermissionRequest(input) 87 return out, req.Send() 88 } 89 90 // AddPermissionWithContext is the same as AddPermission with the addition of 91 // the ability to pass a context and additional request options. 92 // 93 // See AddPermission for details on how to use this API operation. 94 // 95 // The context must be non-nil and will be used for request cancellation. If 96 // the context is nil a panic will occur. In the future the SDK may create 97 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 98 // for more information on using Contexts. 99 func (c *SNS) AddPermissionWithContext(ctx aws.Context, input *AddPermissionInput, opts ...request.Option) (*AddPermissionOutput, error) { 100 req, out := c.AddPermissionRequest(input) 101 req.SetContext(ctx) 102 req.ApplyOptions(opts...) 103 return out, req.Send() 104 } 105 106 const opCheckIfPhoneNumberIsOptedOut = "CheckIfPhoneNumberIsOptedOut" 107 108 // CheckIfPhoneNumberIsOptedOutRequest generates a "aws/request.Request" representing the 109 // client's request for the CheckIfPhoneNumberIsOptedOut operation. The "output" return 110 // value will be populated with the request's response once the request completes 111 // successfully. 112 // 113 // Use "Send" method on the returned Request to send the API call to the service. 114 // the "output" return value is not valid until after Send returns without error. 115 // 116 // See CheckIfPhoneNumberIsOptedOut for more information on using the CheckIfPhoneNumberIsOptedOut 117 // API call, and error handling. 118 // 119 // This method is useful when you want to inject custom logic or configuration 120 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 121 // 122 // 123 // // Example sending a request using the CheckIfPhoneNumberIsOptedOutRequest method. 124 // req, resp := client.CheckIfPhoneNumberIsOptedOutRequest(params) 125 // 126 // err := req.Send() 127 // if err == nil { // resp is now filled 128 // fmt.Println(resp) 129 // } 130 // 131 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CheckIfPhoneNumberIsOptedOut 132 func (c *SNS) CheckIfPhoneNumberIsOptedOutRequest(input *CheckIfPhoneNumberIsOptedOutInput) (req *request.Request, output *CheckIfPhoneNumberIsOptedOutOutput) { 133 op := &request.Operation{ 134 Name: opCheckIfPhoneNumberIsOptedOut, 135 HTTPMethod: "POST", 136 HTTPPath: "/", 137 } 138 139 if input == nil { 140 input = &CheckIfPhoneNumberIsOptedOutInput{} 141 } 142 143 output = &CheckIfPhoneNumberIsOptedOutOutput{} 144 req = c.newRequest(op, input, output) 145 return 146 } 147 148 // CheckIfPhoneNumberIsOptedOut API operation for Amazon Simple Notification Service. 149 // 150 // Accepts a phone number and indicates whether the phone holder has opted out 151 // of receiving SMS messages from your account. You cannot send SMS messages 152 // to a number that is opted out. 153 // 154 // To resume sending messages, you can opt in the number by using the OptInPhoneNumber 155 // action. 156 // 157 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 158 // with awserr.Error's Code and Message methods to get detailed information about 159 // the error. 160 // 161 // See the AWS API reference guide for Amazon Simple Notification Service's 162 // API operation CheckIfPhoneNumberIsOptedOut for usage and error information. 163 // 164 // Returned Error Codes: 165 // * ErrCodeThrottledException "Throttled" 166 // Indicates that the rate at which requests have been submitted for this action 167 // exceeds the limit for your account. 168 // 169 // * ErrCodeInternalErrorException "InternalError" 170 // Indicates an internal service error. 171 // 172 // * ErrCodeAuthorizationErrorException "AuthorizationError" 173 // Indicates that the user has been denied access to the requested resource. 174 // 175 // * ErrCodeInvalidParameterException "InvalidParameter" 176 // Indicates that a request parameter does not comply with the associated constraints. 177 // 178 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CheckIfPhoneNumberIsOptedOut 179 func (c *SNS) CheckIfPhoneNumberIsOptedOut(input *CheckIfPhoneNumberIsOptedOutInput) (*CheckIfPhoneNumberIsOptedOutOutput, error) { 180 req, out := c.CheckIfPhoneNumberIsOptedOutRequest(input) 181 return out, req.Send() 182 } 183 184 // CheckIfPhoneNumberIsOptedOutWithContext is the same as CheckIfPhoneNumberIsOptedOut with the addition of 185 // the ability to pass a context and additional request options. 186 // 187 // See CheckIfPhoneNumberIsOptedOut for details on how to use this API operation. 188 // 189 // The context must be non-nil and will be used for request cancellation. If 190 // the context is nil a panic will occur. In the future the SDK may create 191 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 192 // for more information on using Contexts. 193 func (c *SNS) CheckIfPhoneNumberIsOptedOutWithContext(ctx aws.Context, input *CheckIfPhoneNumberIsOptedOutInput, opts ...request.Option) (*CheckIfPhoneNumberIsOptedOutOutput, error) { 194 req, out := c.CheckIfPhoneNumberIsOptedOutRequest(input) 195 req.SetContext(ctx) 196 req.ApplyOptions(opts...) 197 return out, req.Send() 198 } 199 200 const opConfirmSubscription = "ConfirmSubscription" 201 202 // ConfirmSubscriptionRequest generates a "aws/request.Request" representing the 203 // client's request for the ConfirmSubscription operation. The "output" return 204 // value will be populated with the request's response once the request completes 205 // successfully. 206 // 207 // Use "Send" method on the returned Request to send the API call to the service. 208 // the "output" return value is not valid until after Send returns without error. 209 // 210 // See ConfirmSubscription for more information on using the ConfirmSubscription 211 // API call, and error handling. 212 // 213 // This method is useful when you want to inject custom logic or configuration 214 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 215 // 216 // 217 // // Example sending a request using the ConfirmSubscriptionRequest method. 218 // req, resp := client.ConfirmSubscriptionRequest(params) 219 // 220 // err := req.Send() 221 // if err == nil { // resp is now filled 222 // fmt.Println(resp) 223 // } 224 // 225 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ConfirmSubscription 226 func (c *SNS) ConfirmSubscriptionRequest(input *ConfirmSubscriptionInput) (req *request.Request, output *ConfirmSubscriptionOutput) { 227 op := &request.Operation{ 228 Name: opConfirmSubscription, 229 HTTPMethod: "POST", 230 HTTPPath: "/", 231 } 232 233 if input == nil { 234 input = &ConfirmSubscriptionInput{} 235 } 236 237 output = &ConfirmSubscriptionOutput{} 238 req = c.newRequest(op, input, output) 239 return 240 } 241 242 // ConfirmSubscription API operation for Amazon Simple Notification Service. 243 // 244 // Verifies an endpoint owner's intent to receive messages by validating the 245 // token sent to the endpoint by an earlier Subscribe action. If the token is 246 // valid, the action creates a new subscription and returns its Amazon Resource 247 // Name (ARN). This call requires an AWS signature only when the AuthenticateOnUnsubscribe 248 // flag is set to "true". 249 // 250 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 251 // with awserr.Error's Code and Message methods to get detailed information about 252 // the error. 253 // 254 // See the AWS API reference guide for Amazon Simple Notification Service's 255 // API operation ConfirmSubscription for usage and error information. 256 // 257 // Returned Error Codes: 258 // * ErrCodeSubscriptionLimitExceededException "SubscriptionLimitExceeded" 259 // Indicates that the customer already owns the maximum allowed number of subscriptions. 260 // 261 // * ErrCodeInvalidParameterException "InvalidParameter" 262 // Indicates that a request parameter does not comply with the associated constraints. 263 // 264 // * ErrCodeNotFoundException "NotFound" 265 // Indicates that the requested resource does not exist. 266 // 267 // * ErrCodeInternalErrorException "InternalError" 268 // Indicates an internal service error. 269 // 270 // * ErrCodeAuthorizationErrorException "AuthorizationError" 271 // Indicates that the user has been denied access to the requested resource. 272 // 273 // * ErrCodeFilterPolicyLimitExceededException "FilterPolicyLimitExceeded" 274 // Indicates that the number of filter polices in your account exceeds the limit. 275 // To add more filter polices, submit an SNS Limit Increase case in the Amazon 276 // Web Services Support Center. 277 // 278 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ConfirmSubscription 279 func (c *SNS) ConfirmSubscription(input *ConfirmSubscriptionInput) (*ConfirmSubscriptionOutput, error) { 280 req, out := c.ConfirmSubscriptionRequest(input) 281 return out, req.Send() 282 } 283 284 // ConfirmSubscriptionWithContext is the same as ConfirmSubscription with the addition of 285 // the ability to pass a context and additional request options. 286 // 287 // See ConfirmSubscription for details on how to use this API operation. 288 // 289 // The context must be non-nil and will be used for request cancellation. If 290 // the context is nil a panic will occur. In the future the SDK may create 291 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 292 // for more information on using Contexts. 293 func (c *SNS) ConfirmSubscriptionWithContext(ctx aws.Context, input *ConfirmSubscriptionInput, opts ...request.Option) (*ConfirmSubscriptionOutput, error) { 294 req, out := c.ConfirmSubscriptionRequest(input) 295 req.SetContext(ctx) 296 req.ApplyOptions(opts...) 297 return out, req.Send() 298 } 299 300 const opCreatePlatformApplication = "CreatePlatformApplication" 301 302 // CreatePlatformApplicationRequest generates a "aws/request.Request" representing the 303 // client's request for the CreatePlatformApplication operation. The "output" return 304 // value will be populated with the request's response once the request completes 305 // successfully. 306 // 307 // Use "Send" method on the returned Request to send the API call to the service. 308 // the "output" return value is not valid until after Send returns without error. 309 // 310 // See CreatePlatformApplication for more information on using the CreatePlatformApplication 311 // API call, and error handling. 312 // 313 // This method is useful when you want to inject custom logic or configuration 314 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 315 // 316 // 317 // // Example sending a request using the CreatePlatformApplicationRequest method. 318 // req, resp := client.CreatePlatformApplicationRequest(params) 319 // 320 // err := req.Send() 321 // if err == nil { // resp is now filled 322 // fmt.Println(resp) 323 // } 324 // 325 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreatePlatformApplication 326 func (c *SNS) CreatePlatformApplicationRequest(input *CreatePlatformApplicationInput) (req *request.Request, output *CreatePlatformApplicationOutput) { 327 op := &request.Operation{ 328 Name: opCreatePlatformApplication, 329 HTTPMethod: "POST", 330 HTTPPath: "/", 331 } 332 333 if input == nil { 334 input = &CreatePlatformApplicationInput{} 335 } 336 337 output = &CreatePlatformApplicationOutput{} 338 req = c.newRequest(op, input, output) 339 return 340 } 341 342 // CreatePlatformApplication API operation for Amazon Simple Notification Service. 343 // 344 // Creates a platform application object for one of the supported push notification 345 // services, such as APNS and GCM (Firebase Cloud Messaging), to which devices 346 // and mobile apps may register. You must specify PlatformPrincipal and PlatformCredential 347 // attributes when using the CreatePlatformApplication action. 348 // 349 // PlatformPrincipal and PlatformCredential are received from the notification 350 // service. 351 // 352 // * For ADM, PlatformPrincipal is client id and PlatformCredential is client 353 // secret. 354 // 355 // * For Baidu, PlatformPrincipal is API key and PlatformCredential is secret 356 // key. 357 // 358 // * For APNS and APNS_SANDBOX, PlatformPrincipal is SSL certificate and 359 // PlatformCredential is private key. 360 // 361 // * For GCM (Firebase Cloud Messaging), there is no PlatformPrincipal and 362 // the PlatformCredential is API key. 363 // 364 // * For MPNS, PlatformPrincipal is TLS certificate and PlatformCredential 365 // is private key. 366 // 367 // * For WNS, PlatformPrincipal is Package Security Identifier and PlatformCredential 368 // is secret key. 369 // 370 // You can use the returned PlatformApplicationArn as an attribute for the CreatePlatformEndpoint 371 // action. 372 // 373 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 374 // with awserr.Error's Code and Message methods to get detailed information about 375 // the error. 376 // 377 // See the AWS API reference guide for Amazon Simple Notification Service's 378 // API operation CreatePlatformApplication for usage and error information. 379 // 380 // Returned Error Codes: 381 // * ErrCodeInvalidParameterException "InvalidParameter" 382 // Indicates that a request parameter does not comply with the associated constraints. 383 // 384 // * ErrCodeInternalErrorException "InternalError" 385 // Indicates an internal service error. 386 // 387 // * ErrCodeAuthorizationErrorException "AuthorizationError" 388 // Indicates that the user has been denied access to the requested resource. 389 // 390 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreatePlatformApplication 391 func (c *SNS) CreatePlatformApplication(input *CreatePlatformApplicationInput) (*CreatePlatformApplicationOutput, error) { 392 req, out := c.CreatePlatformApplicationRequest(input) 393 return out, req.Send() 394 } 395 396 // CreatePlatformApplicationWithContext is the same as CreatePlatformApplication with the addition of 397 // the ability to pass a context and additional request options. 398 // 399 // See CreatePlatformApplication for details on how to use this API operation. 400 // 401 // The context must be non-nil and will be used for request cancellation. If 402 // the context is nil a panic will occur. In the future the SDK may create 403 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 404 // for more information on using Contexts. 405 func (c *SNS) CreatePlatformApplicationWithContext(ctx aws.Context, input *CreatePlatformApplicationInput, opts ...request.Option) (*CreatePlatformApplicationOutput, error) { 406 req, out := c.CreatePlatformApplicationRequest(input) 407 req.SetContext(ctx) 408 req.ApplyOptions(opts...) 409 return out, req.Send() 410 } 411 412 const opCreatePlatformEndpoint = "CreatePlatformEndpoint" 413 414 // CreatePlatformEndpointRequest generates a "aws/request.Request" representing the 415 // client's request for the CreatePlatformEndpoint operation. The "output" return 416 // value will be populated with the request's response once the request completes 417 // successfully. 418 // 419 // Use "Send" method on the returned Request to send the API call to the service. 420 // the "output" return value is not valid until after Send returns without error. 421 // 422 // See CreatePlatformEndpoint for more information on using the CreatePlatformEndpoint 423 // API call, and error handling. 424 // 425 // This method is useful when you want to inject custom logic or configuration 426 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 427 // 428 // 429 // // Example sending a request using the CreatePlatformEndpointRequest method. 430 // req, resp := client.CreatePlatformEndpointRequest(params) 431 // 432 // err := req.Send() 433 // if err == nil { // resp is now filled 434 // fmt.Println(resp) 435 // } 436 // 437 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreatePlatformEndpoint 438 func (c *SNS) CreatePlatformEndpointRequest(input *CreatePlatformEndpointInput) (req *request.Request, output *CreatePlatformEndpointOutput) { 439 op := &request.Operation{ 440 Name: opCreatePlatformEndpoint, 441 HTTPMethod: "POST", 442 HTTPPath: "/", 443 } 444 445 if input == nil { 446 input = &CreatePlatformEndpointInput{} 447 } 448 449 output = &CreatePlatformEndpointOutput{} 450 req = c.newRequest(op, input, output) 451 return 452 } 453 454 // CreatePlatformEndpoint API operation for Amazon Simple Notification Service. 455 // 456 // Creates an endpoint for a device and mobile app on one of the supported push 457 // notification services, such as GCM (Firebase Cloud Messaging) and APNS. CreatePlatformEndpoint 458 // requires the PlatformApplicationArn that is returned from CreatePlatformApplication. 459 // You can use the returned EndpointArn to send a message to a mobile app or 460 // by the Subscribe action for subscription to a topic. The CreatePlatformEndpoint 461 // action is idempotent, so if the requester already owns an endpoint with the 462 // same device token and attributes, that endpoint's ARN is returned without 463 // creating a new endpoint. For more information, see Using Amazon SNS Mobile 464 // Push Notifications (https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). 465 // 466 // When using CreatePlatformEndpoint with Baidu, two attributes must be provided: 467 // ChannelId and UserId. The token field must also contain the ChannelId. For 468 // more information, see Creating an Amazon SNS Endpoint for Baidu (https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePushBaiduEndpoint.html). 469 // 470 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 471 // with awserr.Error's Code and Message methods to get detailed information about 472 // the error. 473 // 474 // See the AWS API reference guide for Amazon Simple Notification Service's 475 // API operation CreatePlatformEndpoint for usage and error information. 476 // 477 // Returned Error Codes: 478 // * ErrCodeInvalidParameterException "InvalidParameter" 479 // Indicates that a request parameter does not comply with the associated constraints. 480 // 481 // * ErrCodeInternalErrorException "InternalError" 482 // Indicates an internal service error. 483 // 484 // * ErrCodeAuthorizationErrorException "AuthorizationError" 485 // Indicates that the user has been denied access to the requested resource. 486 // 487 // * ErrCodeNotFoundException "NotFound" 488 // Indicates that the requested resource does not exist. 489 // 490 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreatePlatformEndpoint 491 func (c *SNS) CreatePlatformEndpoint(input *CreatePlatformEndpointInput) (*CreatePlatformEndpointOutput, error) { 492 req, out := c.CreatePlatformEndpointRequest(input) 493 return out, req.Send() 494 } 495 496 // CreatePlatformEndpointWithContext is the same as CreatePlatformEndpoint with the addition of 497 // the ability to pass a context and additional request options. 498 // 499 // See CreatePlatformEndpoint for details on how to use this API operation. 500 // 501 // The context must be non-nil and will be used for request cancellation. If 502 // the context is nil a panic will occur. In the future the SDK may create 503 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 504 // for more information on using Contexts. 505 func (c *SNS) CreatePlatformEndpointWithContext(ctx aws.Context, input *CreatePlatformEndpointInput, opts ...request.Option) (*CreatePlatformEndpointOutput, error) { 506 req, out := c.CreatePlatformEndpointRequest(input) 507 req.SetContext(ctx) 508 req.ApplyOptions(opts...) 509 return out, req.Send() 510 } 511 512 const opCreateSMSSandboxPhoneNumber = "CreateSMSSandboxPhoneNumber" 513 514 // CreateSMSSandboxPhoneNumberRequest generates a "aws/request.Request" representing the 515 // client's request for the CreateSMSSandboxPhoneNumber operation. The "output" return 516 // value will be populated with the request's response once the request completes 517 // successfully. 518 // 519 // Use "Send" method on the returned Request to send the API call to the service. 520 // the "output" return value is not valid until after Send returns without error. 521 // 522 // See CreateSMSSandboxPhoneNumber for more information on using the CreateSMSSandboxPhoneNumber 523 // API call, and error handling. 524 // 525 // This method is useful when you want to inject custom logic or configuration 526 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 527 // 528 // 529 // // Example sending a request using the CreateSMSSandboxPhoneNumberRequest method. 530 // req, resp := client.CreateSMSSandboxPhoneNumberRequest(params) 531 // 532 // err := req.Send() 533 // if err == nil { // resp is now filled 534 // fmt.Println(resp) 535 // } 536 // 537 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreateSMSSandboxPhoneNumber 538 func (c *SNS) CreateSMSSandboxPhoneNumberRequest(input *CreateSMSSandboxPhoneNumberInput) (req *request.Request, output *CreateSMSSandboxPhoneNumberOutput) { 539 op := &request.Operation{ 540 Name: opCreateSMSSandboxPhoneNumber, 541 HTTPMethod: "POST", 542 HTTPPath: "/", 543 } 544 545 if input == nil { 546 input = &CreateSMSSandboxPhoneNumberInput{} 547 } 548 549 output = &CreateSMSSandboxPhoneNumberOutput{} 550 req = c.newRequest(op, input, output) 551 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 552 return 553 } 554 555 // CreateSMSSandboxPhoneNumber API operation for Amazon Simple Notification Service. 556 // 557 // Adds a destination phone number to an account in the SMS sandbox and sends 558 // a one-time password (OTP) to that phone number. 559 // 560 // When you start using Amazon SNS to send SMS messages, your account is in 561 // the SMS sandbox. The SMS sandbox provides a safe environment for you to try 562 // Amazon SNS features without risking your reputation as an SMS sender. While 563 // your account is in the SMS sandbox, you can use all of the features of Amazon 564 // SNS. However, you can send SMS messages only to verified destination phone 565 // numbers. For more information, including how to move out of the sandbox to 566 // send messages without restrictions, see SMS sandbox (https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html) 567 // in the Amazon SNS Developer Guide. 568 // 569 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 570 // with awserr.Error's Code and Message methods to get detailed information about 571 // the error. 572 // 573 // See the AWS API reference guide for Amazon Simple Notification Service's 574 // API operation CreateSMSSandboxPhoneNumber for usage and error information. 575 // 576 // Returned Error Codes: 577 // * ErrCodeAuthorizationErrorException "AuthorizationError" 578 // Indicates that the user has been denied access to the requested resource. 579 // 580 // * ErrCodeInternalErrorException "InternalError" 581 // Indicates an internal service error. 582 // 583 // * ErrCodeInvalidParameterException "InvalidParameter" 584 // Indicates that a request parameter does not comply with the associated constraints. 585 // 586 // * ErrCodeOptedOutException "OptedOut" 587 // Indicates that the specified phone number opted out of receiving SMS messages 588 // from your account. You can't send SMS messages to phone numbers that opt 589 // out. 590 // 591 // * ErrCodeUserErrorException "UserError" 592 // Indicates that a request parameter does not comply with the associated constraints. 593 // 594 // * ErrCodeThrottledException "Throttled" 595 // Indicates that the rate at which requests have been submitted for this action 596 // exceeds the limit for your account. 597 // 598 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreateSMSSandboxPhoneNumber 599 func (c *SNS) CreateSMSSandboxPhoneNumber(input *CreateSMSSandboxPhoneNumberInput) (*CreateSMSSandboxPhoneNumberOutput, error) { 600 req, out := c.CreateSMSSandboxPhoneNumberRequest(input) 601 return out, req.Send() 602 } 603 604 // CreateSMSSandboxPhoneNumberWithContext is the same as CreateSMSSandboxPhoneNumber with the addition of 605 // the ability to pass a context and additional request options. 606 // 607 // See CreateSMSSandboxPhoneNumber for details on how to use this API operation. 608 // 609 // The context must be non-nil and will be used for request cancellation. If 610 // the context is nil a panic will occur. In the future the SDK may create 611 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 612 // for more information on using Contexts. 613 func (c *SNS) CreateSMSSandboxPhoneNumberWithContext(ctx aws.Context, input *CreateSMSSandboxPhoneNumberInput, opts ...request.Option) (*CreateSMSSandboxPhoneNumberOutput, error) { 614 req, out := c.CreateSMSSandboxPhoneNumberRequest(input) 615 req.SetContext(ctx) 616 req.ApplyOptions(opts...) 617 return out, req.Send() 618 } 619 620 const opCreateTopic = "CreateTopic" 621 622 // CreateTopicRequest generates a "aws/request.Request" representing the 623 // client's request for the CreateTopic operation. The "output" return 624 // value will be populated with the request's response once the request completes 625 // successfully. 626 // 627 // Use "Send" method on the returned Request to send the API call to the service. 628 // the "output" return value is not valid until after Send returns without error. 629 // 630 // See CreateTopic for more information on using the CreateTopic 631 // API call, and error handling. 632 // 633 // This method is useful when you want to inject custom logic or configuration 634 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 635 // 636 // 637 // // Example sending a request using the CreateTopicRequest method. 638 // req, resp := client.CreateTopicRequest(params) 639 // 640 // err := req.Send() 641 // if err == nil { // resp is now filled 642 // fmt.Println(resp) 643 // } 644 // 645 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreateTopic 646 func (c *SNS) CreateTopicRequest(input *CreateTopicInput) (req *request.Request, output *CreateTopicOutput) { 647 op := &request.Operation{ 648 Name: opCreateTopic, 649 HTTPMethod: "POST", 650 HTTPPath: "/", 651 } 652 653 if input == nil { 654 input = &CreateTopicInput{} 655 } 656 657 output = &CreateTopicOutput{} 658 req = c.newRequest(op, input, output) 659 return 660 } 661 662 // CreateTopic API operation for Amazon Simple Notification Service. 663 // 664 // Creates a topic to which notifications can be published. Users can create 665 // at most 100,000 standard topics (at most 1,000 FIFO topics). For more information, 666 // see Creating an Amazon SNS topic (https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html) 667 // in the Amazon SNS Developer Guide. This action is idempotent, so if the requester 668 // already owns a topic with the specified name, that topic's ARN is returned 669 // without creating a new topic. 670 // 671 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 672 // with awserr.Error's Code and Message methods to get detailed information about 673 // the error. 674 // 675 // See the AWS API reference guide for Amazon Simple Notification Service's 676 // API operation CreateTopic for usage and error information. 677 // 678 // Returned Error Codes: 679 // * ErrCodeInvalidParameterException "InvalidParameter" 680 // Indicates that a request parameter does not comply with the associated constraints. 681 // 682 // * ErrCodeTopicLimitExceededException "TopicLimitExceeded" 683 // Indicates that the customer already owns the maximum allowed number of topics. 684 // 685 // * ErrCodeInternalErrorException "InternalError" 686 // Indicates an internal service error. 687 // 688 // * ErrCodeAuthorizationErrorException "AuthorizationError" 689 // Indicates that the user has been denied access to the requested resource. 690 // 691 // * ErrCodeInvalidSecurityException "InvalidSecurity" 692 // The credential signature isn't valid. You must use an HTTPS endpoint and 693 // sign your request using Signature Version 4. 694 // 695 // * ErrCodeTagLimitExceededException "TagLimitExceeded" 696 // Can't add more than 50 tags to a topic. 697 // 698 // * ErrCodeStaleTagException "StaleTag" 699 // A tag has been added to a resource with the same ARN as a deleted resource. 700 // Wait a short while and then retry the operation. 701 // 702 // * ErrCodeTagPolicyException "TagPolicy" 703 // The request doesn't comply with the IAM tag policy. Correct your request 704 // and then retry it. 705 // 706 // * ErrCodeConcurrentAccessException "ConcurrentAccess" 707 // Can't perform multiple operations on a tag simultaneously. Perform the operations 708 // sequentially. 709 // 710 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreateTopic 711 func (c *SNS) CreateTopic(input *CreateTopicInput) (*CreateTopicOutput, error) { 712 req, out := c.CreateTopicRequest(input) 713 return out, req.Send() 714 } 715 716 // CreateTopicWithContext is the same as CreateTopic with the addition of 717 // the ability to pass a context and additional request options. 718 // 719 // See CreateTopic for details on how to use this API operation. 720 // 721 // The context must be non-nil and will be used for request cancellation. If 722 // the context is nil a panic will occur. In the future the SDK may create 723 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 724 // for more information on using Contexts. 725 func (c *SNS) CreateTopicWithContext(ctx aws.Context, input *CreateTopicInput, opts ...request.Option) (*CreateTopicOutput, error) { 726 req, out := c.CreateTopicRequest(input) 727 req.SetContext(ctx) 728 req.ApplyOptions(opts...) 729 return out, req.Send() 730 } 731 732 const opDeleteEndpoint = "DeleteEndpoint" 733 734 // DeleteEndpointRequest generates a "aws/request.Request" representing the 735 // client's request for the DeleteEndpoint operation. The "output" return 736 // value will be populated with the request's response once the request completes 737 // successfully. 738 // 739 // Use "Send" method on the returned Request to send the API call to the service. 740 // the "output" return value is not valid until after Send returns without error. 741 // 742 // See DeleteEndpoint for more information on using the DeleteEndpoint 743 // API call, and error handling. 744 // 745 // This method is useful when you want to inject custom logic or configuration 746 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 747 // 748 // 749 // // Example sending a request using the DeleteEndpointRequest method. 750 // req, resp := client.DeleteEndpointRequest(params) 751 // 752 // err := req.Send() 753 // if err == nil { // resp is now filled 754 // fmt.Println(resp) 755 // } 756 // 757 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/DeleteEndpoint 758 func (c *SNS) DeleteEndpointRequest(input *DeleteEndpointInput) (req *request.Request, output *DeleteEndpointOutput) { 759 op := &request.Operation{ 760 Name: opDeleteEndpoint, 761 HTTPMethod: "POST", 762 HTTPPath: "/", 763 } 764 765 if input == nil { 766 input = &DeleteEndpointInput{} 767 } 768 769 output = &DeleteEndpointOutput{} 770 req = c.newRequest(op, input, output) 771 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 772 return 773 } 774 775 // DeleteEndpoint API operation for Amazon Simple Notification Service. 776 // 777 // Deletes the endpoint for a device and mobile app from Amazon SNS. This action 778 // is idempotent. For more information, see Using Amazon SNS Mobile Push Notifications 779 // (https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). 780 // 781 // When you delete an endpoint that is also subscribed to a topic, then you 782 // must also unsubscribe the endpoint from the topic. 783 // 784 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 785 // with awserr.Error's Code and Message methods to get detailed information about 786 // the error. 787 // 788 // See the AWS API reference guide for Amazon Simple Notification Service's 789 // API operation DeleteEndpoint for usage and error information. 790 // 791 // Returned Error Codes: 792 // * ErrCodeInvalidParameterException "InvalidParameter" 793 // Indicates that a request parameter does not comply with the associated constraints. 794 // 795 // * ErrCodeInternalErrorException "InternalError" 796 // Indicates an internal service error. 797 // 798 // * ErrCodeAuthorizationErrorException "AuthorizationError" 799 // Indicates that the user has been denied access to the requested resource. 800 // 801 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/DeleteEndpoint 802 func (c *SNS) DeleteEndpoint(input *DeleteEndpointInput) (*DeleteEndpointOutput, error) { 803 req, out := c.DeleteEndpointRequest(input) 804 return out, req.Send() 805 } 806 807 // DeleteEndpointWithContext is the same as DeleteEndpoint with the addition of 808 // the ability to pass a context and additional request options. 809 // 810 // See DeleteEndpoint for details on how to use this API operation. 811 // 812 // The context must be non-nil and will be used for request cancellation. If 813 // the context is nil a panic will occur. In the future the SDK may create 814 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 815 // for more information on using Contexts. 816 func (c *SNS) DeleteEndpointWithContext(ctx aws.Context, input *DeleteEndpointInput, opts ...request.Option) (*DeleteEndpointOutput, error) { 817 req, out := c.DeleteEndpointRequest(input) 818 req.SetContext(ctx) 819 req.ApplyOptions(opts...) 820 return out, req.Send() 821 } 822 823 const opDeletePlatformApplication = "DeletePlatformApplication" 824 825 // DeletePlatformApplicationRequest generates a "aws/request.Request" representing the 826 // client's request for the DeletePlatformApplication operation. The "output" return 827 // value will be populated with the request's response once the request completes 828 // successfully. 829 // 830 // Use "Send" method on the returned Request to send the API call to the service. 831 // the "output" return value is not valid until after Send returns without error. 832 // 833 // See DeletePlatformApplication for more information on using the DeletePlatformApplication 834 // API call, and error handling. 835 // 836 // This method is useful when you want to inject custom logic or configuration 837 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 838 // 839 // 840 // // Example sending a request using the DeletePlatformApplicationRequest method. 841 // req, resp := client.DeletePlatformApplicationRequest(params) 842 // 843 // err := req.Send() 844 // if err == nil { // resp is now filled 845 // fmt.Println(resp) 846 // } 847 // 848 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/DeletePlatformApplication 849 func (c *SNS) DeletePlatformApplicationRequest(input *DeletePlatformApplicationInput) (req *request.Request, output *DeletePlatformApplicationOutput) { 850 op := &request.Operation{ 851 Name: opDeletePlatformApplication, 852 HTTPMethod: "POST", 853 HTTPPath: "/", 854 } 855 856 if input == nil { 857 input = &DeletePlatformApplicationInput{} 858 } 859 860 output = &DeletePlatformApplicationOutput{} 861 req = c.newRequest(op, input, output) 862 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 863 return 864 } 865 866 // DeletePlatformApplication API operation for Amazon Simple Notification Service. 867 // 868 // Deletes a platform application object for one of the supported push notification 869 // services, such as APNS and GCM (Firebase Cloud Messaging). For more information, 870 // see Using Amazon SNS Mobile Push Notifications (https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). 871 // 872 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 873 // with awserr.Error's Code and Message methods to get detailed information about 874 // the error. 875 // 876 // See the AWS API reference guide for Amazon Simple Notification Service's 877 // API operation DeletePlatformApplication for usage and error information. 878 // 879 // Returned Error Codes: 880 // * ErrCodeInvalidParameterException "InvalidParameter" 881 // Indicates that a request parameter does not comply with the associated constraints. 882 // 883 // * ErrCodeInternalErrorException "InternalError" 884 // Indicates an internal service error. 885 // 886 // * ErrCodeAuthorizationErrorException "AuthorizationError" 887 // Indicates that the user has been denied access to the requested resource. 888 // 889 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/DeletePlatformApplication 890 func (c *SNS) DeletePlatformApplication(input *DeletePlatformApplicationInput) (*DeletePlatformApplicationOutput, error) { 891 req, out := c.DeletePlatformApplicationRequest(input) 892 return out, req.Send() 893 } 894 895 // DeletePlatformApplicationWithContext is the same as DeletePlatformApplication with the addition of 896 // the ability to pass a context and additional request options. 897 // 898 // See DeletePlatformApplication for details on how to use this API operation. 899 // 900 // The context must be non-nil and will be used for request cancellation. If 901 // the context is nil a panic will occur. In the future the SDK may create 902 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 903 // for more information on using Contexts. 904 func (c *SNS) DeletePlatformApplicationWithContext(ctx aws.Context, input *DeletePlatformApplicationInput, opts ...request.Option) (*DeletePlatformApplicationOutput, error) { 905 req, out := c.DeletePlatformApplicationRequest(input) 906 req.SetContext(ctx) 907 req.ApplyOptions(opts...) 908 return out, req.Send() 909 } 910 911 const opDeleteSMSSandboxPhoneNumber = "DeleteSMSSandboxPhoneNumber" 912 913 // DeleteSMSSandboxPhoneNumberRequest generates a "aws/request.Request" representing the 914 // client's request for the DeleteSMSSandboxPhoneNumber operation. The "output" return 915 // value will be populated with the request's response once the request completes 916 // successfully. 917 // 918 // Use "Send" method on the returned Request to send the API call to the service. 919 // the "output" return value is not valid until after Send returns without error. 920 // 921 // See DeleteSMSSandboxPhoneNumber for more information on using the DeleteSMSSandboxPhoneNumber 922 // API call, and error handling. 923 // 924 // This method is useful when you want to inject custom logic or configuration 925 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 926 // 927 // 928 // // Example sending a request using the DeleteSMSSandboxPhoneNumberRequest method. 929 // req, resp := client.DeleteSMSSandboxPhoneNumberRequest(params) 930 // 931 // err := req.Send() 932 // if err == nil { // resp is now filled 933 // fmt.Println(resp) 934 // } 935 // 936 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/DeleteSMSSandboxPhoneNumber 937 func (c *SNS) DeleteSMSSandboxPhoneNumberRequest(input *DeleteSMSSandboxPhoneNumberInput) (req *request.Request, output *DeleteSMSSandboxPhoneNumberOutput) { 938 op := &request.Operation{ 939 Name: opDeleteSMSSandboxPhoneNumber, 940 HTTPMethod: "POST", 941 HTTPPath: "/", 942 } 943 944 if input == nil { 945 input = &DeleteSMSSandboxPhoneNumberInput{} 946 } 947 948 output = &DeleteSMSSandboxPhoneNumberOutput{} 949 req = c.newRequest(op, input, output) 950 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 951 return 952 } 953 954 // DeleteSMSSandboxPhoneNumber API operation for Amazon Simple Notification Service. 955 // 956 // Deletes an account's verified or pending phone number from the SMS sandbox. 957 // 958 // When you start using Amazon SNS to send SMS messages, your account is in 959 // the SMS sandbox. The SMS sandbox provides a safe environment for you to try 960 // Amazon SNS features without risking your reputation as an SMS sender. While 961 // your account is in the SMS sandbox, you can use all of the features of Amazon 962 // SNS. However, you can send SMS messages only to verified destination phone 963 // numbers. For more information, including how to move out of the sandbox to 964 // send messages without restrictions, see SMS sandbox (https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html) 965 // in the Amazon SNS Developer Guide. 966 // 967 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 968 // with awserr.Error's Code and Message methods to get detailed information about 969 // the error. 970 // 971 // See the AWS API reference guide for Amazon Simple Notification Service's 972 // API operation DeleteSMSSandboxPhoneNumber for usage and error information. 973 // 974 // Returned Error Codes: 975 // * ErrCodeAuthorizationErrorException "AuthorizationError" 976 // Indicates that the user has been denied access to the requested resource. 977 // 978 // * ErrCodeInternalErrorException "InternalError" 979 // Indicates an internal service error. 980 // 981 // * ErrCodeInvalidParameterException "InvalidParameter" 982 // Indicates that a request parameter does not comply with the associated constraints. 983 // 984 // * ErrCodeResourceNotFoundException "ResourceNotFound" 985 // Can’t perform the action on the specified resource. Make sure that the 986 // resource exists. 987 // 988 // * ErrCodeUserErrorException "UserError" 989 // Indicates that a request parameter does not comply with the associated constraints. 990 // 991 // * ErrCodeThrottledException "Throttled" 992 // Indicates that the rate at which requests have been submitted for this action 993 // exceeds the limit for your account. 994 // 995 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/DeleteSMSSandboxPhoneNumber 996 func (c *SNS) DeleteSMSSandboxPhoneNumber(input *DeleteSMSSandboxPhoneNumberInput) (*DeleteSMSSandboxPhoneNumberOutput, error) { 997 req, out := c.DeleteSMSSandboxPhoneNumberRequest(input) 998 return out, req.Send() 999 } 1000 1001 // DeleteSMSSandboxPhoneNumberWithContext is the same as DeleteSMSSandboxPhoneNumber with the addition of 1002 // the ability to pass a context and additional request options. 1003 // 1004 // See DeleteSMSSandboxPhoneNumber for details on how to use this API operation. 1005 // 1006 // The context must be non-nil and will be used for request cancellation. If 1007 // the context is nil a panic will occur. In the future the SDK may create 1008 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1009 // for more information on using Contexts. 1010 func (c *SNS) DeleteSMSSandboxPhoneNumberWithContext(ctx aws.Context, input *DeleteSMSSandboxPhoneNumberInput, opts ...request.Option) (*DeleteSMSSandboxPhoneNumberOutput, error) { 1011 req, out := c.DeleteSMSSandboxPhoneNumberRequest(input) 1012 req.SetContext(ctx) 1013 req.ApplyOptions(opts...) 1014 return out, req.Send() 1015 } 1016 1017 const opDeleteTopic = "DeleteTopic" 1018 1019 // DeleteTopicRequest generates a "aws/request.Request" representing the 1020 // client's request for the DeleteTopic operation. The "output" return 1021 // value will be populated with the request's response once the request completes 1022 // successfully. 1023 // 1024 // Use "Send" method on the returned Request to send the API call to the service. 1025 // the "output" return value is not valid until after Send returns without error. 1026 // 1027 // See DeleteTopic for more information on using the DeleteTopic 1028 // API call, and error handling. 1029 // 1030 // This method is useful when you want to inject custom logic or configuration 1031 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1032 // 1033 // 1034 // // Example sending a request using the DeleteTopicRequest method. 1035 // req, resp := client.DeleteTopicRequest(params) 1036 // 1037 // err := req.Send() 1038 // if err == nil { // resp is now filled 1039 // fmt.Println(resp) 1040 // } 1041 // 1042 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/DeleteTopic 1043 func (c *SNS) DeleteTopicRequest(input *DeleteTopicInput) (req *request.Request, output *DeleteTopicOutput) { 1044 op := &request.Operation{ 1045 Name: opDeleteTopic, 1046 HTTPMethod: "POST", 1047 HTTPPath: "/", 1048 } 1049 1050 if input == nil { 1051 input = &DeleteTopicInput{} 1052 } 1053 1054 output = &DeleteTopicOutput{} 1055 req = c.newRequest(op, input, output) 1056 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1057 return 1058 } 1059 1060 // DeleteTopic API operation for Amazon Simple Notification Service. 1061 // 1062 // Deletes a topic and all its subscriptions. Deleting a topic might prevent 1063 // some messages previously sent to the topic from being delivered to subscribers. 1064 // This action is idempotent, so deleting a topic that does not exist does not 1065 // result in an error. 1066 // 1067 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1068 // with awserr.Error's Code and Message methods to get detailed information about 1069 // the error. 1070 // 1071 // See the AWS API reference guide for Amazon Simple Notification Service's 1072 // API operation DeleteTopic for usage and error information. 1073 // 1074 // Returned Error Codes: 1075 // * ErrCodeInvalidParameterException "InvalidParameter" 1076 // Indicates that a request parameter does not comply with the associated constraints. 1077 // 1078 // * ErrCodeInternalErrorException "InternalError" 1079 // Indicates an internal service error. 1080 // 1081 // * ErrCodeAuthorizationErrorException "AuthorizationError" 1082 // Indicates that the user has been denied access to the requested resource. 1083 // 1084 // * ErrCodeNotFoundException "NotFound" 1085 // Indicates that the requested resource does not exist. 1086 // 1087 // * ErrCodeStaleTagException "StaleTag" 1088 // A tag has been added to a resource with the same ARN as a deleted resource. 1089 // Wait a short while and then retry the operation. 1090 // 1091 // * ErrCodeTagPolicyException "TagPolicy" 1092 // The request doesn't comply with the IAM tag policy. Correct your request 1093 // and then retry it. 1094 // 1095 // * ErrCodeConcurrentAccessException "ConcurrentAccess" 1096 // Can't perform multiple operations on a tag simultaneously. Perform the operations 1097 // sequentially. 1098 // 1099 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/DeleteTopic 1100 func (c *SNS) DeleteTopic(input *DeleteTopicInput) (*DeleteTopicOutput, error) { 1101 req, out := c.DeleteTopicRequest(input) 1102 return out, req.Send() 1103 } 1104 1105 // DeleteTopicWithContext is the same as DeleteTopic with the addition of 1106 // the ability to pass a context and additional request options. 1107 // 1108 // See DeleteTopic for details on how to use this API operation. 1109 // 1110 // The context must be non-nil and will be used for request cancellation. If 1111 // the context is nil a panic will occur. In the future the SDK may create 1112 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1113 // for more information on using Contexts. 1114 func (c *SNS) DeleteTopicWithContext(ctx aws.Context, input *DeleteTopicInput, opts ...request.Option) (*DeleteTopicOutput, error) { 1115 req, out := c.DeleteTopicRequest(input) 1116 req.SetContext(ctx) 1117 req.ApplyOptions(opts...) 1118 return out, req.Send() 1119 } 1120 1121 const opGetEndpointAttributes = "GetEndpointAttributes" 1122 1123 // GetEndpointAttributesRequest generates a "aws/request.Request" representing the 1124 // client's request for the GetEndpointAttributes operation. The "output" return 1125 // value will be populated with the request's response once the request completes 1126 // successfully. 1127 // 1128 // Use "Send" method on the returned Request to send the API call to the service. 1129 // the "output" return value is not valid until after Send returns without error. 1130 // 1131 // See GetEndpointAttributes for more information on using the GetEndpointAttributes 1132 // API call, and error handling. 1133 // 1134 // This method is useful when you want to inject custom logic or configuration 1135 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1136 // 1137 // 1138 // // Example sending a request using the GetEndpointAttributesRequest method. 1139 // req, resp := client.GetEndpointAttributesRequest(params) 1140 // 1141 // err := req.Send() 1142 // if err == nil { // resp is now filled 1143 // fmt.Println(resp) 1144 // } 1145 // 1146 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetEndpointAttributes 1147 func (c *SNS) GetEndpointAttributesRequest(input *GetEndpointAttributesInput) (req *request.Request, output *GetEndpointAttributesOutput) { 1148 op := &request.Operation{ 1149 Name: opGetEndpointAttributes, 1150 HTTPMethod: "POST", 1151 HTTPPath: "/", 1152 } 1153 1154 if input == nil { 1155 input = &GetEndpointAttributesInput{} 1156 } 1157 1158 output = &GetEndpointAttributesOutput{} 1159 req = c.newRequest(op, input, output) 1160 return 1161 } 1162 1163 // GetEndpointAttributes API operation for Amazon Simple Notification Service. 1164 // 1165 // Retrieves the endpoint attributes for a device on one of the supported push 1166 // notification services, such as GCM (Firebase Cloud Messaging) and APNS. For 1167 // more information, see Using Amazon SNS Mobile Push Notifications (https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). 1168 // 1169 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1170 // with awserr.Error's Code and Message methods to get detailed information about 1171 // the error. 1172 // 1173 // See the AWS API reference guide for Amazon Simple Notification Service's 1174 // API operation GetEndpointAttributes for usage and error information. 1175 // 1176 // Returned Error Codes: 1177 // * ErrCodeInvalidParameterException "InvalidParameter" 1178 // Indicates that a request parameter does not comply with the associated constraints. 1179 // 1180 // * ErrCodeInternalErrorException "InternalError" 1181 // Indicates an internal service error. 1182 // 1183 // * ErrCodeAuthorizationErrorException "AuthorizationError" 1184 // Indicates that the user has been denied access to the requested resource. 1185 // 1186 // * ErrCodeNotFoundException "NotFound" 1187 // Indicates that the requested resource does not exist. 1188 // 1189 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetEndpointAttributes 1190 func (c *SNS) GetEndpointAttributes(input *GetEndpointAttributesInput) (*GetEndpointAttributesOutput, error) { 1191 req, out := c.GetEndpointAttributesRequest(input) 1192 return out, req.Send() 1193 } 1194 1195 // GetEndpointAttributesWithContext is the same as GetEndpointAttributes with the addition of 1196 // the ability to pass a context and additional request options. 1197 // 1198 // See GetEndpointAttributes for details on how to use this API operation. 1199 // 1200 // The context must be non-nil and will be used for request cancellation. If 1201 // the context is nil a panic will occur. In the future the SDK may create 1202 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1203 // for more information on using Contexts. 1204 func (c *SNS) GetEndpointAttributesWithContext(ctx aws.Context, input *GetEndpointAttributesInput, opts ...request.Option) (*GetEndpointAttributesOutput, error) { 1205 req, out := c.GetEndpointAttributesRequest(input) 1206 req.SetContext(ctx) 1207 req.ApplyOptions(opts...) 1208 return out, req.Send() 1209 } 1210 1211 const opGetPlatformApplicationAttributes = "GetPlatformApplicationAttributes" 1212 1213 // GetPlatformApplicationAttributesRequest generates a "aws/request.Request" representing the 1214 // client's request for the GetPlatformApplicationAttributes operation. The "output" return 1215 // value will be populated with the request's response once the request completes 1216 // successfully. 1217 // 1218 // Use "Send" method on the returned Request to send the API call to the service. 1219 // the "output" return value is not valid until after Send returns without error. 1220 // 1221 // See GetPlatformApplicationAttributes for more information on using the GetPlatformApplicationAttributes 1222 // API call, and error handling. 1223 // 1224 // This method is useful when you want to inject custom logic or configuration 1225 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1226 // 1227 // 1228 // // Example sending a request using the GetPlatformApplicationAttributesRequest method. 1229 // req, resp := client.GetPlatformApplicationAttributesRequest(params) 1230 // 1231 // err := req.Send() 1232 // if err == nil { // resp is now filled 1233 // fmt.Println(resp) 1234 // } 1235 // 1236 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetPlatformApplicationAttributes 1237 func (c *SNS) GetPlatformApplicationAttributesRequest(input *GetPlatformApplicationAttributesInput) (req *request.Request, output *GetPlatformApplicationAttributesOutput) { 1238 op := &request.Operation{ 1239 Name: opGetPlatformApplicationAttributes, 1240 HTTPMethod: "POST", 1241 HTTPPath: "/", 1242 } 1243 1244 if input == nil { 1245 input = &GetPlatformApplicationAttributesInput{} 1246 } 1247 1248 output = &GetPlatformApplicationAttributesOutput{} 1249 req = c.newRequest(op, input, output) 1250 return 1251 } 1252 1253 // GetPlatformApplicationAttributes API operation for Amazon Simple Notification Service. 1254 // 1255 // Retrieves the attributes of the platform application object for the supported 1256 // push notification services, such as APNS and GCM (Firebase Cloud Messaging). 1257 // For more information, see Using Amazon SNS Mobile Push Notifications (https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). 1258 // 1259 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1260 // with awserr.Error's Code and Message methods to get detailed information about 1261 // the error. 1262 // 1263 // See the AWS API reference guide for Amazon Simple Notification Service's 1264 // API operation GetPlatformApplicationAttributes for usage and error information. 1265 // 1266 // Returned Error Codes: 1267 // * ErrCodeInvalidParameterException "InvalidParameter" 1268 // Indicates that a request parameter does not comply with the associated constraints. 1269 // 1270 // * ErrCodeInternalErrorException "InternalError" 1271 // Indicates an internal service error. 1272 // 1273 // * ErrCodeAuthorizationErrorException "AuthorizationError" 1274 // Indicates that the user has been denied access to the requested resource. 1275 // 1276 // * ErrCodeNotFoundException "NotFound" 1277 // Indicates that the requested resource does not exist. 1278 // 1279 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetPlatformApplicationAttributes 1280 func (c *SNS) GetPlatformApplicationAttributes(input *GetPlatformApplicationAttributesInput) (*GetPlatformApplicationAttributesOutput, error) { 1281 req, out := c.GetPlatformApplicationAttributesRequest(input) 1282 return out, req.Send() 1283 } 1284 1285 // GetPlatformApplicationAttributesWithContext is the same as GetPlatformApplicationAttributes with the addition of 1286 // the ability to pass a context and additional request options. 1287 // 1288 // See GetPlatformApplicationAttributes for details on how to use this API operation. 1289 // 1290 // The context must be non-nil and will be used for request cancellation. If 1291 // the context is nil a panic will occur. In the future the SDK may create 1292 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1293 // for more information on using Contexts. 1294 func (c *SNS) GetPlatformApplicationAttributesWithContext(ctx aws.Context, input *GetPlatformApplicationAttributesInput, opts ...request.Option) (*GetPlatformApplicationAttributesOutput, error) { 1295 req, out := c.GetPlatformApplicationAttributesRequest(input) 1296 req.SetContext(ctx) 1297 req.ApplyOptions(opts...) 1298 return out, req.Send() 1299 } 1300 1301 const opGetSMSAttributes = "GetSMSAttributes" 1302 1303 // GetSMSAttributesRequest generates a "aws/request.Request" representing the 1304 // client's request for the GetSMSAttributes operation. The "output" return 1305 // value will be populated with the request's response once the request completes 1306 // successfully. 1307 // 1308 // Use "Send" method on the returned Request to send the API call to the service. 1309 // the "output" return value is not valid until after Send returns without error. 1310 // 1311 // See GetSMSAttributes for more information on using the GetSMSAttributes 1312 // API call, and error handling. 1313 // 1314 // This method is useful when you want to inject custom logic or configuration 1315 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1316 // 1317 // 1318 // // Example sending a request using the GetSMSAttributesRequest method. 1319 // req, resp := client.GetSMSAttributesRequest(params) 1320 // 1321 // err := req.Send() 1322 // if err == nil { // resp is now filled 1323 // fmt.Println(resp) 1324 // } 1325 // 1326 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetSMSAttributes 1327 func (c *SNS) GetSMSAttributesRequest(input *GetSMSAttributesInput) (req *request.Request, output *GetSMSAttributesOutput) { 1328 op := &request.Operation{ 1329 Name: opGetSMSAttributes, 1330 HTTPMethod: "POST", 1331 HTTPPath: "/", 1332 } 1333 1334 if input == nil { 1335 input = &GetSMSAttributesInput{} 1336 } 1337 1338 output = &GetSMSAttributesOutput{} 1339 req = c.newRequest(op, input, output) 1340 return 1341 } 1342 1343 // GetSMSAttributes API operation for Amazon Simple Notification Service. 1344 // 1345 // Returns the settings for sending SMS messages from your account. 1346 // 1347 // These settings are set with the SetSMSAttributes action. 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 Amazon Simple Notification Service's 1354 // API operation GetSMSAttributes for usage and error information. 1355 // 1356 // Returned Error Codes: 1357 // * ErrCodeThrottledException "Throttled" 1358 // Indicates that the rate at which requests have been submitted for this action 1359 // exceeds the limit for your account. 1360 // 1361 // * ErrCodeInternalErrorException "InternalError" 1362 // Indicates an internal service error. 1363 // 1364 // * ErrCodeAuthorizationErrorException "AuthorizationError" 1365 // Indicates that the user has been denied access to the requested resource. 1366 // 1367 // * ErrCodeInvalidParameterException "InvalidParameter" 1368 // Indicates that a request parameter does not comply with the associated constraints. 1369 // 1370 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetSMSAttributes 1371 func (c *SNS) GetSMSAttributes(input *GetSMSAttributesInput) (*GetSMSAttributesOutput, error) { 1372 req, out := c.GetSMSAttributesRequest(input) 1373 return out, req.Send() 1374 } 1375 1376 // GetSMSAttributesWithContext is the same as GetSMSAttributes with the addition of 1377 // the ability to pass a context and additional request options. 1378 // 1379 // See GetSMSAttributes for details on how to use this API operation. 1380 // 1381 // The context must be non-nil and will be used for request cancellation. If 1382 // the context is nil a panic will occur. In the future the SDK may create 1383 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1384 // for more information on using Contexts. 1385 func (c *SNS) GetSMSAttributesWithContext(ctx aws.Context, input *GetSMSAttributesInput, opts ...request.Option) (*GetSMSAttributesOutput, error) { 1386 req, out := c.GetSMSAttributesRequest(input) 1387 req.SetContext(ctx) 1388 req.ApplyOptions(opts...) 1389 return out, req.Send() 1390 } 1391 1392 const opGetSMSSandboxAccountStatus = "GetSMSSandboxAccountStatus" 1393 1394 // GetSMSSandboxAccountStatusRequest generates a "aws/request.Request" representing the 1395 // client's request for the GetSMSSandboxAccountStatus operation. The "output" return 1396 // value will be populated with the request's response once the request completes 1397 // successfully. 1398 // 1399 // Use "Send" method on the returned Request to send the API call to the service. 1400 // the "output" return value is not valid until after Send returns without error. 1401 // 1402 // See GetSMSSandboxAccountStatus for more information on using the GetSMSSandboxAccountStatus 1403 // API call, and error handling. 1404 // 1405 // This method is useful when you want to inject custom logic or configuration 1406 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1407 // 1408 // 1409 // // Example sending a request using the GetSMSSandboxAccountStatusRequest method. 1410 // req, resp := client.GetSMSSandboxAccountStatusRequest(params) 1411 // 1412 // err := req.Send() 1413 // if err == nil { // resp is now filled 1414 // fmt.Println(resp) 1415 // } 1416 // 1417 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetSMSSandboxAccountStatus 1418 func (c *SNS) GetSMSSandboxAccountStatusRequest(input *GetSMSSandboxAccountStatusInput) (req *request.Request, output *GetSMSSandboxAccountStatusOutput) { 1419 op := &request.Operation{ 1420 Name: opGetSMSSandboxAccountStatus, 1421 HTTPMethod: "POST", 1422 HTTPPath: "/", 1423 } 1424 1425 if input == nil { 1426 input = &GetSMSSandboxAccountStatusInput{} 1427 } 1428 1429 output = &GetSMSSandboxAccountStatusOutput{} 1430 req = c.newRequest(op, input, output) 1431 return 1432 } 1433 1434 // GetSMSSandboxAccountStatus API operation for Amazon Simple Notification Service. 1435 // 1436 // Retrieves the SMS sandbox status for the calling account in the target Region. 1437 // 1438 // When you start using Amazon SNS to send SMS messages, your account is in 1439 // the SMS sandbox. The SMS sandbox provides a safe environment for you to try 1440 // Amazon SNS features without risking your reputation as an SMS sender. While 1441 // your account is in the SMS sandbox, you can use all of the features of Amazon 1442 // SNS. However, you can send SMS messages only to verified destination phone 1443 // numbers. For more information, including how to move out of the sandbox to 1444 // send messages without restrictions, see SMS sandbox (https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html) 1445 // in the Amazon SNS Developer Guide. 1446 // 1447 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1448 // with awserr.Error's Code and Message methods to get detailed information about 1449 // the error. 1450 // 1451 // See the AWS API reference guide for Amazon Simple Notification Service's 1452 // API operation GetSMSSandboxAccountStatus for usage and error information. 1453 // 1454 // Returned Error Codes: 1455 // * ErrCodeAuthorizationErrorException "AuthorizationError" 1456 // Indicates that the user has been denied access to the requested resource. 1457 // 1458 // * ErrCodeInternalErrorException "InternalError" 1459 // Indicates an internal service error. 1460 // 1461 // * ErrCodeThrottledException "Throttled" 1462 // Indicates that the rate at which requests have been submitted for this action 1463 // exceeds the limit for your account. 1464 // 1465 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetSMSSandboxAccountStatus 1466 func (c *SNS) GetSMSSandboxAccountStatus(input *GetSMSSandboxAccountStatusInput) (*GetSMSSandboxAccountStatusOutput, error) { 1467 req, out := c.GetSMSSandboxAccountStatusRequest(input) 1468 return out, req.Send() 1469 } 1470 1471 // GetSMSSandboxAccountStatusWithContext is the same as GetSMSSandboxAccountStatus with the addition of 1472 // the ability to pass a context and additional request options. 1473 // 1474 // See GetSMSSandboxAccountStatus for details on how to use this API operation. 1475 // 1476 // The context must be non-nil and will be used for request cancellation. If 1477 // the context is nil a panic will occur. In the future the SDK may create 1478 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1479 // for more information on using Contexts. 1480 func (c *SNS) GetSMSSandboxAccountStatusWithContext(ctx aws.Context, input *GetSMSSandboxAccountStatusInput, opts ...request.Option) (*GetSMSSandboxAccountStatusOutput, error) { 1481 req, out := c.GetSMSSandboxAccountStatusRequest(input) 1482 req.SetContext(ctx) 1483 req.ApplyOptions(opts...) 1484 return out, req.Send() 1485 } 1486 1487 const opGetSubscriptionAttributes = "GetSubscriptionAttributes" 1488 1489 // GetSubscriptionAttributesRequest generates a "aws/request.Request" representing the 1490 // client's request for the GetSubscriptionAttributes operation. The "output" return 1491 // value will be populated with the request's response once the request completes 1492 // successfully. 1493 // 1494 // Use "Send" method on the returned Request to send the API call to the service. 1495 // the "output" return value is not valid until after Send returns without error. 1496 // 1497 // See GetSubscriptionAttributes for more information on using the GetSubscriptionAttributes 1498 // API call, and error handling. 1499 // 1500 // This method is useful when you want to inject custom logic or configuration 1501 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1502 // 1503 // 1504 // // Example sending a request using the GetSubscriptionAttributesRequest method. 1505 // req, resp := client.GetSubscriptionAttributesRequest(params) 1506 // 1507 // err := req.Send() 1508 // if err == nil { // resp is now filled 1509 // fmt.Println(resp) 1510 // } 1511 // 1512 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetSubscriptionAttributes 1513 func (c *SNS) GetSubscriptionAttributesRequest(input *GetSubscriptionAttributesInput) (req *request.Request, output *GetSubscriptionAttributesOutput) { 1514 op := &request.Operation{ 1515 Name: opGetSubscriptionAttributes, 1516 HTTPMethod: "POST", 1517 HTTPPath: "/", 1518 } 1519 1520 if input == nil { 1521 input = &GetSubscriptionAttributesInput{} 1522 } 1523 1524 output = &GetSubscriptionAttributesOutput{} 1525 req = c.newRequest(op, input, output) 1526 return 1527 } 1528 1529 // GetSubscriptionAttributes API operation for Amazon Simple Notification Service. 1530 // 1531 // Returns all of the properties of a subscription. 1532 // 1533 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1534 // with awserr.Error's Code and Message methods to get detailed information about 1535 // the error. 1536 // 1537 // See the AWS API reference guide for Amazon Simple Notification Service's 1538 // API operation GetSubscriptionAttributes for usage and error information. 1539 // 1540 // Returned Error Codes: 1541 // * ErrCodeInvalidParameterException "InvalidParameter" 1542 // Indicates that a request parameter does not comply with the associated constraints. 1543 // 1544 // * ErrCodeInternalErrorException "InternalError" 1545 // Indicates an internal service error. 1546 // 1547 // * ErrCodeNotFoundException "NotFound" 1548 // Indicates that the requested resource does not exist. 1549 // 1550 // * ErrCodeAuthorizationErrorException "AuthorizationError" 1551 // Indicates that the user has been denied access to the requested resource. 1552 // 1553 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetSubscriptionAttributes 1554 func (c *SNS) GetSubscriptionAttributes(input *GetSubscriptionAttributesInput) (*GetSubscriptionAttributesOutput, error) { 1555 req, out := c.GetSubscriptionAttributesRequest(input) 1556 return out, req.Send() 1557 } 1558 1559 // GetSubscriptionAttributesWithContext is the same as GetSubscriptionAttributes with the addition of 1560 // the ability to pass a context and additional request options. 1561 // 1562 // See GetSubscriptionAttributes for details on how to use this API operation. 1563 // 1564 // The context must be non-nil and will be used for request cancellation. If 1565 // the context is nil a panic will occur. In the future the SDK may create 1566 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1567 // for more information on using Contexts. 1568 func (c *SNS) GetSubscriptionAttributesWithContext(ctx aws.Context, input *GetSubscriptionAttributesInput, opts ...request.Option) (*GetSubscriptionAttributesOutput, error) { 1569 req, out := c.GetSubscriptionAttributesRequest(input) 1570 req.SetContext(ctx) 1571 req.ApplyOptions(opts...) 1572 return out, req.Send() 1573 } 1574 1575 const opGetTopicAttributes = "GetTopicAttributes" 1576 1577 // GetTopicAttributesRequest generates a "aws/request.Request" representing the 1578 // client's request for the GetTopicAttributes operation. The "output" return 1579 // value will be populated with the request's response once the request completes 1580 // successfully. 1581 // 1582 // Use "Send" method on the returned Request to send the API call to the service. 1583 // the "output" return value is not valid until after Send returns without error. 1584 // 1585 // See GetTopicAttributes for more information on using the GetTopicAttributes 1586 // API call, and error handling. 1587 // 1588 // This method is useful when you want to inject custom logic or configuration 1589 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1590 // 1591 // 1592 // // Example sending a request using the GetTopicAttributesRequest method. 1593 // req, resp := client.GetTopicAttributesRequest(params) 1594 // 1595 // err := req.Send() 1596 // if err == nil { // resp is now filled 1597 // fmt.Println(resp) 1598 // } 1599 // 1600 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetTopicAttributes 1601 func (c *SNS) GetTopicAttributesRequest(input *GetTopicAttributesInput) (req *request.Request, output *GetTopicAttributesOutput) { 1602 op := &request.Operation{ 1603 Name: opGetTopicAttributes, 1604 HTTPMethod: "POST", 1605 HTTPPath: "/", 1606 } 1607 1608 if input == nil { 1609 input = &GetTopicAttributesInput{} 1610 } 1611 1612 output = &GetTopicAttributesOutput{} 1613 req = c.newRequest(op, input, output) 1614 return 1615 } 1616 1617 // GetTopicAttributes API operation for Amazon Simple Notification Service. 1618 // 1619 // Returns all of the properties of a topic. Topic properties returned might 1620 // differ based on the authorization of the user. 1621 // 1622 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1623 // with awserr.Error's Code and Message methods to get detailed information about 1624 // the error. 1625 // 1626 // See the AWS API reference guide for Amazon Simple Notification Service's 1627 // API operation GetTopicAttributes for usage and error information. 1628 // 1629 // Returned Error Codes: 1630 // * ErrCodeInvalidParameterException "InvalidParameter" 1631 // Indicates that a request parameter does not comply with the associated constraints. 1632 // 1633 // * ErrCodeInternalErrorException "InternalError" 1634 // Indicates an internal service error. 1635 // 1636 // * ErrCodeNotFoundException "NotFound" 1637 // Indicates that the requested resource does not exist. 1638 // 1639 // * ErrCodeAuthorizationErrorException "AuthorizationError" 1640 // Indicates that the user has been denied access to the requested resource. 1641 // 1642 // * ErrCodeInvalidSecurityException "InvalidSecurity" 1643 // The credential signature isn't valid. You must use an HTTPS endpoint and 1644 // sign your request using Signature Version 4. 1645 // 1646 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetTopicAttributes 1647 func (c *SNS) GetTopicAttributes(input *GetTopicAttributesInput) (*GetTopicAttributesOutput, error) { 1648 req, out := c.GetTopicAttributesRequest(input) 1649 return out, req.Send() 1650 } 1651 1652 // GetTopicAttributesWithContext is the same as GetTopicAttributes with the addition of 1653 // the ability to pass a context and additional request options. 1654 // 1655 // See GetTopicAttributes for details on how to use this API operation. 1656 // 1657 // The context must be non-nil and will be used for request cancellation. If 1658 // the context is nil a panic will occur. In the future the SDK may create 1659 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1660 // for more information on using Contexts. 1661 func (c *SNS) GetTopicAttributesWithContext(ctx aws.Context, input *GetTopicAttributesInput, opts ...request.Option) (*GetTopicAttributesOutput, error) { 1662 req, out := c.GetTopicAttributesRequest(input) 1663 req.SetContext(ctx) 1664 req.ApplyOptions(opts...) 1665 return out, req.Send() 1666 } 1667 1668 const opListEndpointsByPlatformApplication = "ListEndpointsByPlatformApplication" 1669 1670 // ListEndpointsByPlatformApplicationRequest generates a "aws/request.Request" representing the 1671 // client's request for the ListEndpointsByPlatformApplication operation. The "output" return 1672 // value will be populated with the request's response once the request completes 1673 // successfully. 1674 // 1675 // Use "Send" method on the returned Request to send the API call to the service. 1676 // the "output" return value is not valid until after Send returns without error. 1677 // 1678 // See ListEndpointsByPlatformApplication for more information on using the ListEndpointsByPlatformApplication 1679 // API call, and error handling. 1680 // 1681 // This method is useful when you want to inject custom logic or configuration 1682 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1683 // 1684 // 1685 // // Example sending a request using the ListEndpointsByPlatformApplicationRequest method. 1686 // req, resp := client.ListEndpointsByPlatformApplicationRequest(params) 1687 // 1688 // err := req.Send() 1689 // if err == nil { // resp is now filled 1690 // fmt.Println(resp) 1691 // } 1692 // 1693 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListEndpointsByPlatformApplication 1694 func (c *SNS) ListEndpointsByPlatformApplicationRequest(input *ListEndpointsByPlatformApplicationInput) (req *request.Request, output *ListEndpointsByPlatformApplicationOutput) { 1695 op := &request.Operation{ 1696 Name: opListEndpointsByPlatformApplication, 1697 HTTPMethod: "POST", 1698 HTTPPath: "/", 1699 Paginator: &request.Paginator{ 1700 InputTokens: []string{"NextToken"}, 1701 OutputTokens: []string{"NextToken"}, 1702 LimitToken: "", 1703 TruncationToken: "", 1704 }, 1705 } 1706 1707 if input == nil { 1708 input = &ListEndpointsByPlatformApplicationInput{} 1709 } 1710 1711 output = &ListEndpointsByPlatformApplicationOutput{} 1712 req = c.newRequest(op, input, output) 1713 return 1714 } 1715 1716 // ListEndpointsByPlatformApplication API operation for Amazon Simple Notification Service. 1717 // 1718 // Lists the endpoints and endpoint attributes for devices in a supported push 1719 // notification service, such as GCM (Firebase Cloud Messaging) and APNS. The 1720 // results for ListEndpointsByPlatformApplication are paginated and return a 1721 // limited list of endpoints, up to 100. If additional records are available 1722 // after the first page results, then a NextToken string will be returned. To 1723 // receive the next page, you call ListEndpointsByPlatformApplication again 1724 // using the NextToken string received from the previous call. When there are 1725 // no more records to return, NextToken will be null. For more information, 1726 // see Using Amazon SNS Mobile Push Notifications (https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). 1727 // 1728 // This action is throttled at 30 transactions per second (TPS). 1729 // 1730 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1731 // with awserr.Error's Code and Message methods to get detailed information about 1732 // the error. 1733 // 1734 // See the AWS API reference guide for Amazon Simple Notification Service's 1735 // API operation ListEndpointsByPlatformApplication for usage and error information. 1736 // 1737 // Returned Error Codes: 1738 // * ErrCodeInvalidParameterException "InvalidParameter" 1739 // Indicates that a request parameter does not comply with the associated constraints. 1740 // 1741 // * ErrCodeInternalErrorException "InternalError" 1742 // Indicates an internal service error. 1743 // 1744 // * ErrCodeAuthorizationErrorException "AuthorizationError" 1745 // Indicates that the user has been denied access to the requested resource. 1746 // 1747 // * ErrCodeNotFoundException "NotFound" 1748 // Indicates that the requested resource does not exist. 1749 // 1750 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListEndpointsByPlatformApplication 1751 func (c *SNS) ListEndpointsByPlatformApplication(input *ListEndpointsByPlatformApplicationInput) (*ListEndpointsByPlatformApplicationOutput, error) { 1752 req, out := c.ListEndpointsByPlatformApplicationRequest(input) 1753 return out, req.Send() 1754 } 1755 1756 // ListEndpointsByPlatformApplicationWithContext is the same as ListEndpointsByPlatformApplication with the addition of 1757 // the ability to pass a context and additional request options. 1758 // 1759 // See ListEndpointsByPlatformApplication for details on how to use this API operation. 1760 // 1761 // The context must be non-nil and will be used for request cancellation. If 1762 // the context is nil a panic will occur. In the future the SDK may create 1763 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1764 // for more information on using Contexts. 1765 func (c *SNS) ListEndpointsByPlatformApplicationWithContext(ctx aws.Context, input *ListEndpointsByPlatformApplicationInput, opts ...request.Option) (*ListEndpointsByPlatformApplicationOutput, error) { 1766 req, out := c.ListEndpointsByPlatformApplicationRequest(input) 1767 req.SetContext(ctx) 1768 req.ApplyOptions(opts...) 1769 return out, req.Send() 1770 } 1771 1772 // ListEndpointsByPlatformApplicationPages iterates over the pages of a ListEndpointsByPlatformApplication operation, 1773 // calling the "fn" function with the response data for each page. To stop 1774 // iterating, return false from the fn function. 1775 // 1776 // See ListEndpointsByPlatformApplication method for more information on how to use this operation. 1777 // 1778 // Note: This operation can generate multiple requests to a service. 1779 // 1780 // // Example iterating over at most 3 pages of a ListEndpointsByPlatformApplication operation. 1781 // pageNum := 0 1782 // err := client.ListEndpointsByPlatformApplicationPages(params, 1783 // func(page *sns.ListEndpointsByPlatformApplicationOutput, lastPage bool) bool { 1784 // pageNum++ 1785 // fmt.Println(page) 1786 // return pageNum <= 3 1787 // }) 1788 // 1789 func (c *SNS) ListEndpointsByPlatformApplicationPages(input *ListEndpointsByPlatformApplicationInput, fn func(*ListEndpointsByPlatformApplicationOutput, bool) bool) error { 1790 return c.ListEndpointsByPlatformApplicationPagesWithContext(aws.BackgroundContext(), input, fn) 1791 } 1792 1793 // ListEndpointsByPlatformApplicationPagesWithContext same as ListEndpointsByPlatformApplicationPages except 1794 // it takes a Context and allows setting request options on the pages. 1795 // 1796 // The context must be non-nil and will be used for request cancellation. If 1797 // the context is nil a panic will occur. In the future the SDK may create 1798 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1799 // for more information on using Contexts. 1800 func (c *SNS) ListEndpointsByPlatformApplicationPagesWithContext(ctx aws.Context, input *ListEndpointsByPlatformApplicationInput, fn func(*ListEndpointsByPlatformApplicationOutput, bool) bool, opts ...request.Option) error { 1801 p := request.Pagination{ 1802 NewRequest: func() (*request.Request, error) { 1803 var inCpy *ListEndpointsByPlatformApplicationInput 1804 if input != nil { 1805 tmp := *input 1806 inCpy = &tmp 1807 } 1808 req, _ := c.ListEndpointsByPlatformApplicationRequest(inCpy) 1809 req.SetContext(ctx) 1810 req.ApplyOptions(opts...) 1811 return req, nil 1812 }, 1813 } 1814 1815 for p.Next() { 1816 if !fn(p.Page().(*ListEndpointsByPlatformApplicationOutput), !p.HasNextPage()) { 1817 break 1818 } 1819 } 1820 1821 return p.Err() 1822 } 1823 1824 const opListOriginationNumbers = "ListOriginationNumbers" 1825 1826 // ListOriginationNumbersRequest generates a "aws/request.Request" representing the 1827 // client's request for the ListOriginationNumbers operation. The "output" return 1828 // value will be populated with the request's response once the request completes 1829 // successfully. 1830 // 1831 // Use "Send" method on the returned Request to send the API call to the service. 1832 // the "output" return value is not valid until after Send returns without error. 1833 // 1834 // See ListOriginationNumbers for more information on using the ListOriginationNumbers 1835 // API call, and error handling. 1836 // 1837 // This method is useful when you want to inject custom logic or configuration 1838 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1839 // 1840 // 1841 // // Example sending a request using the ListOriginationNumbersRequest method. 1842 // req, resp := client.ListOriginationNumbersRequest(params) 1843 // 1844 // err := req.Send() 1845 // if err == nil { // resp is now filled 1846 // fmt.Println(resp) 1847 // } 1848 // 1849 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListOriginationNumbers 1850 func (c *SNS) ListOriginationNumbersRequest(input *ListOriginationNumbersInput) (req *request.Request, output *ListOriginationNumbersOutput) { 1851 op := &request.Operation{ 1852 Name: opListOriginationNumbers, 1853 HTTPMethod: "POST", 1854 HTTPPath: "/", 1855 Paginator: &request.Paginator{ 1856 InputTokens: []string{"NextToken"}, 1857 OutputTokens: []string{"NextToken"}, 1858 LimitToken: "MaxResults", 1859 TruncationToken: "", 1860 }, 1861 } 1862 1863 if input == nil { 1864 input = &ListOriginationNumbersInput{} 1865 } 1866 1867 output = &ListOriginationNumbersOutput{} 1868 req = c.newRequest(op, input, output) 1869 return 1870 } 1871 1872 // ListOriginationNumbers API operation for Amazon Simple Notification Service. 1873 // 1874 // Lists the calling account's dedicated origination numbers and their metadata. 1875 // For more information about origination numbers, see Origination numbers (https://docs.aws.amazon.com/sns/latest/dg/channels-sms-originating-identities-origination-numbers.html) 1876 // in the Amazon SNS Developer Guide. 1877 // 1878 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1879 // with awserr.Error's Code and Message methods to get detailed information about 1880 // the error. 1881 // 1882 // See the AWS API reference guide for Amazon Simple Notification Service's 1883 // API operation ListOriginationNumbers for usage and error information. 1884 // 1885 // Returned Error Codes: 1886 // * ErrCodeInternalErrorException "InternalError" 1887 // Indicates an internal service error. 1888 // 1889 // * ErrCodeAuthorizationErrorException "AuthorizationError" 1890 // Indicates that the user has been denied access to the requested resource. 1891 // 1892 // * ErrCodeThrottledException "Throttled" 1893 // Indicates that the rate at which requests have been submitted for this action 1894 // exceeds the limit for your account. 1895 // 1896 // * ErrCodeInvalidParameterException "InvalidParameter" 1897 // Indicates that a request parameter does not comply with the associated constraints. 1898 // 1899 // * ErrCodeValidationException "ValidationException" 1900 // Indicates that a parameter in the request is invalid. 1901 // 1902 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListOriginationNumbers 1903 func (c *SNS) ListOriginationNumbers(input *ListOriginationNumbersInput) (*ListOriginationNumbersOutput, error) { 1904 req, out := c.ListOriginationNumbersRequest(input) 1905 return out, req.Send() 1906 } 1907 1908 // ListOriginationNumbersWithContext is the same as ListOriginationNumbers with the addition of 1909 // the ability to pass a context and additional request options. 1910 // 1911 // See ListOriginationNumbers for details on how to use this API operation. 1912 // 1913 // The context must be non-nil and will be used for request cancellation. If 1914 // the context is nil a panic will occur. In the future the SDK may create 1915 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1916 // for more information on using Contexts. 1917 func (c *SNS) ListOriginationNumbersWithContext(ctx aws.Context, input *ListOriginationNumbersInput, opts ...request.Option) (*ListOriginationNumbersOutput, error) { 1918 req, out := c.ListOriginationNumbersRequest(input) 1919 req.SetContext(ctx) 1920 req.ApplyOptions(opts...) 1921 return out, req.Send() 1922 } 1923 1924 // ListOriginationNumbersPages iterates over the pages of a ListOriginationNumbers operation, 1925 // calling the "fn" function with the response data for each page. To stop 1926 // iterating, return false from the fn function. 1927 // 1928 // See ListOriginationNumbers method for more information on how to use this operation. 1929 // 1930 // Note: This operation can generate multiple requests to a service. 1931 // 1932 // // Example iterating over at most 3 pages of a ListOriginationNumbers operation. 1933 // pageNum := 0 1934 // err := client.ListOriginationNumbersPages(params, 1935 // func(page *sns.ListOriginationNumbersOutput, lastPage bool) bool { 1936 // pageNum++ 1937 // fmt.Println(page) 1938 // return pageNum <= 3 1939 // }) 1940 // 1941 func (c *SNS) ListOriginationNumbersPages(input *ListOriginationNumbersInput, fn func(*ListOriginationNumbersOutput, bool) bool) error { 1942 return c.ListOriginationNumbersPagesWithContext(aws.BackgroundContext(), input, fn) 1943 } 1944 1945 // ListOriginationNumbersPagesWithContext same as ListOriginationNumbersPages except 1946 // it takes a Context and allows setting request options on the pages. 1947 // 1948 // The context must be non-nil and will be used for request cancellation. If 1949 // the context is nil a panic will occur. In the future the SDK may create 1950 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1951 // for more information on using Contexts. 1952 func (c *SNS) ListOriginationNumbersPagesWithContext(ctx aws.Context, input *ListOriginationNumbersInput, fn func(*ListOriginationNumbersOutput, bool) bool, opts ...request.Option) error { 1953 p := request.Pagination{ 1954 NewRequest: func() (*request.Request, error) { 1955 var inCpy *ListOriginationNumbersInput 1956 if input != nil { 1957 tmp := *input 1958 inCpy = &tmp 1959 } 1960 req, _ := c.ListOriginationNumbersRequest(inCpy) 1961 req.SetContext(ctx) 1962 req.ApplyOptions(opts...) 1963 return req, nil 1964 }, 1965 } 1966 1967 for p.Next() { 1968 if !fn(p.Page().(*ListOriginationNumbersOutput), !p.HasNextPage()) { 1969 break 1970 } 1971 } 1972 1973 return p.Err() 1974 } 1975 1976 const opListPhoneNumbersOptedOut = "ListPhoneNumbersOptedOut" 1977 1978 // ListPhoneNumbersOptedOutRequest generates a "aws/request.Request" representing the 1979 // client's request for the ListPhoneNumbersOptedOut operation. The "output" return 1980 // value will be populated with the request's response once the request completes 1981 // successfully. 1982 // 1983 // Use "Send" method on the returned Request to send the API call to the service. 1984 // the "output" return value is not valid until after Send returns without error. 1985 // 1986 // See ListPhoneNumbersOptedOut for more information on using the ListPhoneNumbersOptedOut 1987 // API call, and error handling. 1988 // 1989 // This method is useful when you want to inject custom logic or configuration 1990 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1991 // 1992 // 1993 // // Example sending a request using the ListPhoneNumbersOptedOutRequest method. 1994 // req, resp := client.ListPhoneNumbersOptedOutRequest(params) 1995 // 1996 // err := req.Send() 1997 // if err == nil { // resp is now filled 1998 // fmt.Println(resp) 1999 // } 2000 // 2001 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListPhoneNumbersOptedOut 2002 func (c *SNS) ListPhoneNumbersOptedOutRequest(input *ListPhoneNumbersOptedOutInput) (req *request.Request, output *ListPhoneNumbersOptedOutOutput) { 2003 op := &request.Operation{ 2004 Name: opListPhoneNumbersOptedOut, 2005 HTTPMethod: "POST", 2006 HTTPPath: "/", 2007 Paginator: &request.Paginator{ 2008 InputTokens: []string{"nextToken"}, 2009 OutputTokens: []string{"nextToken"}, 2010 LimitToken: "", 2011 TruncationToken: "", 2012 }, 2013 } 2014 2015 if input == nil { 2016 input = &ListPhoneNumbersOptedOutInput{} 2017 } 2018 2019 output = &ListPhoneNumbersOptedOutOutput{} 2020 req = c.newRequest(op, input, output) 2021 return 2022 } 2023 2024 // ListPhoneNumbersOptedOut API operation for Amazon Simple Notification Service. 2025 // 2026 // Returns a list of phone numbers that are opted out, meaning you cannot send 2027 // SMS messages to them. 2028 // 2029 // The results for ListPhoneNumbersOptedOut are paginated, and each page returns 2030 // up to 100 phone numbers. If additional phone numbers are available after 2031 // the first page of results, then a NextToken string will be returned. To receive 2032 // the next page, you call ListPhoneNumbersOptedOut again using the NextToken 2033 // string received from the previous call. When there are no more records to 2034 // return, NextToken will be null. 2035 // 2036 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2037 // with awserr.Error's Code and Message methods to get detailed information about 2038 // the error. 2039 // 2040 // See the AWS API reference guide for Amazon Simple Notification Service's 2041 // API operation ListPhoneNumbersOptedOut for usage and error information. 2042 // 2043 // Returned Error Codes: 2044 // * ErrCodeThrottledException "Throttled" 2045 // Indicates that the rate at which requests have been submitted for this action 2046 // exceeds the limit for your account. 2047 // 2048 // * ErrCodeInternalErrorException "InternalError" 2049 // Indicates an internal service error. 2050 // 2051 // * ErrCodeAuthorizationErrorException "AuthorizationError" 2052 // Indicates that the user has been denied access to the requested resource. 2053 // 2054 // * ErrCodeInvalidParameterException "InvalidParameter" 2055 // Indicates that a request parameter does not comply with the associated constraints. 2056 // 2057 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListPhoneNumbersOptedOut 2058 func (c *SNS) ListPhoneNumbersOptedOut(input *ListPhoneNumbersOptedOutInput) (*ListPhoneNumbersOptedOutOutput, error) { 2059 req, out := c.ListPhoneNumbersOptedOutRequest(input) 2060 return out, req.Send() 2061 } 2062 2063 // ListPhoneNumbersOptedOutWithContext is the same as ListPhoneNumbersOptedOut with the addition of 2064 // the ability to pass a context and additional request options. 2065 // 2066 // See ListPhoneNumbersOptedOut for details on how to use this API operation. 2067 // 2068 // The context must be non-nil and will be used for request cancellation. If 2069 // the context is nil a panic will occur. In the future the SDK may create 2070 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2071 // for more information on using Contexts. 2072 func (c *SNS) ListPhoneNumbersOptedOutWithContext(ctx aws.Context, input *ListPhoneNumbersOptedOutInput, opts ...request.Option) (*ListPhoneNumbersOptedOutOutput, error) { 2073 req, out := c.ListPhoneNumbersOptedOutRequest(input) 2074 req.SetContext(ctx) 2075 req.ApplyOptions(opts...) 2076 return out, req.Send() 2077 } 2078 2079 // ListPhoneNumbersOptedOutPages iterates over the pages of a ListPhoneNumbersOptedOut operation, 2080 // calling the "fn" function with the response data for each page. To stop 2081 // iterating, return false from the fn function. 2082 // 2083 // See ListPhoneNumbersOptedOut method for more information on how to use this operation. 2084 // 2085 // Note: This operation can generate multiple requests to a service. 2086 // 2087 // // Example iterating over at most 3 pages of a ListPhoneNumbersOptedOut operation. 2088 // pageNum := 0 2089 // err := client.ListPhoneNumbersOptedOutPages(params, 2090 // func(page *sns.ListPhoneNumbersOptedOutOutput, lastPage bool) bool { 2091 // pageNum++ 2092 // fmt.Println(page) 2093 // return pageNum <= 3 2094 // }) 2095 // 2096 func (c *SNS) ListPhoneNumbersOptedOutPages(input *ListPhoneNumbersOptedOutInput, fn func(*ListPhoneNumbersOptedOutOutput, bool) bool) error { 2097 return c.ListPhoneNumbersOptedOutPagesWithContext(aws.BackgroundContext(), input, fn) 2098 } 2099 2100 // ListPhoneNumbersOptedOutPagesWithContext same as ListPhoneNumbersOptedOutPages except 2101 // it takes a Context and allows setting request options on the pages. 2102 // 2103 // The context must be non-nil and will be used for request cancellation. If 2104 // the context is nil a panic will occur. In the future the SDK may create 2105 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2106 // for more information on using Contexts. 2107 func (c *SNS) ListPhoneNumbersOptedOutPagesWithContext(ctx aws.Context, input *ListPhoneNumbersOptedOutInput, fn func(*ListPhoneNumbersOptedOutOutput, bool) bool, opts ...request.Option) error { 2108 p := request.Pagination{ 2109 NewRequest: func() (*request.Request, error) { 2110 var inCpy *ListPhoneNumbersOptedOutInput 2111 if input != nil { 2112 tmp := *input 2113 inCpy = &tmp 2114 } 2115 req, _ := c.ListPhoneNumbersOptedOutRequest(inCpy) 2116 req.SetContext(ctx) 2117 req.ApplyOptions(opts...) 2118 return req, nil 2119 }, 2120 } 2121 2122 for p.Next() { 2123 if !fn(p.Page().(*ListPhoneNumbersOptedOutOutput), !p.HasNextPage()) { 2124 break 2125 } 2126 } 2127 2128 return p.Err() 2129 } 2130 2131 const opListPlatformApplications = "ListPlatformApplications" 2132 2133 // ListPlatformApplicationsRequest generates a "aws/request.Request" representing the 2134 // client's request for the ListPlatformApplications operation. The "output" return 2135 // value will be populated with the request's response once the request completes 2136 // successfully. 2137 // 2138 // Use "Send" method on the returned Request to send the API call to the service. 2139 // the "output" return value is not valid until after Send returns without error. 2140 // 2141 // See ListPlatformApplications for more information on using the ListPlatformApplications 2142 // API call, and error handling. 2143 // 2144 // This method is useful when you want to inject custom logic or configuration 2145 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2146 // 2147 // 2148 // // Example sending a request using the ListPlatformApplicationsRequest method. 2149 // req, resp := client.ListPlatformApplicationsRequest(params) 2150 // 2151 // err := req.Send() 2152 // if err == nil { // resp is now filled 2153 // fmt.Println(resp) 2154 // } 2155 // 2156 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListPlatformApplications 2157 func (c *SNS) ListPlatformApplicationsRequest(input *ListPlatformApplicationsInput) (req *request.Request, output *ListPlatformApplicationsOutput) { 2158 op := &request.Operation{ 2159 Name: opListPlatformApplications, 2160 HTTPMethod: "POST", 2161 HTTPPath: "/", 2162 Paginator: &request.Paginator{ 2163 InputTokens: []string{"NextToken"}, 2164 OutputTokens: []string{"NextToken"}, 2165 LimitToken: "", 2166 TruncationToken: "", 2167 }, 2168 } 2169 2170 if input == nil { 2171 input = &ListPlatformApplicationsInput{} 2172 } 2173 2174 output = &ListPlatformApplicationsOutput{} 2175 req = c.newRequest(op, input, output) 2176 return 2177 } 2178 2179 // ListPlatformApplications API operation for Amazon Simple Notification Service. 2180 // 2181 // Lists the platform application objects for the supported push notification 2182 // services, such as APNS and GCM (Firebase Cloud Messaging). The results for 2183 // ListPlatformApplications are paginated and return a limited list of applications, 2184 // up to 100. If additional records are available after the first page results, 2185 // then a NextToken string will be returned. To receive the next page, you call 2186 // ListPlatformApplications using the NextToken string received from the previous 2187 // call. When there are no more records to return, NextToken will be null. For 2188 // more information, see Using Amazon SNS Mobile Push Notifications (https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). 2189 // 2190 // This action is throttled at 15 transactions per second (TPS). 2191 // 2192 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2193 // with awserr.Error's Code and Message methods to get detailed information about 2194 // the error. 2195 // 2196 // See the AWS API reference guide for Amazon Simple Notification Service's 2197 // API operation ListPlatformApplications for usage and error information. 2198 // 2199 // Returned Error Codes: 2200 // * ErrCodeInvalidParameterException "InvalidParameter" 2201 // Indicates that a request parameter does not comply with the associated constraints. 2202 // 2203 // * ErrCodeInternalErrorException "InternalError" 2204 // Indicates an internal service error. 2205 // 2206 // * ErrCodeAuthorizationErrorException "AuthorizationError" 2207 // Indicates that the user has been denied access to the requested resource. 2208 // 2209 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListPlatformApplications 2210 func (c *SNS) ListPlatformApplications(input *ListPlatformApplicationsInput) (*ListPlatformApplicationsOutput, error) { 2211 req, out := c.ListPlatformApplicationsRequest(input) 2212 return out, req.Send() 2213 } 2214 2215 // ListPlatformApplicationsWithContext is the same as ListPlatformApplications with the addition of 2216 // the ability to pass a context and additional request options. 2217 // 2218 // See ListPlatformApplications for details on how to use this API operation. 2219 // 2220 // The context must be non-nil and will be used for request cancellation. If 2221 // the context is nil a panic will occur. In the future the SDK may create 2222 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2223 // for more information on using Contexts. 2224 func (c *SNS) ListPlatformApplicationsWithContext(ctx aws.Context, input *ListPlatformApplicationsInput, opts ...request.Option) (*ListPlatformApplicationsOutput, error) { 2225 req, out := c.ListPlatformApplicationsRequest(input) 2226 req.SetContext(ctx) 2227 req.ApplyOptions(opts...) 2228 return out, req.Send() 2229 } 2230 2231 // ListPlatformApplicationsPages iterates over the pages of a ListPlatformApplications operation, 2232 // calling the "fn" function with the response data for each page. To stop 2233 // iterating, return false from the fn function. 2234 // 2235 // See ListPlatformApplications method for more information on how to use this operation. 2236 // 2237 // Note: This operation can generate multiple requests to a service. 2238 // 2239 // // Example iterating over at most 3 pages of a ListPlatformApplications operation. 2240 // pageNum := 0 2241 // err := client.ListPlatformApplicationsPages(params, 2242 // func(page *sns.ListPlatformApplicationsOutput, lastPage bool) bool { 2243 // pageNum++ 2244 // fmt.Println(page) 2245 // return pageNum <= 3 2246 // }) 2247 // 2248 func (c *SNS) ListPlatformApplicationsPages(input *ListPlatformApplicationsInput, fn func(*ListPlatformApplicationsOutput, bool) bool) error { 2249 return c.ListPlatformApplicationsPagesWithContext(aws.BackgroundContext(), input, fn) 2250 } 2251 2252 // ListPlatformApplicationsPagesWithContext same as ListPlatformApplicationsPages except 2253 // it takes a Context and allows setting request options on the pages. 2254 // 2255 // The context must be non-nil and will be used for request cancellation. If 2256 // the context is nil a panic will occur. In the future the SDK may create 2257 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2258 // for more information on using Contexts. 2259 func (c *SNS) ListPlatformApplicationsPagesWithContext(ctx aws.Context, input *ListPlatformApplicationsInput, fn func(*ListPlatformApplicationsOutput, bool) bool, opts ...request.Option) error { 2260 p := request.Pagination{ 2261 NewRequest: func() (*request.Request, error) { 2262 var inCpy *ListPlatformApplicationsInput 2263 if input != nil { 2264 tmp := *input 2265 inCpy = &tmp 2266 } 2267 req, _ := c.ListPlatformApplicationsRequest(inCpy) 2268 req.SetContext(ctx) 2269 req.ApplyOptions(opts...) 2270 return req, nil 2271 }, 2272 } 2273 2274 for p.Next() { 2275 if !fn(p.Page().(*ListPlatformApplicationsOutput), !p.HasNextPage()) { 2276 break 2277 } 2278 } 2279 2280 return p.Err() 2281 } 2282 2283 const opListSMSSandboxPhoneNumbers = "ListSMSSandboxPhoneNumbers" 2284 2285 // ListSMSSandboxPhoneNumbersRequest generates a "aws/request.Request" representing the 2286 // client's request for the ListSMSSandboxPhoneNumbers operation. The "output" return 2287 // value will be populated with the request's response once the request completes 2288 // successfully. 2289 // 2290 // Use "Send" method on the returned Request to send the API call to the service. 2291 // the "output" return value is not valid until after Send returns without error. 2292 // 2293 // See ListSMSSandboxPhoneNumbers for more information on using the ListSMSSandboxPhoneNumbers 2294 // API call, and error handling. 2295 // 2296 // This method is useful when you want to inject custom logic or configuration 2297 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2298 // 2299 // 2300 // // Example sending a request using the ListSMSSandboxPhoneNumbersRequest method. 2301 // req, resp := client.ListSMSSandboxPhoneNumbersRequest(params) 2302 // 2303 // err := req.Send() 2304 // if err == nil { // resp is now filled 2305 // fmt.Println(resp) 2306 // } 2307 // 2308 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListSMSSandboxPhoneNumbers 2309 func (c *SNS) ListSMSSandboxPhoneNumbersRequest(input *ListSMSSandboxPhoneNumbersInput) (req *request.Request, output *ListSMSSandboxPhoneNumbersOutput) { 2310 op := &request.Operation{ 2311 Name: opListSMSSandboxPhoneNumbers, 2312 HTTPMethod: "POST", 2313 HTTPPath: "/", 2314 Paginator: &request.Paginator{ 2315 InputTokens: []string{"NextToken"}, 2316 OutputTokens: []string{"NextToken"}, 2317 LimitToken: "MaxResults", 2318 TruncationToken: "", 2319 }, 2320 } 2321 2322 if input == nil { 2323 input = &ListSMSSandboxPhoneNumbersInput{} 2324 } 2325 2326 output = &ListSMSSandboxPhoneNumbersOutput{} 2327 req = c.newRequest(op, input, output) 2328 return 2329 } 2330 2331 // ListSMSSandboxPhoneNumbers API operation for Amazon Simple Notification Service. 2332 // 2333 // Lists the calling account's current verified and pending destination phone 2334 // numbers in the SMS sandbox. 2335 // 2336 // When you start using Amazon SNS to send SMS messages, your account is in 2337 // the SMS sandbox. The SMS sandbox provides a safe environment for you to try 2338 // Amazon SNS features without risking your reputation as an SMS sender. While 2339 // your account is in the SMS sandbox, you can use all of the features of Amazon 2340 // SNS. However, you can send SMS messages only to verified destination phone 2341 // numbers. For more information, including how to move out of the sandbox to 2342 // send messages without restrictions, see SMS sandbox (https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html) 2343 // in the Amazon SNS Developer Guide. 2344 // 2345 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2346 // with awserr.Error's Code and Message methods to get detailed information about 2347 // the error. 2348 // 2349 // See the AWS API reference guide for Amazon Simple Notification Service's 2350 // API operation ListSMSSandboxPhoneNumbers for usage and error information. 2351 // 2352 // Returned Error Codes: 2353 // * ErrCodeAuthorizationErrorException "AuthorizationError" 2354 // Indicates that the user has been denied access to the requested resource. 2355 // 2356 // * ErrCodeInternalErrorException "InternalError" 2357 // Indicates an internal service error. 2358 // 2359 // * ErrCodeInvalidParameterException "InvalidParameter" 2360 // Indicates that a request parameter does not comply with the associated constraints. 2361 // 2362 // * ErrCodeResourceNotFoundException "ResourceNotFound" 2363 // Can’t perform the action on the specified resource. Make sure that the 2364 // resource exists. 2365 // 2366 // * ErrCodeThrottledException "Throttled" 2367 // Indicates that the rate at which requests have been submitted for this action 2368 // exceeds the limit for your account. 2369 // 2370 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListSMSSandboxPhoneNumbers 2371 func (c *SNS) ListSMSSandboxPhoneNumbers(input *ListSMSSandboxPhoneNumbersInput) (*ListSMSSandboxPhoneNumbersOutput, error) { 2372 req, out := c.ListSMSSandboxPhoneNumbersRequest(input) 2373 return out, req.Send() 2374 } 2375 2376 // ListSMSSandboxPhoneNumbersWithContext is the same as ListSMSSandboxPhoneNumbers with the addition of 2377 // the ability to pass a context and additional request options. 2378 // 2379 // See ListSMSSandboxPhoneNumbers for details on how to use this API operation. 2380 // 2381 // The context must be non-nil and will be used for request cancellation. If 2382 // the context is nil a panic will occur. In the future the SDK may create 2383 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2384 // for more information on using Contexts. 2385 func (c *SNS) ListSMSSandboxPhoneNumbersWithContext(ctx aws.Context, input *ListSMSSandboxPhoneNumbersInput, opts ...request.Option) (*ListSMSSandboxPhoneNumbersOutput, error) { 2386 req, out := c.ListSMSSandboxPhoneNumbersRequest(input) 2387 req.SetContext(ctx) 2388 req.ApplyOptions(opts...) 2389 return out, req.Send() 2390 } 2391 2392 // ListSMSSandboxPhoneNumbersPages iterates over the pages of a ListSMSSandboxPhoneNumbers operation, 2393 // calling the "fn" function with the response data for each page. To stop 2394 // iterating, return false from the fn function. 2395 // 2396 // See ListSMSSandboxPhoneNumbers method for more information on how to use this operation. 2397 // 2398 // Note: This operation can generate multiple requests to a service. 2399 // 2400 // // Example iterating over at most 3 pages of a ListSMSSandboxPhoneNumbers operation. 2401 // pageNum := 0 2402 // err := client.ListSMSSandboxPhoneNumbersPages(params, 2403 // func(page *sns.ListSMSSandboxPhoneNumbersOutput, lastPage bool) bool { 2404 // pageNum++ 2405 // fmt.Println(page) 2406 // return pageNum <= 3 2407 // }) 2408 // 2409 func (c *SNS) ListSMSSandboxPhoneNumbersPages(input *ListSMSSandboxPhoneNumbersInput, fn func(*ListSMSSandboxPhoneNumbersOutput, bool) bool) error { 2410 return c.ListSMSSandboxPhoneNumbersPagesWithContext(aws.BackgroundContext(), input, fn) 2411 } 2412 2413 // ListSMSSandboxPhoneNumbersPagesWithContext same as ListSMSSandboxPhoneNumbersPages except 2414 // it takes a Context and allows setting request options on the pages. 2415 // 2416 // The context must be non-nil and will be used for request cancellation. If 2417 // the context is nil a panic will occur. In the future the SDK may create 2418 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2419 // for more information on using Contexts. 2420 func (c *SNS) ListSMSSandboxPhoneNumbersPagesWithContext(ctx aws.Context, input *ListSMSSandboxPhoneNumbersInput, fn func(*ListSMSSandboxPhoneNumbersOutput, bool) bool, opts ...request.Option) error { 2421 p := request.Pagination{ 2422 NewRequest: func() (*request.Request, error) { 2423 var inCpy *ListSMSSandboxPhoneNumbersInput 2424 if input != nil { 2425 tmp := *input 2426 inCpy = &tmp 2427 } 2428 req, _ := c.ListSMSSandboxPhoneNumbersRequest(inCpy) 2429 req.SetContext(ctx) 2430 req.ApplyOptions(opts...) 2431 return req, nil 2432 }, 2433 } 2434 2435 for p.Next() { 2436 if !fn(p.Page().(*ListSMSSandboxPhoneNumbersOutput), !p.HasNextPage()) { 2437 break 2438 } 2439 } 2440 2441 return p.Err() 2442 } 2443 2444 const opListSubscriptions = "ListSubscriptions" 2445 2446 // ListSubscriptionsRequest generates a "aws/request.Request" representing the 2447 // client's request for the ListSubscriptions operation. The "output" return 2448 // value will be populated with the request's response once the request completes 2449 // successfully. 2450 // 2451 // Use "Send" method on the returned Request to send the API call to the service. 2452 // the "output" return value is not valid until after Send returns without error. 2453 // 2454 // See ListSubscriptions for more information on using the ListSubscriptions 2455 // API call, and error handling. 2456 // 2457 // This method is useful when you want to inject custom logic or configuration 2458 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2459 // 2460 // 2461 // // Example sending a request using the ListSubscriptionsRequest method. 2462 // req, resp := client.ListSubscriptionsRequest(params) 2463 // 2464 // err := req.Send() 2465 // if err == nil { // resp is now filled 2466 // fmt.Println(resp) 2467 // } 2468 // 2469 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListSubscriptions 2470 func (c *SNS) ListSubscriptionsRequest(input *ListSubscriptionsInput) (req *request.Request, output *ListSubscriptionsOutput) { 2471 op := &request.Operation{ 2472 Name: opListSubscriptions, 2473 HTTPMethod: "POST", 2474 HTTPPath: "/", 2475 Paginator: &request.Paginator{ 2476 InputTokens: []string{"NextToken"}, 2477 OutputTokens: []string{"NextToken"}, 2478 LimitToken: "", 2479 TruncationToken: "", 2480 }, 2481 } 2482 2483 if input == nil { 2484 input = &ListSubscriptionsInput{} 2485 } 2486 2487 output = &ListSubscriptionsOutput{} 2488 req = c.newRequest(op, input, output) 2489 return 2490 } 2491 2492 // ListSubscriptions API operation for Amazon Simple Notification Service. 2493 // 2494 // Returns a list of the requester's subscriptions. Each call returns a limited 2495 // list of subscriptions, up to 100. If there are more subscriptions, a NextToken 2496 // is also returned. Use the NextToken parameter in a new ListSubscriptions 2497 // call to get further results. 2498 // 2499 // This action is throttled at 30 transactions per second (TPS). 2500 // 2501 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2502 // with awserr.Error's Code and Message methods to get detailed information about 2503 // the error. 2504 // 2505 // See the AWS API reference guide for Amazon Simple Notification Service's 2506 // API operation ListSubscriptions for usage and error information. 2507 // 2508 // Returned Error Codes: 2509 // * ErrCodeInvalidParameterException "InvalidParameter" 2510 // Indicates that a request parameter does not comply with the associated constraints. 2511 // 2512 // * ErrCodeInternalErrorException "InternalError" 2513 // Indicates an internal service error. 2514 // 2515 // * ErrCodeAuthorizationErrorException "AuthorizationError" 2516 // Indicates that the user has been denied access to the requested resource. 2517 // 2518 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListSubscriptions 2519 func (c *SNS) ListSubscriptions(input *ListSubscriptionsInput) (*ListSubscriptionsOutput, error) { 2520 req, out := c.ListSubscriptionsRequest(input) 2521 return out, req.Send() 2522 } 2523 2524 // ListSubscriptionsWithContext is the same as ListSubscriptions with the addition of 2525 // the ability to pass a context and additional request options. 2526 // 2527 // See ListSubscriptions for details on how to use this API operation. 2528 // 2529 // The context must be non-nil and will be used for request cancellation. If 2530 // the context is nil a panic will occur. In the future the SDK may create 2531 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2532 // for more information on using Contexts. 2533 func (c *SNS) ListSubscriptionsWithContext(ctx aws.Context, input *ListSubscriptionsInput, opts ...request.Option) (*ListSubscriptionsOutput, error) { 2534 req, out := c.ListSubscriptionsRequest(input) 2535 req.SetContext(ctx) 2536 req.ApplyOptions(opts...) 2537 return out, req.Send() 2538 } 2539 2540 // ListSubscriptionsPages iterates over the pages of a ListSubscriptions operation, 2541 // calling the "fn" function with the response data for each page. To stop 2542 // iterating, return false from the fn function. 2543 // 2544 // See ListSubscriptions method for more information on how to use this operation. 2545 // 2546 // Note: This operation can generate multiple requests to a service. 2547 // 2548 // // Example iterating over at most 3 pages of a ListSubscriptions operation. 2549 // pageNum := 0 2550 // err := client.ListSubscriptionsPages(params, 2551 // func(page *sns.ListSubscriptionsOutput, lastPage bool) bool { 2552 // pageNum++ 2553 // fmt.Println(page) 2554 // return pageNum <= 3 2555 // }) 2556 // 2557 func (c *SNS) ListSubscriptionsPages(input *ListSubscriptionsInput, fn func(*ListSubscriptionsOutput, bool) bool) error { 2558 return c.ListSubscriptionsPagesWithContext(aws.BackgroundContext(), input, fn) 2559 } 2560 2561 // ListSubscriptionsPagesWithContext same as ListSubscriptionsPages except 2562 // it takes a Context and allows setting request options on the pages. 2563 // 2564 // The context must be non-nil and will be used for request cancellation. If 2565 // the context is nil a panic will occur. In the future the SDK may create 2566 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2567 // for more information on using Contexts. 2568 func (c *SNS) ListSubscriptionsPagesWithContext(ctx aws.Context, input *ListSubscriptionsInput, fn func(*ListSubscriptionsOutput, bool) bool, opts ...request.Option) error { 2569 p := request.Pagination{ 2570 NewRequest: func() (*request.Request, error) { 2571 var inCpy *ListSubscriptionsInput 2572 if input != nil { 2573 tmp := *input 2574 inCpy = &tmp 2575 } 2576 req, _ := c.ListSubscriptionsRequest(inCpy) 2577 req.SetContext(ctx) 2578 req.ApplyOptions(opts...) 2579 return req, nil 2580 }, 2581 } 2582 2583 for p.Next() { 2584 if !fn(p.Page().(*ListSubscriptionsOutput), !p.HasNextPage()) { 2585 break 2586 } 2587 } 2588 2589 return p.Err() 2590 } 2591 2592 const opListSubscriptionsByTopic = "ListSubscriptionsByTopic" 2593 2594 // ListSubscriptionsByTopicRequest generates a "aws/request.Request" representing the 2595 // client's request for the ListSubscriptionsByTopic operation. The "output" return 2596 // value will be populated with the request's response once the request completes 2597 // successfully. 2598 // 2599 // Use "Send" method on the returned Request to send the API call to the service. 2600 // the "output" return value is not valid until after Send returns without error. 2601 // 2602 // See ListSubscriptionsByTopic for more information on using the ListSubscriptionsByTopic 2603 // API call, and error handling. 2604 // 2605 // This method is useful when you want to inject custom logic or configuration 2606 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2607 // 2608 // 2609 // // Example sending a request using the ListSubscriptionsByTopicRequest method. 2610 // req, resp := client.ListSubscriptionsByTopicRequest(params) 2611 // 2612 // err := req.Send() 2613 // if err == nil { // resp is now filled 2614 // fmt.Println(resp) 2615 // } 2616 // 2617 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListSubscriptionsByTopic 2618 func (c *SNS) ListSubscriptionsByTopicRequest(input *ListSubscriptionsByTopicInput) (req *request.Request, output *ListSubscriptionsByTopicOutput) { 2619 op := &request.Operation{ 2620 Name: opListSubscriptionsByTopic, 2621 HTTPMethod: "POST", 2622 HTTPPath: "/", 2623 Paginator: &request.Paginator{ 2624 InputTokens: []string{"NextToken"}, 2625 OutputTokens: []string{"NextToken"}, 2626 LimitToken: "", 2627 TruncationToken: "", 2628 }, 2629 } 2630 2631 if input == nil { 2632 input = &ListSubscriptionsByTopicInput{} 2633 } 2634 2635 output = &ListSubscriptionsByTopicOutput{} 2636 req = c.newRequest(op, input, output) 2637 return 2638 } 2639 2640 // ListSubscriptionsByTopic API operation for Amazon Simple Notification Service. 2641 // 2642 // Returns a list of the subscriptions to a specific topic. Each call returns 2643 // a limited list of subscriptions, up to 100. If there are more subscriptions, 2644 // a NextToken is also returned. Use the NextToken parameter in a new ListSubscriptionsByTopic 2645 // call to get further results. 2646 // 2647 // This action is throttled at 30 transactions per second (TPS). 2648 // 2649 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2650 // with awserr.Error's Code and Message methods to get detailed information about 2651 // the error. 2652 // 2653 // See the AWS API reference guide for Amazon Simple Notification Service's 2654 // API operation ListSubscriptionsByTopic for usage and error information. 2655 // 2656 // Returned Error Codes: 2657 // * ErrCodeInvalidParameterException "InvalidParameter" 2658 // Indicates that a request parameter does not comply with the associated constraints. 2659 // 2660 // * ErrCodeInternalErrorException "InternalError" 2661 // Indicates an internal service error. 2662 // 2663 // * ErrCodeNotFoundException "NotFound" 2664 // Indicates that the requested resource does not exist. 2665 // 2666 // * ErrCodeAuthorizationErrorException "AuthorizationError" 2667 // Indicates that the user has been denied access to the requested resource. 2668 // 2669 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListSubscriptionsByTopic 2670 func (c *SNS) ListSubscriptionsByTopic(input *ListSubscriptionsByTopicInput) (*ListSubscriptionsByTopicOutput, error) { 2671 req, out := c.ListSubscriptionsByTopicRequest(input) 2672 return out, req.Send() 2673 } 2674 2675 // ListSubscriptionsByTopicWithContext is the same as ListSubscriptionsByTopic with the addition of 2676 // the ability to pass a context and additional request options. 2677 // 2678 // See ListSubscriptionsByTopic for details on how to use this API operation. 2679 // 2680 // The context must be non-nil and will be used for request cancellation. If 2681 // the context is nil a panic will occur. In the future the SDK may create 2682 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2683 // for more information on using Contexts. 2684 func (c *SNS) ListSubscriptionsByTopicWithContext(ctx aws.Context, input *ListSubscriptionsByTopicInput, opts ...request.Option) (*ListSubscriptionsByTopicOutput, error) { 2685 req, out := c.ListSubscriptionsByTopicRequest(input) 2686 req.SetContext(ctx) 2687 req.ApplyOptions(opts...) 2688 return out, req.Send() 2689 } 2690 2691 // ListSubscriptionsByTopicPages iterates over the pages of a ListSubscriptionsByTopic operation, 2692 // calling the "fn" function with the response data for each page. To stop 2693 // iterating, return false from the fn function. 2694 // 2695 // See ListSubscriptionsByTopic method for more information on how to use this operation. 2696 // 2697 // Note: This operation can generate multiple requests to a service. 2698 // 2699 // // Example iterating over at most 3 pages of a ListSubscriptionsByTopic operation. 2700 // pageNum := 0 2701 // err := client.ListSubscriptionsByTopicPages(params, 2702 // func(page *sns.ListSubscriptionsByTopicOutput, lastPage bool) bool { 2703 // pageNum++ 2704 // fmt.Println(page) 2705 // return pageNum <= 3 2706 // }) 2707 // 2708 func (c *SNS) ListSubscriptionsByTopicPages(input *ListSubscriptionsByTopicInput, fn func(*ListSubscriptionsByTopicOutput, bool) bool) error { 2709 return c.ListSubscriptionsByTopicPagesWithContext(aws.BackgroundContext(), input, fn) 2710 } 2711 2712 // ListSubscriptionsByTopicPagesWithContext same as ListSubscriptionsByTopicPages except 2713 // it takes a Context and allows setting request options on the pages. 2714 // 2715 // The context must be non-nil and will be used for request cancellation. If 2716 // the context is nil a panic will occur. In the future the SDK may create 2717 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2718 // for more information on using Contexts. 2719 func (c *SNS) ListSubscriptionsByTopicPagesWithContext(ctx aws.Context, input *ListSubscriptionsByTopicInput, fn func(*ListSubscriptionsByTopicOutput, bool) bool, opts ...request.Option) error { 2720 p := request.Pagination{ 2721 NewRequest: func() (*request.Request, error) { 2722 var inCpy *ListSubscriptionsByTopicInput 2723 if input != nil { 2724 tmp := *input 2725 inCpy = &tmp 2726 } 2727 req, _ := c.ListSubscriptionsByTopicRequest(inCpy) 2728 req.SetContext(ctx) 2729 req.ApplyOptions(opts...) 2730 return req, nil 2731 }, 2732 } 2733 2734 for p.Next() { 2735 if !fn(p.Page().(*ListSubscriptionsByTopicOutput), !p.HasNextPage()) { 2736 break 2737 } 2738 } 2739 2740 return p.Err() 2741 } 2742 2743 const opListTagsForResource = "ListTagsForResource" 2744 2745 // ListTagsForResourceRequest generates a "aws/request.Request" representing the 2746 // client's request for the ListTagsForResource operation. The "output" return 2747 // value will be populated with the request's response once the request completes 2748 // successfully. 2749 // 2750 // Use "Send" method on the returned Request to send the API call to the service. 2751 // the "output" return value is not valid until after Send returns without error. 2752 // 2753 // See ListTagsForResource for more information on using the ListTagsForResource 2754 // API call, and error handling. 2755 // 2756 // This method is useful when you want to inject custom logic or configuration 2757 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2758 // 2759 // 2760 // // Example sending a request using the ListTagsForResourceRequest method. 2761 // req, resp := client.ListTagsForResourceRequest(params) 2762 // 2763 // err := req.Send() 2764 // if err == nil { // resp is now filled 2765 // fmt.Println(resp) 2766 // } 2767 // 2768 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListTagsForResource 2769 func (c *SNS) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 2770 op := &request.Operation{ 2771 Name: opListTagsForResource, 2772 HTTPMethod: "POST", 2773 HTTPPath: "/", 2774 } 2775 2776 if input == nil { 2777 input = &ListTagsForResourceInput{} 2778 } 2779 2780 output = &ListTagsForResourceOutput{} 2781 req = c.newRequest(op, input, output) 2782 return 2783 } 2784 2785 // ListTagsForResource API operation for Amazon Simple Notification Service. 2786 // 2787 // List all tags added to the specified Amazon SNS topic. For an overview, see 2788 // Amazon SNS Tags (https://docs.aws.amazon.com/sns/latest/dg/sns-tags.html) 2789 // in the Amazon Simple Notification Service Developer Guide. 2790 // 2791 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2792 // with awserr.Error's Code and Message methods to get detailed information about 2793 // the error. 2794 // 2795 // See the AWS API reference guide for Amazon Simple Notification Service's 2796 // API operation ListTagsForResource for usage and error information. 2797 // 2798 // Returned Error Codes: 2799 // * ErrCodeResourceNotFoundException "ResourceNotFound" 2800 // Can’t perform the action on the specified resource. Make sure that the 2801 // resource exists. 2802 // 2803 // * ErrCodeTagPolicyException "TagPolicy" 2804 // The request doesn't comply with the IAM tag policy. Correct your request 2805 // and then retry it. 2806 // 2807 // * ErrCodeInvalidParameterException "InvalidParameter" 2808 // Indicates that a request parameter does not comply with the associated constraints. 2809 // 2810 // * ErrCodeAuthorizationErrorException "AuthorizationError" 2811 // Indicates that the user has been denied access to the requested resource. 2812 // 2813 // * ErrCodeConcurrentAccessException "ConcurrentAccess" 2814 // Can't perform multiple operations on a tag simultaneously. Perform the operations 2815 // sequentially. 2816 // 2817 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListTagsForResource 2818 func (c *SNS) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 2819 req, out := c.ListTagsForResourceRequest(input) 2820 return out, req.Send() 2821 } 2822 2823 // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 2824 // the ability to pass a context and additional request options. 2825 // 2826 // See ListTagsForResource for details on how to use this API operation. 2827 // 2828 // The context must be non-nil and will be used for request cancellation. If 2829 // the context is nil a panic will occur. In the future the SDK may create 2830 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2831 // for more information on using Contexts. 2832 func (c *SNS) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 2833 req, out := c.ListTagsForResourceRequest(input) 2834 req.SetContext(ctx) 2835 req.ApplyOptions(opts...) 2836 return out, req.Send() 2837 } 2838 2839 const opListTopics = "ListTopics" 2840 2841 // ListTopicsRequest generates a "aws/request.Request" representing the 2842 // client's request for the ListTopics operation. The "output" return 2843 // value will be populated with the request's response once the request completes 2844 // successfully. 2845 // 2846 // Use "Send" method on the returned Request to send the API call to the service. 2847 // the "output" return value is not valid until after Send returns without error. 2848 // 2849 // See ListTopics for more information on using the ListTopics 2850 // API call, and error handling. 2851 // 2852 // This method is useful when you want to inject custom logic or configuration 2853 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2854 // 2855 // 2856 // // Example sending a request using the ListTopicsRequest method. 2857 // req, resp := client.ListTopicsRequest(params) 2858 // 2859 // err := req.Send() 2860 // if err == nil { // resp is now filled 2861 // fmt.Println(resp) 2862 // } 2863 // 2864 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListTopics 2865 func (c *SNS) ListTopicsRequest(input *ListTopicsInput) (req *request.Request, output *ListTopicsOutput) { 2866 op := &request.Operation{ 2867 Name: opListTopics, 2868 HTTPMethod: "POST", 2869 HTTPPath: "/", 2870 Paginator: &request.Paginator{ 2871 InputTokens: []string{"NextToken"}, 2872 OutputTokens: []string{"NextToken"}, 2873 LimitToken: "", 2874 TruncationToken: "", 2875 }, 2876 } 2877 2878 if input == nil { 2879 input = &ListTopicsInput{} 2880 } 2881 2882 output = &ListTopicsOutput{} 2883 req = c.newRequest(op, input, output) 2884 return 2885 } 2886 2887 // ListTopics API operation for Amazon Simple Notification Service. 2888 // 2889 // Returns a list of the requester's topics. Each call returns a limited list 2890 // of topics, up to 100. If there are more topics, a NextToken is also returned. 2891 // Use the NextToken parameter in a new ListTopics call to get further results. 2892 // 2893 // This action is throttled at 30 transactions per second (TPS). 2894 // 2895 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2896 // with awserr.Error's Code and Message methods to get detailed information about 2897 // the error. 2898 // 2899 // See the AWS API reference guide for Amazon Simple Notification Service's 2900 // API operation ListTopics for usage and error information. 2901 // 2902 // Returned Error Codes: 2903 // * ErrCodeInvalidParameterException "InvalidParameter" 2904 // Indicates that a request parameter does not comply with the associated constraints. 2905 // 2906 // * ErrCodeInternalErrorException "InternalError" 2907 // Indicates an internal service error. 2908 // 2909 // * ErrCodeAuthorizationErrorException "AuthorizationError" 2910 // Indicates that the user has been denied access to the requested resource. 2911 // 2912 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListTopics 2913 func (c *SNS) ListTopics(input *ListTopicsInput) (*ListTopicsOutput, error) { 2914 req, out := c.ListTopicsRequest(input) 2915 return out, req.Send() 2916 } 2917 2918 // ListTopicsWithContext is the same as ListTopics with the addition of 2919 // the ability to pass a context and additional request options. 2920 // 2921 // See ListTopics for details on how to use this API operation. 2922 // 2923 // The context must be non-nil and will be used for request cancellation. If 2924 // the context is nil a panic will occur. In the future the SDK may create 2925 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2926 // for more information on using Contexts. 2927 func (c *SNS) ListTopicsWithContext(ctx aws.Context, input *ListTopicsInput, opts ...request.Option) (*ListTopicsOutput, error) { 2928 req, out := c.ListTopicsRequest(input) 2929 req.SetContext(ctx) 2930 req.ApplyOptions(opts...) 2931 return out, req.Send() 2932 } 2933 2934 // ListTopicsPages iterates over the pages of a ListTopics operation, 2935 // calling the "fn" function with the response data for each page. To stop 2936 // iterating, return false from the fn function. 2937 // 2938 // See ListTopics method for more information on how to use this operation. 2939 // 2940 // Note: This operation can generate multiple requests to a service. 2941 // 2942 // // Example iterating over at most 3 pages of a ListTopics operation. 2943 // pageNum := 0 2944 // err := client.ListTopicsPages(params, 2945 // func(page *sns.ListTopicsOutput, lastPage bool) bool { 2946 // pageNum++ 2947 // fmt.Println(page) 2948 // return pageNum <= 3 2949 // }) 2950 // 2951 func (c *SNS) ListTopicsPages(input *ListTopicsInput, fn func(*ListTopicsOutput, bool) bool) error { 2952 return c.ListTopicsPagesWithContext(aws.BackgroundContext(), input, fn) 2953 } 2954 2955 // ListTopicsPagesWithContext same as ListTopicsPages except 2956 // it takes a Context and allows setting request options on the pages. 2957 // 2958 // The context must be non-nil and will be used for request cancellation. If 2959 // the context is nil a panic will occur. In the future the SDK may create 2960 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2961 // for more information on using Contexts. 2962 func (c *SNS) ListTopicsPagesWithContext(ctx aws.Context, input *ListTopicsInput, fn func(*ListTopicsOutput, bool) bool, opts ...request.Option) error { 2963 p := request.Pagination{ 2964 NewRequest: func() (*request.Request, error) { 2965 var inCpy *ListTopicsInput 2966 if input != nil { 2967 tmp := *input 2968 inCpy = &tmp 2969 } 2970 req, _ := c.ListTopicsRequest(inCpy) 2971 req.SetContext(ctx) 2972 req.ApplyOptions(opts...) 2973 return req, nil 2974 }, 2975 } 2976 2977 for p.Next() { 2978 if !fn(p.Page().(*ListTopicsOutput), !p.HasNextPage()) { 2979 break 2980 } 2981 } 2982 2983 return p.Err() 2984 } 2985 2986 const opOptInPhoneNumber = "OptInPhoneNumber" 2987 2988 // OptInPhoneNumberRequest generates a "aws/request.Request" representing the 2989 // client's request for the OptInPhoneNumber operation. The "output" return 2990 // value will be populated with the request's response once the request completes 2991 // successfully. 2992 // 2993 // Use "Send" method on the returned Request to send the API call to the service. 2994 // the "output" return value is not valid until after Send returns without error. 2995 // 2996 // See OptInPhoneNumber for more information on using the OptInPhoneNumber 2997 // API call, and error handling. 2998 // 2999 // This method is useful when you want to inject custom logic or configuration 3000 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 3001 // 3002 // 3003 // // Example sending a request using the OptInPhoneNumberRequest method. 3004 // req, resp := client.OptInPhoneNumberRequest(params) 3005 // 3006 // err := req.Send() 3007 // if err == nil { // resp is now filled 3008 // fmt.Println(resp) 3009 // } 3010 // 3011 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/OptInPhoneNumber 3012 func (c *SNS) OptInPhoneNumberRequest(input *OptInPhoneNumberInput) (req *request.Request, output *OptInPhoneNumberOutput) { 3013 op := &request.Operation{ 3014 Name: opOptInPhoneNumber, 3015 HTTPMethod: "POST", 3016 HTTPPath: "/", 3017 } 3018 3019 if input == nil { 3020 input = &OptInPhoneNumberInput{} 3021 } 3022 3023 output = &OptInPhoneNumberOutput{} 3024 req = c.newRequest(op, input, output) 3025 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3026 return 3027 } 3028 3029 // OptInPhoneNumber API operation for Amazon Simple Notification Service. 3030 // 3031 // Use this request to opt in a phone number that is opted out, which enables 3032 // you to resume sending SMS messages to the number. 3033 // 3034 // You can opt in a phone number only once every 30 days. 3035 // 3036 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3037 // with awserr.Error's Code and Message methods to get detailed information about 3038 // the error. 3039 // 3040 // See the AWS API reference guide for Amazon Simple Notification Service's 3041 // API operation OptInPhoneNumber for usage and error information. 3042 // 3043 // Returned Error Codes: 3044 // * ErrCodeThrottledException "Throttled" 3045 // Indicates that the rate at which requests have been submitted for this action 3046 // exceeds the limit for your account. 3047 // 3048 // * ErrCodeInternalErrorException "InternalError" 3049 // Indicates an internal service error. 3050 // 3051 // * ErrCodeAuthorizationErrorException "AuthorizationError" 3052 // Indicates that the user has been denied access to the requested resource. 3053 // 3054 // * ErrCodeInvalidParameterException "InvalidParameter" 3055 // Indicates that a request parameter does not comply with the associated constraints. 3056 // 3057 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/OptInPhoneNumber 3058 func (c *SNS) OptInPhoneNumber(input *OptInPhoneNumberInput) (*OptInPhoneNumberOutput, error) { 3059 req, out := c.OptInPhoneNumberRequest(input) 3060 return out, req.Send() 3061 } 3062 3063 // OptInPhoneNumberWithContext is the same as OptInPhoneNumber with the addition of 3064 // the ability to pass a context and additional request options. 3065 // 3066 // See OptInPhoneNumber for details on how to use this API operation. 3067 // 3068 // The context must be non-nil and will be used for request cancellation. If 3069 // the context is nil a panic will occur. In the future the SDK may create 3070 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3071 // for more information on using Contexts. 3072 func (c *SNS) OptInPhoneNumberWithContext(ctx aws.Context, input *OptInPhoneNumberInput, opts ...request.Option) (*OptInPhoneNumberOutput, error) { 3073 req, out := c.OptInPhoneNumberRequest(input) 3074 req.SetContext(ctx) 3075 req.ApplyOptions(opts...) 3076 return out, req.Send() 3077 } 3078 3079 const opPublish = "Publish" 3080 3081 // PublishRequest generates a "aws/request.Request" representing the 3082 // client's request for the Publish operation. The "output" return 3083 // value will be populated with the request's response once the request completes 3084 // successfully. 3085 // 3086 // Use "Send" method on the returned Request to send the API call to the service. 3087 // the "output" return value is not valid until after Send returns without error. 3088 // 3089 // See Publish for more information on using the Publish 3090 // API call, and error handling. 3091 // 3092 // This method is useful when you want to inject custom logic or configuration 3093 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 3094 // 3095 // 3096 // // Example sending a request using the PublishRequest method. 3097 // req, resp := client.PublishRequest(params) 3098 // 3099 // err := req.Send() 3100 // if err == nil { // resp is now filled 3101 // fmt.Println(resp) 3102 // } 3103 // 3104 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Publish 3105 func (c *SNS) PublishRequest(input *PublishInput) (req *request.Request, output *PublishOutput) { 3106 op := &request.Operation{ 3107 Name: opPublish, 3108 HTTPMethod: "POST", 3109 HTTPPath: "/", 3110 } 3111 3112 if input == nil { 3113 input = &PublishInput{} 3114 } 3115 3116 output = &PublishOutput{} 3117 req = c.newRequest(op, input, output) 3118 return 3119 } 3120 3121 // Publish API operation for Amazon Simple Notification Service. 3122 // 3123 // Sends a message to an Amazon SNS topic, a text message (SMS message) directly 3124 // to a phone number, or a message to a mobile platform endpoint (when you specify 3125 // the TargetArn). 3126 // 3127 // If you send a message to a topic, Amazon SNS delivers the message to each 3128 // endpoint that is subscribed to the topic. The format of the message depends 3129 // on the notification protocol for each subscribed endpoint. 3130 // 3131 // When a messageId is returned, the message has been saved and Amazon SNS will 3132 // attempt to deliver it shortly. 3133 // 3134 // To use the Publish action for sending a message to a mobile endpoint, such 3135 // as an app on a Kindle device or mobile phone, you must specify the EndpointArn 3136 // for the TargetArn parameter. The EndpointArn is returned when making a call 3137 // with the CreatePlatformEndpoint action. 3138 // 3139 // For more information about formatting messages, see Send Custom Platform-Specific 3140 // Payloads in Messages to Mobile Devices (https://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-custommessage.html). 3141 // 3142 // You can publish messages only to topics and endpoints in the same Region. 3143 // 3144 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3145 // with awserr.Error's Code and Message methods to get detailed information about 3146 // the error. 3147 // 3148 // See the AWS API reference guide for Amazon Simple Notification Service's 3149 // API operation Publish for usage and error information. 3150 // 3151 // Returned Error Codes: 3152 // * ErrCodeInvalidParameterException "InvalidParameter" 3153 // Indicates that a request parameter does not comply with the associated constraints. 3154 // 3155 // * ErrCodeInvalidParameterValueException "ParameterValueInvalid" 3156 // Indicates that a request parameter does not comply with the associated constraints. 3157 // 3158 // * ErrCodeInternalErrorException "InternalError" 3159 // Indicates an internal service error. 3160 // 3161 // * ErrCodeNotFoundException "NotFound" 3162 // Indicates that the requested resource does not exist. 3163 // 3164 // * ErrCodeEndpointDisabledException "EndpointDisabled" 3165 // Exception error indicating endpoint disabled. 3166 // 3167 // * ErrCodePlatformApplicationDisabledException "PlatformApplicationDisabled" 3168 // Exception error indicating platform application disabled. 3169 // 3170 // * ErrCodeAuthorizationErrorException "AuthorizationError" 3171 // Indicates that the user has been denied access to the requested resource. 3172 // 3173 // * ErrCodeKMSDisabledException "KMSDisabled" 3174 // The request was rejected because the specified customer master key (CMK) 3175 // isn't enabled. 3176 // 3177 // * ErrCodeKMSInvalidStateException "KMSInvalidState" 3178 // The request was rejected because the state of the specified resource isn't 3179 // valid for this request. For more information, see How Key State Affects Use 3180 // of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) 3181 // in the Key Management Service Developer Guide. 3182 // 3183 // * ErrCodeKMSNotFoundException "KMSNotFound" 3184 // The request was rejected because the specified entity or resource can't be 3185 // found. 3186 // 3187 // * ErrCodeKMSOptInRequired "KMSOptInRequired" 3188 // The Amazon Web Services access key ID needs a subscription for the service. 3189 // 3190 // * ErrCodeKMSThrottlingException "KMSThrottling" 3191 // The request was denied due to request throttling. For more information about 3192 // throttling, see Limits (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second) 3193 // in the Key Management Service Developer Guide. 3194 // 3195 // * ErrCodeKMSAccessDeniedException "KMSAccessDenied" 3196 // The ciphertext references a key that doesn't exist or that you don't have 3197 // access to. 3198 // 3199 // * ErrCodeInvalidSecurityException "InvalidSecurity" 3200 // The credential signature isn't valid. You must use an HTTPS endpoint and 3201 // sign your request using Signature Version 4. 3202 // 3203 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Publish 3204 func (c *SNS) Publish(input *PublishInput) (*PublishOutput, error) { 3205 req, out := c.PublishRequest(input) 3206 return out, req.Send() 3207 } 3208 3209 // PublishWithContext is the same as Publish with the addition of 3210 // the ability to pass a context and additional request options. 3211 // 3212 // See Publish for details on how to use this API operation. 3213 // 3214 // The context must be non-nil and will be used for request cancellation. If 3215 // the context is nil a panic will occur. In the future the SDK may create 3216 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3217 // for more information on using Contexts. 3218 func (c *SNS) PublishWithContext(ctx aws.Context, input *PublishInput, opts ...request.Option) (*PublishOutput, error) { 3219 req, out := c.PublishRequest(input) 3220 req.SetContext(ctx) 3221 req.ApplyOptions(opts...) 3222 return out, req.Send() 3223 } 3224 3225 const opRemovePermission = "RemovePermission" 3226 3227 // RemovePermissionRequest generates a "aws/request.Request" representing the 3228 // client's request for the RemovePermission operation. The "output" return 3229 // value will be populated with the request's response once the request completes 3230 // successfully. 3231 // 3232 // Use "Send" method on the returned Request to send the API call to the service. 3233 // the "output" return value is not valid until after Send returns without error. 3234 // 3235 // See RemovePermission for more information on using the RemovePermission 3236 // API call, and error handling. 3237 // 3238 // This method is useful when you want to inject custom logic or configuration 3239 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 3240 // 3241 // 3242 // // Example sending a request using the RemovePermissionRequest method. 3243 // req, resp := client.RemovePermissionRequest(params) 3244 // 3245 // err := req.Send() 3246 // if err == nil { // resp is now filled 3247 // fmt.Println(resp) 3248 // } 3249 // 3250 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/RemovePermission 3251 func (c *SNS) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) { 3252 op := &request.Operation{ 3253 Name: opRemovePermission, 3254 HTTPMethod: "POST", 3255 HTTPPath: "/", 3256 } 3257 3258 if input == nil { 3259 input = &RemovePermissionInput{} 3260 } 3261 3262 output = &RemovePermissionOutput{} 3263 req = c.newRequest(op, input, output) 3264 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3265 return 3266 } 3267 3268 // RemovePermission API operation for Amazon Simple Notification Service. 3269 // 3270 // Removes a statement from a topic's access control policy. 3271 // 3272 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3273 // with awserr.Error's Code and Message methods to get detailed information about 3274 // the error. 3275 // 3276 // See the AWS API reference guide for Amazon Simple Notification Service's 3277 // API operation RemovePermission for usage and error information. 3278 // 3279 // Returned Error Codes: 3280 // * ErrCodeInvalidParameterException "InvalidParameter" 3281 // Indicates that a request parameter does not comply with the associated constraints. 3282 // 3283 // * ErrCodeInternalErrorException "InternalError" 3284 // Indicates an internal service error. 3285 // 3286 // * ErrCodeAuthorizationErrorException "AuthorizationError" 3287 // Indicates that the user has been denied access to the requested resource. 3288 // 3289 // * ErrCodeNotFoundException "NotFound" 3290 // Indicates that the requested resource does not exist. 3291 // 3292 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/RemovePermission 3293 func (c *SNS) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) { 3294 req, out := c.RemovePermissionRequest(input) 3295 return out, req.Send() 3296 } 3297 3298 // RemovePermissionWithContext is the same as RemovePermission with the addition of 3299 // the ability to pass a context and additional request options. 3300 // 3301 // See RemovePermission for details on how to use this API operation. 3302 // 3303 // The context must be non-nil and will be used for request cancellation. If 3304 // the context is nil a panic will occur. In the future the SDK may create 3305 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3306 // for more information on using Contexts. 3307 func (c *SNS) RemovePermissionWithContext(ctx aws.Context, input *RemovePermissionInput, opts ...request.Option) (*RemovePermissionOutput, error) { 3308 req, out := c.RemovePermissionRequest(input) 3309 req.SetContext(ctx) 3310 req.ApplyOptions(opts...) 3311 return out, req.Send() 3312 } 3313 3314 const opSetEndpointAttributes = "SetEndpointAttributes" 3315 3316 // SetEndpointAttributesRequest generates a "aws/request.Request" representing the 3317 // client's request for the SetEndpointAttributes operation. The "output" return 3318 // value will be populated with the request's response once the request completes 3319 // successfully. 3320 // 3321 // Use "Send" method on the returned Request to send the API call to the service. 3322 // the "output" return value is not valid until after Send returns without error. 3323 // 3324 // See SetEndpointAttributes for more information on using the SetEndpointAttributes 3325 // API call, and error handling. 3326 // 3327 // This method is useful when you want to inject custom logic or configuration 3328 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 3329 // 3330 // 3331 // // Example sending a request using the SetEndpointAttributesRequest method. 3332 // req, resp := client.SetEndpointAttributesRequest(params) 3333 // 3334 // err := req.Send() 3335 // if err == nil { // resp is now filled 3336 // fmt.Println(resp) 3337 // } 3338 // 3339 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetEndpointAttributes 3340 func (c *SNS) SetEndpointAttributesRequest(input *SetEndpointAttributesInput) (req *request.Request, output *SetEndpointAttributesOutput) { 3341 op := &request.Operation{ 3342 Name: opSetEndpointAttributes, 3343 HTTPMethod: "POST", 3344 HTTPPath: "/", 3345 } 3346 3347 if input == nil { 3348 input = &SetEndpointAttributesInput{} 3349 } 3350 3351 output = &SetEndpointAttributesOutput{} 3352 req = c.newRequest(op, input, output) 3353 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3354 return 3355 } 3356 3357 // SetEndpointAttributes API operation for Amazon Simple Notification Service. 3358 // 3359 // Sets the attributes for an endpoint for a device on one of the supported 3360 // push notification services, such as GCM (Firebase Cloud Messaging) and APNS. 3361 // For more information, see Using Amazon SNS Mobile Push Notifications (https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). 3362 // 3363 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3364 // with awserr.Error's Code and Message methods to get detailed information about 3365 // the error. 3366 // 3367 // See the AWS API reference guide for Amazon Simple Notification Service's 3368 // API operation SetEndpointAttributes for usage and error information. 3369 // 3370 // Returned Error Codes: 3371 // * ErrCodeInvalidParameterException "InvalidParameter" 3372 // Indicates that a request parameter does not comply with the associated constraints. 3373 // 3374 // * ErrCodeInternalErrorException "InternalError" 3375 // Indicates an internal service error. 3376 // 3377 // * ErrCodeAuthorizationErrorException "AuthorizationError" 3378 // Indicates that the user has been denied access to the requested resource. 3379 // 3380 // * ErrCodeNotFoundException "NotFound" 3381 // Indicates that the requested resource does not exist. 3382 // 3383 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetEndpointAttributes 3384 func (c *SNS) SetEndpointAttributes(input *SetEndpointAttributesInput) (*SetEndpointAttributesOutput, error) { 3385 req, out := c.SetEndpointAttributesRequest(input) 3386 return out, req.Send() 3387 } 3388 3389 // SetEndpointAttributesWithContext is the same as SetEndpointAttributes with the addition of 3390 // the ability to pass a context and additional request options. 3391 // 3392 // See SetEndpointAttributes for details on how to use this API operation. 3393 // 3394 // The context must be non-nil and will be used for request cancellation. If 3395 // the context is nil a panic will occur. In the future the SDK may create 3396 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3397 // for more information on using Contexts. 3398 func (c *SNS) SetEndpointAttributesWithContext(ctx aws.Context, input *SetEndpointAttributesInput, opts ...request.Option) (*SetEndpointAttributesOutput, error) { 3399 req, out := c.SetEndpointAttributesRequest(input) 3400 req.SetContext(ctx) 3401 req.ApplyOptions(opts...) 3402 return out, req.Send() 3403 } 3404 3405 const opSetPlatformApplicationAttributes = "SetPlatformApplicationAttributes" 3406 3407 // SetPlatformApplicationAttributesRequest generates a "aws/request.Request" representing the 3408 // client's request for the SetPlatformApplicationAttributes operation. The "output" return 3409 // value will be populated with the request's response once the request completes 3410 // successfully. 3411 // 3412 // Use "Send" method on the returned Request to send the API call to the service. 3413 // the "output" return value is not valid until after Send returns without error. 3414 // 3415 // See SetPlatformApplicationAttributes for more information on using the SetPlatformApplicationAttributes 3416 // API call, and error handling. 3417 // 3418 // This method is useful when you want to inject custom logic or configuration 3419 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 3420 // 3421 // 3422 // // Example sending a request using the SetPlatformApplicationAttributesRequest method. 3423 // req, resp := client.SetPlatformApplicationAttributesRequest(params) 3424 // 3425 // err := req.Send() 3426 // if err == nil { // resp is now filled 3427 // fmt.Println(resp) 3428 // } 3429 // 3430 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetPlatformApplicationAttributes 3431 func (c *SNS) SetPlatformApplicationAttributesRequest(input *SetPlatformApplicationAttributesInput) (req *request.Request, output *SetPlatformApplicationAttributesOutput) { 3432 op := &request.Operation{ 3433 Name: opSetPlatformApplicationAttributes, 3434 HTTPMethod: "POST", 3435 HTTPPath: "/", 3436 } 3437 3438 if input == nil { 3439 input = &SetPlatformApplicationAttributesInput{} 3440 } 3441 3442 output = &SetPlatformApplicationAttributesOutput{} 3443 req = c.newRequest(op, input, output) 3444 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3445 return 3446 } 3447 3448 // SetPlatformApplicationAttributes API operation for Amazon Simple Notification Service. 3449 // 3450 // Sets the attributes of the platform application object for the supported 3451 // push notification services, such as APNS and GCM (Firebase Cloud Messaging). 3452 // For more information, see Using Amazon SNS Mobile Push Notifications (https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). 3453 // For information on configuring attributes for message delivery status, see 3454 // Using Amazon SNS Application Attributes for Message Delivery Status (https://docs.aws.amazon.com/sns/latest/dg/sns-msg-status.html). 3455 // 3456 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3457 // with awserr.Error's Code and Message methods to get detailed information about 3458 // the error. 3459 // 3460 // See the AWS API reference guide for Amazon Simple Notification Service's 3461 // API operation SetPlatformApplicationAttributes for usage and error information. 3462 // 3463 // Returned Error Codes: 3464 // * ErrCodeInvalidParameterException "InvalidParameter" 3465 // Indicates that a request parameter does not comply with the associated constraints. 3466 // 3467 // * ErrCodeInternalErrorException "InternalError" 3468 // Indicates an internal service error. 3469 // 3470 // * ErrCodeAuthorizationErrorException "AuthorizationError" 3471 // Indicates that the user has been denied access to the requested resource. 3472 // 3473 // * ErrCodeNotFoundException "NotFound" 3474 // Indicates that the requested resource does not exist. 3475 // 3476 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetPlatformApplicationAttributes 3477 func (c *SNS) SetPlatformApplicationAttributes(input *SetPlatformApplicationAttributesInput) (*SetPlatformApplicationAttributesOutput, error) { 3478 req, out := c.SetPlatformApplicationAttributesRequest(input) 3479 return out, req.Send() 3480 } 3481 3482 // SetPlatformApplicationAttributesWithContext is the same as SetPlatformApplicationAttributes with the addition of 3483 // the ability to pass a context and additional request options. 3484 // 3485 // See SetPlatformApplicationAttributes for details on how to use this API operation. 3486 // 3487 // The context must be non-nil and will be used for request cancellation. If 3488 // the context is nil a panic will occur. In the future the SDK may create 3489 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3490 // for more information on using Contexts. 3491 func (c *SNS) SetPlatformApplicationAttributesWithContext(ctx aws.Context, input *SetPlatformApplicationAttributesInput, opts ...request.Option) (*SetPlatformApplicationAttributesOutput, error) { 3492 req, out := c.SetPlatformApplicationAttributesRequest(input) 3493 req.SetContext(ctx) 3494 req.ApplyOptions(opts...) 3495 return out, req.Send() 3496 } 3497 3498 const opSetSMSAttributes = "SetSMSAttributes" 3499 3500 // SetSMSAttributesRequest generates a "aws/request.Request" representing the 3501 // client's request for the SetSMSAttributes operation. The "output" return 3502 // value will be populated with the request's response once the request completes 3503 // successfully. 3504 // 3505 // Use "Send" method on the returned Request to send the API call to the service. 3506 // the "output" return value is not valid until after Send returns without error. 3507 // 3508 // See SetSMSAttributes for more information on using the SetSMSAttributes 3509 // API call, and error handling. 3510 // 3511 // This method is useful when you want to inject custom logic or configuration 3512 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 3513 // 3514 // 3515 // // Example sending a request using the SetSMSAttributesRequest method. 3516 // req, resp := client.SetSMSAttributesRequest(params) 3517 // 3518 // err := req.Send() 3519 // if err == nil { // resp is now filled 3520 // fmt.Println(resp) 3521 // } 3522 // 3523 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetSMSAttributes 3524 func (c *SNS) SetSMSAttributesRequest(input *SetSMSAttributesInput) (req *request.Request, output *SetSMSAttributesOutput) { 3525 op := &request.Operation{ 3526 Name: opSetSMSAttributes, 3527 HTTPMethod: "POST", 3528 HTTPPath: "/", 3529 } 3530 3531 if input == nil { 3532 input = &SetSMSAttributesInput{} 3533 } 3534 3535 output = &SetSMSAttributesOutput{} 3536 req = c.newRequest(op, input, output) 3537 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3538 return 3539 } 3540 3541 // SetSMSAttributes API operation for Amazon Simple Notification Service. 3542 // 3543 // Use this request to set the default settings for sending SMS messages and 3544 // receiving daily SMS usage reports. 3545 // 3546 // You can override some of these settings for a single message when you use 3547 // the Publish action with the MessageAttributes.entry.N parameter. For more 3548 // information, see Publishing to a mobile phone (https://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html) 3549 // in the Amazon SNS Developer Guide. 3550 // 3551 // To use this operation, you must grant the Amazon SNS service principal (sns.amazonaws.com) 3552 // permission to perform the s3:ListBucket action. 3553 // 3554 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3555 // with awserr.Error's Code and Message methods to get detailed information about 3556 // the error. 3557 // 3558 // See the AWS API reference guide for Amazon Simple Notification Service's 3559 // API operation SetSMSAttributes for usage and error information. 3560 // 3561 // Returned Error Codes: 3562 // * ErrCodeInvalidParameterException "InvalidParameter" 3563 // Indicates that a request parameter does not comply with the associated constraints. 3564 // 3565 // * ErrCodeThrottledException "Throttled" 3566 // Indicates that the rate at which requests have been submitted for this action 3567 // exceeds the limit for your account. 3568 // 3569 // * ErrCodeInternalErrorException "InternalError" 3570 // Indicates an internal service error. 3571 // 3572 // * ErrCodeAuthorizationErrorException "AuthorizationError" 3573 // Indicates that the user has been denied access to the requested resource. 3574 // 3575 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetSMSAttributes 3576 func (c *SNS) SetSMSAttributes(input *SetSMSAttributesInput) (*SetSMSAttributesOutput, error) { 3577 req, out := c.SetSMSAttributesRequest(input) 3578 return out, req.Send() 3579 } 3580 3581 // SetSMSAttributesWithContext is the same as SetSMSAttributes with the addition of 3582 // the ability to pass a context and additional request options. 3583 // 3584 // See SetSMSAttributes for details on how to use this API operation. 3585 // 3586 // The context must be non-nil and will be used for request cancellation. If 3587 // the context is nil a panic will occur. In the future the SDK may create 3588 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3589 // for more information on using Contexts. 3590 func (c *SNS) SetSMSAttributesWithContext(ctx aws.Context, input *SetSMSAttributesInput, opts ...request.Option) (*SetSMSAttributesOutput, error) { 3591 req, out := c.SetSMSAttributesRequest(input) 3592 req.SetContext(ctx) 3593 req.ApplyOptions(opts...) 3594 return out, req.Send() 3595 } 3596 3597 const opSetSubscriptionAttributes = "SetSubscriptionAttributes" 3598 3599 // SetSubscriptionAttributesRequest generates a "aws/request.Request" representing the 3600 // client's request for the SetSubscriptionAttributes operation. The "output" return 3601 // value will be populated with the request's response once the request completes 3602 // successfully. 3603 // 3604 // Use "Send" method on the returned Request to send the API call to the service. 3605 // the "output" return value is not valid until after Send returns without error. 3606 // 3607 // See SetSubscriptionAttributes for more information on using the SetSubscriptionAttributes 3608 // API call, and error handling. 3609 // 3610 // This method is useful when you want to inject custom logic or configuration 3611 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 3612 // 3613 // 3614 // // Example sending a request using the SetSubscriptionAttributesRequest method. 3615 // req, resp := client.SetSubscriptionAttributesRequest(params) 3616 // 3617 // err := req.Send() 3618 // if err == nil { // resp is now filled 3619 // fmt.Println(resp) 3620 // } 3621 // 3622 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetSubscriptionAttributes 3623 func (c *SNS) SetSubscriptionAttributesRequest(input *SetSubscriptionAttributesInput) (req *request.Request, output *SetSubscriptionAttributesOutput) { 3624 op := &request.Operation{ 3625 Name: opSetSubscriptionAttributes, 3626 HTTPMethod: "POST", 3627 HTTPPath: "/", 3628 } 3629 3630 if input == nil { 3631 input = &SetSubscriptionAttributesInput{} 3632 } 3633 3634 output = &SetSubscriptionAttributesOutput{} 3635 req = c.newRequest(op, input, output) 3636 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3637 return 3638 } 3639 3640 // SetSubscriptionAttributes API operation for Amazon Simple Notification Service. 3641 // 3642 // Allows a subscription owner to set an attribute of the subscription to a 3643 // new value. 3644 // 3645 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3646 // with awserr.Error's Code and Message methods to get detailed information about 3647 // the error. 3648 // 3649 // See the AWS API reference guide for Amazon Simple Notification Service's 3650 // API operation SetSubscriptionAttributes for usage and error information. 3651 // 3652 // Returned Error Codes: 3653 // * ErrCodeInvalidParameterException "InvalidParameter" 3654 // Indicates that a request parameter does not comply with the associated constraints. 3655 // 3656 // * ErrCodeFilterPolicyLimitExceededException "FilterPolicyLimitExceeded" 3657 // Indicates that the number of filter polices in your account exceeds the limit. 3658 // To add more filter polices, submit an SNS Limit Increase case in the Amazon 3659 // Web Services Support Center. 3660 // 3661 // * ErrCodeInternalErrorException "InternalError" 3662 // Indicates an internal service error. 3663 // 3664 // * ErrCodeNotFoundException "NotFound" 3665 // Indicates that the requested resource does not exist. 3666 // 3667 // * ErrCodeAuthorizationErrorException "AuthorizationError" 3668 // Indicates that the user has been denied access to the requested resource. 3669 // 3670 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetSubscriptionAttributes 3671 func (c *SNS) SetSubscriptionAttributes(input *SetSubscriptionAttributesInput) (*SetSubscriptionAttributesOutput, error) { 3672 req, out := c.SetSubscriptionAttributesRequest(input) 3673 return out, req.Send() 3674 } 3675 3676 // SetSubscriptionAttributesWithContext is the same as SetSubscriptionAttributes with the addition of 3677 // the ability to pass a context and additional request options. 3678 // 3679 // See SetSubscriptionAttributes for details on how to use this API operation. 3680 // 3681 // The context must be non-nil and will be used for request cancellation. If 3682 // the context is nil a panic will occur. In the future the SDK may create 3683 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3684 // for more information on using Contexts. 3685 func (c *SNS) SetSubscriptionAttributesWithContext(ctx aws.Context, input *SetSubscriptionAttributesInput, opts ...request.Option) (*SetSubscriptionAttributesOutput, error) { 3686 req, out := c.SetSubscriptionAttributesRequest(input) 3687 req.SetContext(ctx) 3688 req.ApplyOptions(opts...) 3689 return out, req.Send() 3690 } 3691 3692 const opSetTopicAttributes = "SetTopicAttributes" 3693 3694 // SetTopicAttributesRequest generates a "aws/request.Request" representing the 3695 // client's request for the SetTopicAttributes operation. The "output" return 3696 // value will be populated with the request's response once the request completes 3697 // successfully. 3698 // 3699 // Use "Send" method on the returned Request to send the API call to the service. 3700 // the "output" return value is not valid until after Send returns without error. 3701 // 3702 // See SetTopicAttributes for more information on using the SetTopicAttributes 3703 // API call, and error handling. 3704 // 3705 // This method is useful when you want to inject custom logic or configuration 3706 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 3707 // 3708 // 3709 // // Example sending a request using the SetTopicAttributesRequest method. 3710 // req, resp := client.SetTopicAttributesRequest(params) 3711 // 3712 // err := req.Send() 3713 // if err == nil { // resp is now filled 3714 // fmt.Println(resp) 3715 // } 3716 // 3717 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetTopicAttributes 3718 func (c *SNS) SetTopicAttributesRequest(input *SetTopicAttributesInput) (req *request.Request, output *SetTopicAttributesOutput) { 3719 op := &request.Operation{ 3720 Name: opSetTopicAttributes, 3721 HTTPMethod: "POST", 3722 HTTPPath: "/", 3723 } 3724 3725 if input == nil { 3726 input = &SetTopicAttributesInput{} 3727 } 3728 3729 output = &SetTopicAttributesOutput{} 3730 req = c.newRequest(op, input, output) 3731 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3732 return 3733 } 3734 3735 // SetTopicAttributes API operation for Amazon Simple Notification Service. 3736 // 3737 // Allows a topic owner to set an attribute of the topic to a new value. 3738 // 3739 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3740 // with awserr.Error's Code and Message methods to get detailed information about 3741 // the error. 3742 // 3743 // See the AWS API reference guide for Amazon Simple Notification Service's 3744 // API operation SetTopicAttributes for usage and error information. 3745 // 3746 // Returned Error Codes: 3747 // * ErrCodeInvalidParameterException "InvalidParameter" 3748 // Indicates that a request parameter does not comply with the associated constraints. 3749 // 3750 // * ErrCodeInternalErrorException "InternalError" 3751 // Indicates an internal service error. 3752 // 3753 // * ErrCodeNotFoundException "NotFound" 3754 // Indicates that the requested resource does not exist. 3755 // 3756 // * ErrCodeAuthorizationErrorException "AuthorizationError" 3757 // Indicates that the user has been denied access to the requested resource. 3758 // 3759 // * ErrCodeInvalidSecurityException "InvalidSecurity" 3760 // The credential signature isn't valid. You must use an HTTPS endpoint and 3761 // sign your request using Signature Version 4. 3762 // 3763 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetTopicAttributes 3764 func (c *SNS) SetTopicAttributes(input *SetTopicAttributesInput) (*SetTopicAttributesOutput, error) { 3765 req, out := c.SetTopicAttributesRequest(input) 3766 return out, req.Send() 3767 } 3768 3769 // SetTopicAttributesWithContext is the same as SetTopicAttributes with the addition of 3770 // the ability to pass a context and additional request options. 3771 // 3772 // See SetTopicAttributes for details on how to use this API operation. 3773 // 3774 // The context must be non-nil and will be used for request cancellation. If 3775 // the context is nil a panic will occur. In the future the SDK may create 3776 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3777 // for more information on using Contexts. 3778 func (c *SNS) SetTopicAttributesWithContext(ctx aws.Context, input *SetTopicAttributesInput, opts ...request.Option) (*SetTopicAttributesOutput, error) { 3779 req, out := c.SetTopicAttributesRequest(input) 3780 req.SetContext(ctx) 3781 req.ApplyOptions(opts...) 3782 return out, req.Send() 3783 } 3784 3785 const opSubscribe = "Subscribe" 3786 3787 // SubscribeRequest generates a "aws/request.Request" representing the 3788 // client's request for the Subscribe operation. The "output" return 3789 // value will be populated with the request's response once the request completes 3790 // successfully. 3791 // 3792 // Use "Send" method on the returned Request to send the API call to the service. 3793 // the "output" return value is not valid until after Send returns without error. 3794 // 3795 // See Subscribe for more information on using the Subscribe 3796 // API call, and error handling. 3797 // 3798 // This method is useful when you want to inject custom logic or configuration 3799 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 3800 // 3801 // 3802 // // Example sending a request using the SubscribeRequest method. 3803 // req, resp := client.SubscribeRequest(params) 3804 // 3805 // err := req.Send() 3806 // if err == nil { // resp is now filled 3807 // fmt.Println(resp) 3808 // } 3809 // 3810 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Subscribe 3811 func (c *SNS) SubscribeRequest(input *SubscribeInput) (req *request.Request, output *SubscribeOutput) { 3812 op := &request.Operation{ 3813 Name: opSubscribe, 3814 HTTPMethod: "POST", 3815 HTTPPath: "/", 3816 } 3817 3818 if input == nil { 3819 input = &SubscribeInput{} 3820 } 3821 3822 output = &SubscribeOutput{} 3823 req = c.newRequest(op, input, output) 3824 return 3825 } 3826 3827 // Subscribe API operation for Amazon Simple Notification Service. 3828 // 3829 // Subscribes an endpoint to an Amazon SNS topic. If the endpoint type is HTTP/S 3830 // or email, or if the endpoint and the topic are not in the same account, the 3831 // endpoint owner must run the ConfirmSubscription action to confirm the subscription. 3832 // 3833 // You call the ConfirmSubscription action with the token from the subscription 3834 // response. Confirmation tokens are valid for three days. 3835 // 3836 // This action is throttled at 100 transactions per second (TPS). 3837 // 3838 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3839 // with awserr.Error's Code and Message methods to get detailed information about 3840 // the error. 3841 // 3842 // See the AWS API reference guide for Amazon Simple Notification Service's 3843 // API operation Subscribe for usage and error information. 3844 // 3845 // Returned Error Codes: 3846 // * ErrCodeSubscriptionLimitExceededException "SubscriptionLimitExceeded" 3847 // Indicates that the customer already owns the maximum allowed number of subscriptions. 3848 // 3849 // * ErrCodeFilterPolicyLimitExceededException "FilterPolicyLimitExceeded" 3850 // Indicates that the number of filter polices in your account exceeds the limit. 3851 // To add more filter polices, submit an SNS Limit Increase case in the Amazon 3852 // Web Services Support Center. 3853 // 3854 // * ErrCodeInvalidParameterException "InvalidParameter" 3855 // Indicates that a request parameter does not comply with the associated constraints. 3856 // 3857 // * ErrCodeInternalErrorException "InternalError" 3858 // Indicates an internal service error. 3859 // 3860 // * ErrCodeNotFoundException "NotFound" 3861 // Indicates that the requested resource does not exist. 3862 // 3863 // * ErrCodeAuthorizationErrorException "AuthorizationError" 3864 // Indicates that the user has been denied access to the requested resource. 3865 // 3866 // * ErrCodeInvalidSecurityException "InvalidSecurity" 3867 // The credential signature isn't valid. You must use an HTTPS endpoint and 3868 // sign your request using Signature Version 4. 3869 // 3870 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Subscribe 3871 func (c *SNS) Subscribe(input *SubscribeInput) (*SubscribeOutput, error) { 3872 req, out := c.SubscribeRequest(input) 3873 return out, req.Send() 3874 } 3875 3876 // SubscribeWithContext is the same as Subscribe with the addition of 3877 // the ability to pass a context and additional request options. 3878 // 3879 // See Subscribe for details on how to use this API operation. 3880 // 3881 // The context must be non-nil and will be used for request cancellation. If 3882 // the context is nil a panic will occur. In the future the SDK may create 3883 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3884 // for more information on using Contexts. 3885 func (c *SNS) SubscribeWithContext(ctx aws.Context, input *SubscribeInput, opts ...request.Option) (*SubscribeOutput, error) { 3886 req, out := c.SubscribeRequest(input) 3887 req.SetContext(ctx) 3888 req.ApplyOptions(opts...) 3889 return out, req.Send() 3890 } 3891 3892 const opTagResource = "TagResource" 3893 3894 // TagResourceRequest generates a "aws/request.Request" representing the 3895 // client's request for the TagResource operation. The "output" return 3896 // value will be populated with the request's response once the request completes 3897 // successfully. 3898 // 3899 // Use "Send" method on the returned Request to send the API call to the service. 3900 // the "output" return value is not valid until after Send returns without error. 3901 // 3902 // See TagResource for more information on using the TagResource 3903 // API call, and error handling. 3904 // 3905 // This method is useful when you want to inject custom logic or configuration 3906 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 3907 // 3908 // 3909 // // Example sending a request using the TagResourceRequest method. 3910 // req, resp := client.TagResourceRequest(params) 3911 // 3912 // err := req.Send() 3913 // if err == nil { // resp is now filled 3914 // fmt.Println(resp) 3915 // } 3916 // 3917 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/TagResource 3918 func (c *SNS) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 3919 op := &request.Operation{ 3920 Name: opTagResource, 3921 HTTPMethod: "POST", 3922 HTTPPath: "/", 3923 } 3924 3925 if input == nil { 3926 input = &TagResourceInput{} 3927 } 3928 3929 output = &TagResourceOutput{} 3930 req = c.newRequest(op, input, output) 3931 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3932 return 3933 } 3934 3935 // TagResource API operation for Amazon Simple Notification Service. 3936 // 3937 // Add tags to the specified Amazon SNS topic. For an overview, see Amazon SNS 3938 // Tags (https://docs.aws.amazon.com/sns/latest/dg/sns-tags.html) in the Amazon 3939 // SNS Developer Guide. 3940 // 3941 // When you use topic tags, keep the following guidelines in mind: 3942 // 3943 // * Adding more than 50 tags to a topic isn't recommended. 3944 // 3945 // * Tags don't have any semantic meaning. Amazon SNS interprets tags as 3946 // character strings. 3947 // 3948 // * Tags are case-sensitive. 3949 // 3950 // * A new tag with a key identical to that of an existing tag overwrites 3951 // the existing tag. 3952 // 3953 // * Tagging actions are limited to 10 TPS per account, per Region. If your 3954 // application requires a higher throughput, file a technical support request 3955 // (https://console.aws.amazon.com/support/home#/case/create?issueType=technical). 3956 // 3957 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3958 // with awserr.Error's Code and Message methods to get detailed information about 3959 // the error. 3960 // 3961 // See the AWS API reference guide for Amazon Simple Notification Service's 3962 // API operation TagResource for usage and error information. 3963 // 3964 // Returned Error Codes: 3965 // * ErrCodeResourceNotFoundException "ResourceNotFound" 3966 // Can’t perform the action on the specified resource. Make sure that the 3967 // resource exists. 3968 // 3969 // * ErrCodeTagLimitExceededException "TagLimitExceeded" 3970 // Can't add more than 50 tags to a topic. 3971 // 3972 // * ErrCodeStaleTagException "StaleTag" 3973 // A tag has been added to a resource with the same ARN as a deleted resource. 3974 // Wait a short while and then retry the operation. 3975 // 3976 // * ErrCodeTagPolicyException "TagPolicy" 3977 // The request doesn't comply with the IAM tag policy. Correct your request 3978 // and then retry it. 3979 // 3980 // * ErrCodeInvalidParameterException "InvalidParameter" 3981 // Indicates that a request parameter does not comply with the associated constraints. 3982 // 3983 // * ErrCodeAuthorizationErrorException "AuthorizationError" 3984 // Indicates that the user has been denied access to the requested resource. 3985 // 3986 // * ErrCodeConcurrentAccessException "ConcurrentAccess" 3987 // Can't perform multiple operations on a tag simultaneously. Perform the operations 3988 // sequentially. 3989 // 3990 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/TagResource 3991 func (c *SNS) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 3992 req, out := c.TagResourceRequest(input) 3993 return out, req.Send() 3994 } 3995 3996 // TagResourceWithContext is the same as TagResource with the addition of 3997 // the ability to pass a context and additional request options. 3998 // 3999 // See TagResource for details on how to use this API operation. 4000 // 4001 // The context must be non-nil and will be used for request cancellation. If 4002 // the context is nil a panic will occur. In the future the SDK may create 4003 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4004 // for more information on using Contexts. 4005 func (c *SNS) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 4006 req, out := c.TagResourceRequest(input) 4007 req.SetContext(ctx) 4008 req.ApplyOptions(opts...) 4009 return out, req.Send() 4010 } 4011 4012 const opUnsubscribe = "Unsubscribe" 4013 4014 // UnsubscribeRequest generates a "aws/request.Request" representing the 4015 // client's request for the Unsubscribe operation. The "output" return 4016 // value will be populated with the request's response once the request completes 4017 // successfully. 4018 // 4019 // Use "Send" method on the returned Request to send the API call to the service. 4020 // the "output" return value is not valid until after Send returns without error. 4021 // 4022 // See Unsubscribe for more information on using the Unsubscribe 4023 // API call, and error handling. 4024 // 4025 // This method is useful when you want to inject custom logic or configuration 4026 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 4027 // 4028 // 4029 // // Example sending a request using the UnsubscribeRequest method. 4030 // req, resp := client.UnsubscribeRequest(params) 4031 // 4032 // err := req.Send() 4033 // if err == nil { // resp is now filled 4034 // fmt.Println(resp) 4035 // } 4036 // 4037 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Unsubscribe 4038 func (c *SNS) UnsubscribeRequest(input *UnsubscribeInput) (req *request.Request, output *UnsubscribeOutput) { 4039 op := &request.Operation{ 4040 Name: opUnsubscribe, 4041 HTTPMethod: "POST", 4042 HTTPPath: "/", 4043 } 4044 4045 if input == nil { 4046 input = &UnsubscribeInput{} 4047 } 4048 4049 output = &UnsubscribeOutput{} 4050 req = c.newRequest(op, input, output) 4051 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 4052 return 4053 } 4054 4055 // Unsubscribe API operation for Amazon Simple Notification Service. 4056 // 4057 // Deletes a subscription. If the subscription requires authentication for deletion, 4058 // only the owner of the subscription or the topic's owner can unsubscribe, 4059 // and an Amazon Web Services signature is required. If the Unsubscribe call 4060 // does not require authentication and the requester is not the subscription 4061 // owner, a final cancellation message is delivered to the endpoint, so that 4062 // the endpoint owner can easily resubscribe to the topic if the Unsubscribe 4063 // request was unintended. 4064 // 4065 // This action is throttled at 100 transactions per second (TPS). 4066 // 4067 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4068 // with awserr.Error's Code and Message methods to get detailed information about 4069 // the error. 4070 // 4071 // See the AWS API reference guide for Amazon Simple Notification Service's 4072 // API operation Unsubscribe for usage and error information. 4073 // 4074 // Returned Error Codes: 4075 // * ErrCodeInvalidParameterException "InvalidParameter" 4076 // Indicates that a request parameter does not comply with the associated constraints. 4077 // 4078 // * ErrCodeInternalErrorException "InternalError" 4079 // Indicates an internal service error. 4080 // 4081 // * ErrCodeAuthorizationErrorException "AuthorizationError" 4082 // Indicates that the user has been denied access to the requested resource. 4083 // 4084 // * ErrCodeNotFoundException "NotFound" 4085 // Indicates that the requested resource does not exist. 4086 // 4087 // * ErrCodeInvalidSecurityException "InvalidSecurity" 4088 // The credential signature isn't valid. You must use an HTTPS endpoint and 4089 // sign your request using Signature Version 4. 4090 // 4091 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Unsubscribe 4092 func (c *SNS) Unsubscribe(input *UnsubscribeInput) (*UnsubscribeOutput, error) { 4093 req, out := c.UnsubscribeRequest(input) 4094 return out, req.Send() 4095 } 4096 4097 // UnsubscribeWithContext is the same as Unsubscribe with the addition of 4098 // the ability to pass a context and additional request options. 4099 // 4100 // See Unsubscribe for details on how to use this API operation. 4101 // 4102 // The context must be non-nil and will be used for request cancellation. If 4103 // the context is nil a panic will occur. In the future the SDK may create 4104 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4105 // for more information on using Contexts. 4106 func (c *SNS) UnsubscribeWithContext(ctx aws.Context, input *UnsubscribeInput, opts ...request.Option) (*UnsubscribeOutput, error) { 4107 req, out := c.UnsubscribeRequest(input) 4108 req.SetContext(ctx) 4109 req.ApplyOptions(opts...) 4110 return out, req.Send() 4111 } 4112 4113 const opUntagResource = "UntagResource" 4114 4115 // UntagResourceRequest generates a "aws/request.Request" representing the 4116 // client's request for the UntagResource operation. The "output" return 4117 // value will be populated with the request's response once the request completes 4118 // successfully. 4119 // 4120 // Use "Send" method on the returned Request to send the API call to the service. 4121 // the "output" return value is not valid until after Send returns without error. 4122 // 4123 // See UntagResource for more information on using the UntagResource 4124 // API call, and error handling. 4125 // 4126 // This method is useful when you want to inject custom logic or configuration 4127 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 4128 // 4129 // 4130 // // Example sending a request using the UntagResourceRequest method. 4131 // req, resp := client.UntagResourceRequest(params) 4132 // 4133 // err := req.Send() 4134 // if err == nil { // resp is now filled 4135 // fmt.Println(resp) 4136 // } 4137 // 4138 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/UntagResource 4139 func (c *SNS) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 4140 op := &request.Operation{ 4141 Name: opUntagResource, 4142 HTTPMethod: "POST", 4143 HTTPPath: "/", 4144 } 4145 4146 if input == nil { 4147 input = &UntagResourceInput{} 4148 } 4149 4150 output = &UntagResourceOutput{} 4151 req = c.newRequest(op, input, output) 4152 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 4153 return 4154 } 4155 4156 // UntagResource API operation for Amazon Simple Notification Service. 4157 // 4158 // Remove tags from the specified Amazon SNS topic. For an overview, see Amazon 4159 // SNS Tags (https://docs.aws.amazon.com/sns/latest/dg/sns-tags.html) in the 4160 // Amazon SNS Developer Guide. 4161 // 4162 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4163 // with awserr.Error's Code and Message methods to get detailed information about 4164 // the error. 4165 // 4166 // See the AWS API reference guide for Amazon Simple Notification Service's 4167 // API operation UntagResource for usage and error information. 4168 // 4169 // Returned Error Codes: 4170 // * ErrCodeResourceNotFoundException "ResourceNotFound" 4171 // Can’t perform the action on the specified resource. Make sure that the 4172 // resource exists. 4173 // 4174 // * ErrCodeTagLimitExceededException "TagLimitExceeded" 4175 // Can't add more than 50 tags to a topic. 4176 // 4177 // * ErrCodeStaleTagException "StaleTag" 4178 // A tag has been added to a resource with the same ARN as a deleted resource. 4179 // Wait a short while and then retry the operation. 4180 // 4181 // * ErrCodeTagPolicyException "TagPolicy" 4182 // The request doesn't comply with the IAM tag policy. Correct your request 4183 // and then retry it. 4184 // 4185 // * ErrCodeInvalidParameterException "InvalidParameter" 4186 // Indicates that a request parameter does not comply with the associated constraints. 4187 // 4188 // * ErrCodeAuthorizationErrorException "AuthorizationError" 4189 // Indicates that the user has been denied access to the requested resource. 4190 // 4191 // * ErrCodeConcurrentAccessException "ConcurrentAccess" 4192 // Can't perform multiple operations on a tag simultaneously. Perform the operations 4193 // sequentially. 4194 // 4195 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/UntagResource 4196 func (c *SNS) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 4197 req, out := c.UntagResourceRequest(input) 4198 return out, req.Send() 4199 } 4200 4201 // UntagResourceWithContext is the same as UntagResource with the addition of 4202 // the ability to pass a context and additional request options. 4203 // 4204 // See UntagResource for details on how to use this API operation. 4205 // 4206 // The context must be non-nil and will be used for request cancellation. If 4207 // the context is nil a panic will occur. In the future the SDK may create 4208 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4209 // for more information on using Contexts. 4210 func (c *SNS) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 4211 req, out := c.UntagResourceRequest(input) 4212 req.SetContext(ctx) 4213 req.ApplyOptions(opts...) 4214 return out, req.Send() 4215 } 4216 4217 const opVerifySMSSandboxPhoneNumber = "VerifySMSSandboxPhoneNumber" 4218 4219 // VerifySMSSandboxPhoneNumberRequest generates a "aws/request.Request" representing the 4220 // client's request for the VerifySMSSandboxPhoneNumber operation. The "output" return 4221 // value will be populated with the request's response once the request completes 4222 // successfully. 4223 // 4224 // Use "Send" method on the returned Request to send the API call to the service. 4225 // the "output" return value is not valid until after Send returns without error. 4226 // 4227 // See VerifySMSSandboxPhoneNumber for more information on using the VerifySMSSandboxPhoneNumber 4228 // API call, and error handling. 4229 // 4230 // This method is useful when you want to inject custom logic or configuration 4231 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 4232 // 4233 // 4234 // // Example sending a request using the VerifySMSSandboxPhoneNumberRequest method. 4235 // req, resp := client.VerifySMSSandboxPhoneNumberRequest(params) 4236 // 4237 // err := req.Send() 4238 // if err == nil { // resp is now filled 4239 // fmt.Println(resp) 4240 // } 4241 // 4242 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/VerifySMSSandboxPhoneNumber 4243 func (c *SNS) VerifySMSSandboxPhoneNumberRequest(input *VerifySMSSandboxPhoneNumberInput) (req *request.Request, output *VerifySMSSandboxPhoneNumberOutput) { 4244 op := &request.Operation{ 4245 Name: opVerifySMSSandboxPhoneNumber, 4246 HTTPMethod: "POST", 4247 HTTPPath: "/", 4248 } 4249 4250 if input == nil { 4251 input = &VerifySMSSandboxPhoneNumberInput{} 4252 } 4253 4254 output = &VerifySMSSandboxPhoneNumberOutput{} 4255 req = c.newRequest(op, input, output) 4256 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 4257 return 4258 } 4259 4260 // VerifySMSSandboxPhoneNumber API operation for Amazon Simple Notification Service. 4261 // 4262 // Verifies a destination phone number with a one-time password (OTP) for the 4263 // calling account. 4264 // 4265 // When you start using Amazon SNS to send SMS messages, your account is in 4266 // the SMS sandbox. The SMS sandbox provides a safe environment for you to try 4267 // Amazon SNS features without risking your reputation as an SMS sender. While 4268 // your account is in the SMS sandbox, you can use all of the features of Amazon 4269 // SNS. However, you can send SMS messages only to verified destination phone 4270 // numbers. For more information, including how to move out of the sandbox to 4271 // send messages without restrictions, see SMS sandbox (https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html) 4272 // in the Amazon SNS Developer Guide. 4273 // 4274 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4275 // with awserr.Error's Code and Message methods to get detailed information about 4276 // the error. 4277 // 4278 // See the AWS API reference guide for Amazon Simple Notification Service's 4279 // API operation VerifySMSSandboxPhoneNumber for usage and error information. 4280 // 4281 // Returned Error Codes: 4282 // * ErrCodeAuthorizationErrorException "AuthorizationError" 4283 // Indicates that the user has been denied access to the requested resource. 4284 // 4285 // * ErrCodeInternalErrorException "InternalError" 4286 // Indicates an internal service error. 4287 // 4288 // * ErrCodeInvalidParameterException "InvalidParameter" 4289 // Indicates that a request parameter does not comply with the associated constraints. 4290 // 4291 // * ErrCodeResourceNotFoundException "ResourceNotFound" 4292 // Can’t perform the action on the specified resource. Make sure that the 4293 // resource exists. 4294 // 4295 // * ErrCodeVerificationException "VerificationException" 4296 // Indicates that the one-time password (OTP) used for verification is invalid. 4297 // 4298 // * ErrCodeThrottledException "Throttled" 4299 // Indicates that the rate at which requests have been submitted for this action 4300 // exceeds the limit for your account. 4301 // 4302 // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/VerifySMSSandboxPhoneNumber 4303 func (c *SNS) VerifySMSSandboxPhoneNumber(input *VerifySMSSandboxPhoneNumberInput) (*VerifySMSSandboxPhoneNumberOutput, error) { 4304 req, out := c.VerifySMSSandboxPhoneNumberRequest(input) 4305 return out, req.Send() 4306 } 4307 4308 // VerifySMSSandboxPhoneNumberWithContext is the same as VerifySMSSandboxPhoneNumber with the addition of 4309 // the ability to pass a context and additional request options. 4310 // 4311 // See VerifySMSSandboxPhoneNumber for details on how to use this API operation. 4312 // 4313 // The context must be non-nil and will be used for request cancellation. If 4314 // the context is nil a panic will occur. In the future the SDK may create 4315 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4316 // for more information on using Contexts. 4317 func (c *SNS) VerifySMSSandboxPhoneNumberWithContext(ctx aws.Context, input *VerifySMSSandboxPhoneNumberInput, opts ...request.Option) (*VerifySMSSandboxPhoneNumberOutput, error) { 4318 req, out := c.VerifySMSSandboxPhoneNumberRequest(input) 4319 req.SetContext(ctx) 4320 req.ApplyOptions(opts...) 4321 return out, req.Send() 4322 } 4323 4324 type AddPermissionInput struct { 4325 _ struct{} `type:"structure"` 4326 4327 // The account IDs of the users (principals) who will be given access to the 4328 // specified actions. The users must have account, but do not need to be signed 4329 // up for this service. 4330 // 4331 // AWSAccountId is a required field 4332 AWSAccountId []*string `type:"list" required:"true"` 4333 4334 // The action you want to allow for the specified principal(s). 4335 // 4336 // Valid values: Any Amazon SNS action name, for example Publish. 4337 // 4338 // ActionName is a required field 4339 ActionName []*string `type:"list" required:"true"` 4340 4341 // A unique identifier for the new policy statement. 4342 // 4343 // Label is a required field 4344 Label *string `type:"string" required:"true"` 4345 4346 // The ARN of the topic whose access control policy you wish to modify. 4347 // 4348 // TopicArn is a required field 4349 TopicArn *string `type:"string" required:"true"` 4350 } 4351 4352 // String returns the string representation. 4353 // 4354 // API parameter values that are decorated as "sensitive" in the API will not 4355 // be included in the string output. The member name will be present, but the 4356 // value will be replaced with "sensitive". 4357 func (s AddPermissionInput) String() string { 4358 return awsutil.Prettify(s) 4359 } 4360 4361 // GoString returns the string representation. 4362 // 4363 // API parameter values that are decorated as "sensitive" in the API will not 4364 // be included in the string output. The member name will be present, but the 4365 // value will be replaced with "sensitive". 4366 func (s AddPermissionInput) GoString() string { 4367 return s.String() 4368 } 4369 4370 // Validate inspects the fields of the type to determine if they are valid. 4371 func (s *AddPermissionInput) Validate() error { 4372 invalidParams := request.ErrInvalidParams{Context: "AddPermissionInput"} 4373 if s.AWSAccountId == nil { 4374 invalidParams.Add(request.NewErrParamRequired("AWSAccountId")) 4375 } 4376 if s.ActionName == nil { 4377 invalidParams.Add(request.NewErrParamRequired("ActionName")) 4378 } 4379 if s.Label == nil { 4380 invalidParams.Add(request.NewErrParamRequired("Label")) 4381 } 4382 if s.TopicArn == nil { 4383 invalidParams.Add(request.NewErrParamRequired("TopicArn")) 4384 } 4385 4386 if invalidParams.Len() > 0 { 4387 return invalidParams 4388 } 4389 return nil 4390 } 4391 4392 // SetAWSAccountId sets the AWSAccountId field's value. 4393 func (s *AddPermissionInput) SetAWSAccountId(v []*string) *AddPermissionInput { 4394 s.AWSAccountId = v 4395 return s 4396 } 4397 4398 // SetActionName sets the ActionName field's value. 4399 func (s *AddPermissionInput) SetActionName(v []*string) *AddPermissionInput { 4400 s.ActionName = v 4401 return s 4402 } 4403 4404 // SetLabel sets the Label field's value. 4405 func (s *AddPermissionInput) SetLabel(v string) *AddPermissionInput { 4406 s.Label = &v 4407 return s 4408 } 4409 4410 // SetTopicArn sets the TopicArn field's value. 4411 func (s *AddPermissionInput) SetTopicArn(v string) *AddPermissionInput { 4412 s.TopicArn = &v 4413 return s 4414 } 4415 4416 type AddPermissionOutput struct { 4417 _ struct{} `type:"structure"` 4418 } 4419 4420 // String returns the string representation. 4421 // 4422 // API parameter values that are decorated as "sensitive" in the API will not 4423 // be included in the string output. The member name will be present, but the 4424 // value will be replaced with "sensitive". 4425 func (s AddPermissionOutput) String() string { 4426 return awsutil.Prettify(s) 4427 } 4428 4429 // GoString returns the string representation. 4430 // 4431 // API parameter values that are decorated as "sensitive" in the API will not 4432 // be included in the string output. The member name will be present, but the 4433 // value will be replaced with "sensitive". 4434 func (s AddPermissionOutput) GoString() string { 4435 return s.String() 4436 } 4437 4438 // The input for the CheckIfPhoneNumberIsOptedOut action. 4439 type CheckIfPhoneNumberIsOptedOutInput struct { 4440 _ struct{} `type:"structure"` 4441 4442 // The phone number for which you want to check the opt out status. 4443 // 4444 // PhoneNumber is a required field 4445 PhoneNumber *string `locationName:"phoneNumber" type:"string" required:"true"` 4446 } 4447 4448 // String returns the string representation. 4449 // 4450 // API parameter values that are decorated as "sensitive" in the API will not 4451 // be included in the string output. The member name will be present, but the 4452 // value will be replaced with "sensitive". 4453 func (s CheckIfPhoneNumberIsOptedOutInput) String() string { 4454 return awsutil.Prettify(s) 4455 } 4456 4457 // GoString returns the string representation. 4458 // 4459 // API parameter values that are decorated as "sensitive" in the API will not 4460 // be included in the string output. The member name will be present, but the 4461 // value will be replaced with "sensitive". 4462 func (s CheckIfPhoneNumberIsOptedOutInput) GoString() string { 4463 return s.String() 4464 } 4465 4466 // Validate inspects the fields of the type to determine if they are valid. 4467 func (s *CheckIfPhoneNumberIsOptedOutInput) Validate() error { 4468 invalidParams := request.ErrInvalidParams{Context: "CheckIfPhoneNumberIsOptedOutInput"} 4469 if s.PhoneNumber == nil { 4470 invalidParams.Add(request.NewErrParamRequired("PhoneNumber")) 4471 } 4472 4473 if invalidParams.Len() > 0 { 4474 return invalidParams 4475 } 4476 return nil 4477 } 4478 4479 // SetPhoneNumber sets the PhoneNumber field's value. 4480 func (s *CheckIfPhoneNumberIsOptedOutInput) SetPhoneNumber(v string) *CheckIfPhoneNumberIsOptedOutInput { 4481 s.PhoneNumber = &v 4482 return s 4483 } 4484 4485 // The response from the CheckIfPhoneNumberIsOptedOut action. 4486 type CheckIfPhoneNumberIsOptedOutOutput struct { 4487 _ struct{} `type:"structure"` 4488 4489 // Indicates whether the phone number is opted out: 4490 // 4491 // * true – The phone number is opted out, meaning you cannot publish SMS 4492 // messages to it. 4493 // 4494 // * false – The phone number is opted in, meaning you can publish SMS 4495 // messages to it. 4496 IsOptedOut *bool `locationName:"isOptedOut" type:"boolean"` 4497 } 4498 4499 // String returns the string representation. 4500 // 4501 // API parameter values that are decorated as "sensitive" in the API will not 4502 // be included in the string output. The member name will be present, but the 4503 // value will be replaced with "sensitive". 4504 func (s CheckIfPhoneNumberIsOptedOutOutput) String() string { 4505 return awsutil.Prettify(s) 4506 } 4507 4508 // GoString returns the string representation. 4509 // 4510 // API parameter values that are decorated as "sensitive" in the API will not 4511 // be included in the string output. The member name will be present, but the 4512 // value will be replaced with "sensitive". 4513 func (s CheckIfPhoneNumberIsOptedOutOutput) GoString() string { 4514 return s.String() 4515 } 4516 4517 // SetIsOptedOut sets the IsOptedOut field's value. 4518 func (s *CheckIfPhoneNumberIsOptedOutOutput) SetIsOptedOut(v bool) *CheckIfPhoneNumberIsOptedOutOutput { 4519 s.IsOptedOut = &v 4520 return s 4521 } 4522 4523 // Input for ConfirmSubscription action. 4524 type ConfirmSubscriptionInput struct { 4525 _ struct{} `type:"structure"` 4526 4527 // Disallows unauthenticated unsubscribes of the subscription. If the value 4528 // of this parameter is true and the request has an Amazon Web Services signature, 4529 // then only the topic owner and the subscription owner can unsubscribe the 4530 // endpoint. The unsubscribe action requires Amazon Web Services authentication. 4531 AuthenticateOnUnsubscribe *string `type:"string"` 4532 4533 // Short-lived token sent to an endpoint during the Subscribe action. 4534 // 4535 // Token is a required field 4536 Token *string `type:"string" required:"true"` 4537 4538 // The ARN of the topic for which you wish to confirm a subscription. 4539 // 4540 // TopicArn is a required field 4541 TopicArn *string `type:"string" required:"true"` 4542 } 4543 4544 // String returns the string representation. 4545 // 4546 // API parameter values that are decorated as "sensitive" in the API will not 4547 // be included in the string output. The member name will be present, but the 4548 // value will be replaced with "sensitive". 4549 func (s ConfirmSubscriptionInput) String() string { 4550 return awsutil.Prettify(s) 4551 } 4552 4553 // GoString returns the string representation. 4554 // 4555 // API parameter values that are decorated as "sensitive" in the API will not 4556 // be included in the string output. The member name will be present, but the 4557 // value will be replaced with "sensitive". 4558 func (s ConfirmSubscriptionInput) GoString() string { 4559 return s.String() 4560 } 4561 4562 // Validate inspects the fields of the type to determine if they are valid. 4563 func (s *ConfirmSubscriptionInput) Validate() error { 4564 invalidParams := request.ErrInvalidParams{Context: "ConfirmSubscriptionInput"} 4565 if s.Token == nil { 4566 invalidParams.Add(request.NewErrParamRequired("Token")) 4567 } 4568 if s.TopicArn == nil { 4569 invalidParams.Add(request.NewErrParamRequired("TopicArn")) 4570 } 4571 4572 if invalidParams.Len() > 0 { 4573 return invalidParams 4574 } 4575 return nil 4576 } 4577 4578 // SetAuthenticateOnUnsubscribe sets the AuthenticateOnUnsubscribe field's value. 4579 func (s *ConfirmSubscriptionInput) SetAuthenticateOnUnsubscribe(v string) *ConfirmSubscriptionInput { 4580 s.AuthenticateOnUnsubscribe = &v 4581 return s 4582 } 4583 4584 // SetToken sets the Token field's value. 4585 func (s *ConfirmSubscriptionInput) SetToken(v string) *ConfirmSubscriptionInput { 4586 s.Token = &v 4587 return s 4588 } 4589 4590 // SetTopicArn sets the TopicArn field's value. 4591 func (s *ConfirmSubscriptionInput) SetTopicArn(v string) *ConfirmSubscriptionInput { 4592 s.TopicArn = &v 4593 return s 4594 } 4595 4596 // Response for ConfirmSubscriptions action. 4597 type ConfirmSubscriptionOutput struct { 4598 _ struct{} `type:"structure"` 4599 4600 // The ARN of the created subscription. 4601 SubscriptionArn *string `type:"string"` 4602 } 4603 4604 // String returns the string representation. 4605 // 4606 // API parameter values that are decorated as "sensitive" in the API will not 4607 // be included in the string output. The member name will be present, but the 4608 // value will be replaced with "sensitive". 4609 func (s ConfirmSubscriptionOutput) String() string { 4610 return awsutil.Prettify(s) 4611 } 4612 4613 // GoString returns the string representation. 4614 // 4615 // API parameter values that are decorated as "sensitive" in the API will not 4616 // be included in the string output. The member name will be present, but the 4617 // value will be replaced with "sensitive". 4618 func (s ConfirmSubscriptionOutput) GoString() string { 4619 return s.String() 4620 } 4621 4622 // SetSubscriptionArn sets the SubscriptionArn field's value. 4623 func (s *ConfirmSubscriptionOutput) SetSubscriptionArn(v string) *ConfirmSubscriptionOutput { 4624 s.SubscriptionArn = &v 4625 return s 4626 } 4627 4628 // Input for CreatePlatformApplication action. 4629 type CreatePlatformApplicationInput struct { 4630 _ struct{} `type:"structure"` 4631 4632 // For a list of attributes, see SetPlatformApplicationAttributes (https://docs.aws.amazon.com/sns/latest/api/API_SetPlatformApplicationAttributes.html). 4633 // 4634 // Attributes is a required field 4635 Attributes map[string]*string `type:"map" required:"true"` 4636 4637 // Application names must be made up of only uppercase and lowercase ASCII letters, 4638 // numbers, underscores, hyphens, and periods, and must be between 1 and 256 4639 // characters long. 4640 // 4641 // Name is a required field 4642 Name *string `type:"string" required:"true"` 4643 4644 // The following platforms are supported: ADM (Amazon Device Messaging), APNS 4645 // (Apple Push Notification Service), APNS_SANDBOX, and GCM (Firebase Cloud 4646 // Messaging). 4647 // 4648 // Platform is a required field 4649 Platform *string `type:"string" required:"true"` 4650 } 4651 4652 // String returns the string representation. 4653 // 4654 // API parameter values that are decorated as "sensitive" in the API will not 4655 // be included in the string output. The member name will be present, but the 4656 // value will be replaced with "sensitive". 4657 func (s CreatePlatformApplicationInput) String() string { 4658 return awsutil.Prettify(s) 4659 } 4660 4661 // GoString returns the string representation. 4662 // 4663 // API parameter values that are decorated as "sensitive" in the API will not 4664 // be included in the string output. The member name will be present, but the 4665 // value will be replaced with "sensitive". 4666 func (s CreatePlatformApplicationInput) GoString() string { 4667 return s.String() 4668 } 4669 4670 // Validate inspects the fields of the type to determine if they are valid. 4671 func (s *CreatePlatformApplicationInput) Validate() error { 4672 invalidParams := request.ErrInvalidParams{Context: "CreatePlatformApplicationInput"} 4673 if s.Attributes == nil { 4674 invalidParams.Add(request.NewErrParamRequired("Attributes")) 4675 } 4676 if s.Name == nil { 4677 invalidParams.Add(request.NewErrParamRequired("Name")) 4678 } 4679 if s.Platform == nil { 4680 invalidParams.Add(request.NewErrParamRequired("Platform")) 4681 } 4682 4683 if invalidParams.Len() > 0 { 4684 return invalidParams 4685 } 4686 return nil 4687 } 4688 4689 // SetAttributes sets the Attributes field's value. 4690 func (s *CreatePlatformApplicationInput) SetAttributes(v map[string]*string) *CreatePlatformApplicationInput { 4691 s.Attributes = v 4692 return s 4693 } 4694 4695 // SetName sets the Name field's value. 4696 func (s *CreatePlatformApplicationInput) SetName(v string) *CreatePlatformApplicationInput { 4697 s.Name = &v 4698 return s 4699 } 4700 4701 // SetPlatform sets the Platform field's value. 4702 func (s *CreatePlatformApplicationInput) SetPlatform(v string) *CreatePlatformApplicationInput { 4703 s.Platform = &v 4704 return s 4705 } 4706 4707 // Response from CreatePlatformApplication action. 4708 type CreatePlatformApplicationOutput struct { 4709 _ struct{} `type:"structure"` 4710 4711 // PlatformApplicationArn is returned. 4712 PlatformApplicationArn *string `type:"string"` 4713 } 4714 4715 // String returns the string representation. 4716 // 4717 // API parameter values that are decorated as "sensitive" in the API will not 4718 // be included in the string output. The member name will be present, but the 4719 // value will be replaced with "sensitive". 4720 func (s CreatePlatformApplicationOutput) String() string { 4721 return awsutil.Prettify(s) 4722 } 4723 4724 // GoString returns the string representation. 4725 // 4726 // API parameter values that are decorated as "sensitive" in the API will not 4727 // be included in the string output. The member name will be present, but the 4728 // value will be replaced with "sensitive". 4729 func (s CreatePlatformApplicationOutput) GoString() string { 4730 return s.String() 4731 } 4732 4733 // SetPlatformApplicationArn sets the PlatformApplicationArn field's value. 4734 func (s *CreatePlatformApplicationOutput) SetPlatformApplicationArn(v string) *CreatePlatformApplicationOutput { 4735 s.PlatformApplicationArn = &v 4736 return s 4737 } 4738 4739 // Input for CreatePlatformEndpoint action. 4740 type CreatePlatformEndpointInput struct { 4741 _ struct{} `type:"structure"` 4742 4743 // For a list of attributes, see SetEndpointAttributes (https://docs.aws.amazon.com/sns/latest/api/API_SetEndpointAttributes.html). 4744 Attributes map[string]*string `type:"map"` 4745 4746 // Arbitrary user data to associate with the endpoint. Amazon SNS does not use 4747 // this data. The data must be in UTF-8 format and less than 2KB. 4748 CustomUserData *string `type:"string"` 4749 4750 // PlatformApplicationArn returned from CreatePlatformApplication is used to 4751 // create a an endpoint. 4752 // 4753 // PlatformApplicationArn is a required field 4754 PlatformApplicationArn *string `type:"string" required:"true"` 4755 4756 // Unique identifier created by the notification service for an app on a device. 4757 // The specific name for Token will vary, depending on which notification service 4758 // is being used. For example, when using APNS as the notification service, 4759 // you need the device token. Alternatively, when using GCM (Firebase Cloud 4760 // Messaging) or ADM, the device token equivalent is called the registration 4761 // ID. 4762 // 4763 // Token is a required field 4764 Token *string `type:"string" required:"true"` 4765 } 4766 4767 // String returns the string representation. 4768 // 4769 // API parameter values that are decorated as "sensitive" in the API will not 4770 // be included in the string output. The member name will be present, but the 4771 // value will be replaced with "sensitive". 4772 func (s CreatePlatformEndpointInput) String() string { 4773 return awsutil.Prettify(s) 4774 } 4775 4776 // GoString returns the string representation. 4777 // 4778 // API parameter values that are decorated as "sensitive" in the API will not 4779 // be included in the string output. The member name will be present, but the 4780 // value will be replaced with "sensitive". 4781 func (s CreatePlatformEndpointInput) GoString() string { 4782 return s.String() 4783 } 4784 4785 // Validate inspects the fields of the type to determine if they are valid. 4786 func (s *CreatePlatformEndpointInput) Validate() error { 4787 invalidParams := request.ErrInvalidParams{Context: "CreatePlatformEndpointInput"} 4788 if s.PlatformApplicationArn == nil { 4789 invalidParams.Add(request.NewErrParamRequired("PlatformApplicationArn")) 4790 } 4791 if s.Token == nil { 4792 invalidParams.Add(request.NewErrParamRequired("Token")) 4793 } 4794 4795 if invalidParams.Len() > 0 { 4796 return invalidParams 4797 } 4798 return nil 4799 } 4800 4801 // SetAttributes sets the Attributes field's value. 4802 func (s *CreatePlatformEndpointInput) SetAttributes(v map[string]*string) *CreatePlatformEndpointInput { 4803 s.Attributes = v 4804 return s 4805 } 4806 4807 // SetCustomUserData sets the CustomUserData field's value. 4808 func (s *CreatePlatformEndpointInput) SetCustomUserData(v string) *CreatePlatformEndpointInput { 4809 s.CustomUserData = &v 4810 return s 4811 } 4812 4813 // SetPlatformApplicationArn sets the PlatformApplicationArn field's value. 4814 func (s *CreatePlatformEndpointInput) SetPlatformApplicationArn(v string) *CreatePlatformEndpointInput { 4815 s.PlatformApplicationArn = &v 4816 return s 4817 } 4818 4819 // SetToken sets the Token field's value. 4820 func (s *CreatePlatformEndpointInput) SetToken(v string) *CreatePlatformEndpointInput { 4821 s.Token = &v 4822 return s 4823 } 4824 4825 // Response from CreateEndpoint action. 4826 type CreatePlatformEndpointOutput struct { 4827 _ struct{} `type:"structure"` 4828 4829 // EndpointArn returned from CreateEndpoint action. 4830 EndpointArn *string `type:"string"` 4831 } 4832 4833 // String returns the string representation. 4834 // 4835 // API parameter values that are decorated as "sensitive" in the API will not 4836 // be included in the string output. The member name will be present, but the 4837 // value will be replaced with "sensitive". 4838 func (s CreatePlatformEndpointOutput) String() string { 4839 return awsutil.Prettify(s) 4840 } 4841 4842 // GoString returns the string representation. 4843 // 4844 // API parameter values that are decorated as "sensitive" in the API will not 4845 // be included in the string output. The member name will be present, but the 4846 // value will be replaced with "sensitive". 4847 func (s CreatePlatformEndpointOutput) GoString() string { 4848 return s.String() 4849 } 4850 4851 // SetEndpointArn sets the EndpointArn field's value. 4852 func (s *CreatePlatformEndpointOutput) SetEndpointArn(v string) *CreatePlatformEndpointOutput { 4853 s.EndpointArn = &v 4854 return s 4855 } 4856 4857 type CreateSMSSandboxPhoneNumberInput struct { 4858 _ struct{} `type:"structure"` 4859 4860 // The language to use for sending the OTP. The default value is en-US. 4861 LanguageCode *string `type:"string" enum:"LanguageCodeString"` 4862 4863 // The destination phone number to verify. On verification, Amazon SNS adds 4864 // this phone number to the list of verified phone numbers that you can send 4865 // SMS messages to. 4866 // 4867 // PhoneNumber is a required field 4868 PhoneNumber *string `type:"string" required:"true"` 4869 } 4870 4871 // String returns the string representation. 4872 // 4873 // API parameter values that are decorated as "sensitive" in the API will not 4874 // be included in the string output. The member name will be present, but the 4875 // value will be replaced with "sensitive". 4876 func (s CreateSMSSandboxPhoneNumberInput) String() string { 4877 return awsutil.Prettify(s) 4878 } 4879 4880 // GoString returns the string representation. 4881 // 4882 // API parameter values that are decorated as "sensitive" in the API will not 4883 // be included in the string output. The member name will be present, but the 4884 // value will be replaced with "sensitive". 4885 func (s CreateSMSSandboxPhoneNumberInput) GoString() string { 4886 return s.String() 4887 } 4888 4889 // Validate inspects the fields of the type to determine if they are valid. 4890 func (s *CreateSMSSandboxPhoneNumberInput) Validate() error { 4891 invalidParams := request.ErrInvalidParams{Context: "CreateSMSSandboxPhoneNumberInput"} 4892 if s.PhoneNumber == nil { 4893 invalidParams.Add(request.NewErrParamRequired("PhoneNumber")) 4894 } 4895 4896 if invalidParams.Len() > 0 { 4897 return invalidParams 4898 } 4899 return nil 4900 } 4901 4902 // SetLanguageCode sets the LanguageCode field's value. 4903 func (s *CreateSMSSandboxPhoneNumberInput) SetLanguageCode(v string) *CreateSMSSandboxPhoneNumberInput { 4904 s.LanguageCode = &v 4905 return s 4906 } 4907 4908 // SetPhoneNumber sets the PhoneNumber field's value. 4909 func (s *CreateSMSSandboxPhoneNumberInput) SetPhoneNumber(v string) *CreateSMSSandboxPhoneNumberInput { 4910 s.PhoneNumber = &v 4911 return s 4912 } 4913 4914 type CreateSMSSandboxPhoneNumberOutput struct { 4915 _ struct{} `type:"structure"` 4916 } 4917 4918 // String returns the string representation. 4919 // 4920 // API parameter values that are decorated as "sensitive" in the API will not 4921 // be included in the string output. The member name will be present, but the 4922 // value will be replaced with "sensitive". 4923 func (s CreateSMSSandboxPhoneNumberOutput) String() string { 4924 return awsutil.Prettify(s) 4925 } 4926 4927 // GoString returns the string representation. 4928 // 4929 // API parameter values that are decorated as "sensitive" in the API will not 4930 // be included in the string output. The member name will be present, but the 4931 // value will be replaced with "sensitive". 4932 func (s CreateSMSSandboxPhoneNumberOutput) GoString() string { 4933 return s.String() 4934 } 4935 4936 // Input for CreateTopic action. 4937 type CreateTopicInput struct { 4938 _ struct{} `type:"structure"` 4939 4940 // A map of attributes with their corresponding values. 4941 // 4942 // The following lists the names, descriptions, and values of the special request 4943 // parameters that the CreateTopic action uses: 4944 // 4945 // * DeliveryPolicy – The policy that defines how Amazon SNS retries failed 4946 // deliveries to HTTP/S endpoints. 4947 // 4948 // * DisplayName – The display name to use for a topic with SMS subscriptions. 4949 // 4950 // * FifoTopic – Set to true to create a FIFO topic. 4951 // 4952 // * Policy – The policy that defines who can access your topic. By default, 4953 // only the topic owner can publish or subscribe to the topic. 4954 // 4955 // The following attribute applies only to server-side encryption (https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html): 4956 // 4957 // * KmsMasterKeyId – The ID of an Amazon Web Services managed customer 4958 // master key (CMK) for Amazon SNS or a custom CMK. For more information, 4959 // see Key Terms (https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms). 4960 // For more examples, see KeyId (https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters) 4961 // in the Key Management Service API Reference. 4962 // 4963 // The following attributes apply only to FIFO topics (https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html): 4964 // 4965 // * FifoTopic – When this is set to true, a FIFO topic is created. 4966 // 4967 // * ContentBasedDeduplication – Enables content-based deduplication for 4968 // FIFO topics. By default, ContentBasedDeduplication is set to false. If 4969 // you create a FIFO topic and this attribute is false, you must specify 4970 // a value for the MessageDeduplicationId parameter for the Publish (https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) 4971 // action. When you set ContentBasedDeduplication to true, Amazon SNS uses 4972 // a SHA-256 hash to generate the MessageDeduplicationId using the body of 4973 // the message (but not the attributes of the message). (Optional) To override 4974 // the generated value, you can specify a value for the MessageDeduplicationId 4975 // parameter for the Publish action. 4976 Attributes map[string]*string `type:"map"` 4977 4978 // The name of the topic you want to create. 4979 // 4980 // Constraints: Topic names must be made up of only uppercase and lowercase 4981 // ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 4982 // 256 characters long. 4983 // 4984 // For a FIFO (first-in-first-out) topic, the name must end with the .fifo suffix. 4985 // 4986 // Name is a required field 4987 Name *string `type:"string" required:"true"` 4988 4989 // The list of tags to add to a new topic. 4990 // 4991 // To be able to tag a topic on creation, you must have the sns:CreateTopic 4992 // and sns:TagResource permissions. 4993 Tags []*Tag `type:"list"` 4994 } 4995 4996 // String returns the string representation. 4997 // 4998 // API parameter values that are decorated as "sensitive" in the API will not 4999 // be included in the string output. The member name will be present, but the 5000 // value will be replaced with "sensitive". 5001 func (s CreateTopicInput) String() string { 5002 return awsutil.Prettify(s) 5003 } 5004 5005 // GoString returns the string representation. 5006 // 5007 // API parameter values that are decorated as "sensitive" in the API will not 5008 // be included in the string output. The member name will be present, but the 5009 // value will be replaced with "sensitive". 5010 func (s CreateTopicInput) GoString() string { 5011 return s.String() 5012 } 5013 5014 // Validate inspects the fields of the type to determine if they are valid. 5015 func (s *CreateTopicInput) Validate() error { 5016 invalidParams := request.ErrInvalidParams{Context: "CreateTopicInput"} 5017 if s.Name == nil { 5018 invalidParams.Add(request.NewErrParamRequired("Name")) 5019 } 5020 if s.Tags != nil { 5021 for i, v := range s.Tags { 5022 if v == nil { 5023 continue 5024 } 5025 if err := v.Validate(); err != nil { 5026 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 5027 } 5028 } 5029 } 5030 5031 if invalidParams.Len() > 0 { 5032 return invalidParams 5033 } 5034 return nil 5035 } 5036 5037 // SetAttributes sets the Attributes field's value. 5038 func (s *CreateTopicInput) SetAttributes(v map[string]*string) *CreateTopicInput { 5039 s.Attributes = v 5040 return s 5041 } 5042 5043 // SetName sets the Name field's value. 5044 func (s *CreateTopicInput) SetName(v string) *CreateTopicInput { 5045 s.Name = &v 5046 return s 5047 } 5048 5049 // SetTags sets the Tags field's value. 5050 func (s *CreateTopicInput) SetTags(v []*Tag) *CreateTopicInput { 5051 s.Tags = v 5052 return s 5053 } 5054 5055 // Response from CreateTopic action. 5056 type CreateTopicOutput struct { 5057 _ struct{} `type:"structure"` 5058 5059 // The Amazon Resource Name (ARN) assigned to the created topic. 5060 TopicArn *string `type:"string"` 5061 } 5062 5063 // String returns the string representation. 5064 // 5065 // API parameter values that are decorated as "sensitive" in the API will not 5066 // be included in the string output. The member name will be present, but the 5067 // value will be replaced with "sensitive". 5068 func (s CreateTopicOutput) String() string { 5069 return awsutil.Prettify(s) 5070 } 5071 5072 // GoString returns the string representation. 5073 // 5074 // API parameter values that are decorated as "sensitive" in the API will not 5075 // be included in the string output. The member name will be present, but the 5076 // value will be replaced with "sensitive". 5077 func (s CreateTopicOutput) GoString() string { 5078 return s.String() 5079 } 5080 5081 // SetTopicArn sets the TopicArn field's value. 5082 func (s *CreateTopicOutput) SetTopicArn(v string) *CreateTopicOutput { 5083 s.TopicArn = &v 5084 return s 5085 } 5086 5087 // Input for DeleteEndpoint action. 5088 type DeleteEndpointInput struct { 5089 _ struct{} `type:"structure"` 5090 5091 // EndpointArn of endpoint to delete. 5092 // 5093 // EndpointArn is a required field 5094 EndpointArn *string `type:"string" required:"true"` 5095 } 5096 5097 // String returns the string representation. 5098 // 5099 // API parameter values that are decorated as "sensitive" in the API will not 5100 // be included in the string output. The member name will be present, but the 5101 // value will be replaced with "sensitive". 5102 func (s DeleteEndpointInput) String() string { 5103 return awsutil.Prettify(s) 5104 } 5105 5106 // GoString returns the string representation. 5107 // 5108 // API parameter values that are decorated as "sensitive" in the API will not 5109 // be included in the string output. The member name will be present, but the 5110 // value will be replaced with "sensitive". 5111 func (s DeleteEndpointInput) GoString() string { 5112 return s.String() 5113 } 5114 5115 // Validate inspects the fields of the type to determine if they are valid. 5116 func (s *DeleteEndpointInput) Validate() error { 5117 invalidParams := request.ErrInvalidParams{Context: "DeleteEndpointInput"} 5118 if s.EndpointArn == nil { 5119 invalidParams.Add(request.NewErrParamRequired("EndpointArn")) 5120 } 5121 5122 if invalidParams.Len() > 0 { 5123 return invalidParams 5124 } 5125 return nil 5126 } 5127 5128 // SetEndpointArn sets the EndpointArn field's value. 5129 func (s *DeleteEndpointInput) SetEndpointArn(v string) *DeleteEndpointInput { 5130 s.EndpointArn = &v 5131 return s 5132 } 5133 5134 type DeleteEndpointOutput struct { 5135 _ struct{} `type:"structure"` 5136 } 5137 5138 // String returns the string representation. 5139 // 5140 // API parameter values that are decorated as "sensitive" in the API will not 5141 // be included in the string output. The member name will be present, but the 5142 // value will be replaced with "sensitive". 5143 func (s DeleteEndpointOutput) String() string { 5144 return awsutil.Prettify(s) 5145 } 5146 5147 // GoString returns the string representation. 5148 // 5149 // API parameter values that are decorated as "sensitive" in the API will not 5150 // be included in the string output. The member name will be present, but the 5151 // value will be replaced with "sensitive". 5152 func (s DeleteEndpointOutput) GoString() string { 5153 return s.String() 5154 } 5155 5156 // Input for DeletePlatformApplication action. 5157 type DeletePlatformApplicationInput struct { 5158 _ struct{} `type:"structure"` 5159 5160 // PlatformApplicationArn of platform application object to delete. 5161 // 5162 // PlatformApplicationArn is a required field 5163 PlatformApplicationArn *string `type:"string" required:"true"` 5164 } 5165 5166 // String returns the string representation. 5167 // 5168 // API parameter values that are decorated as "sensitive" in the API will not 5169 // be included in the string output. The member name will be present, but the 5170 // value will be replaced with "sensitive". 5171 func (s DeletePlatformApplicationInput) String() string { 5172 return awsutil.Prettify(s) 5173 } 5174 5175 // GoString returns the string representation. 5176 // 5177 // API parameter values that are decorated as "sensitive" in the API will not 5178 // be included in the string output. The member name will be present, but the 5179 // value will be replaced with "sensitive". 5180 func (s DeletePlatformApplicationInput) GoString() string { 5181 return s.String() 5182 } 5183 5184 // Validate inspects the fields of the type to determine if they are valid. 5185 func (s *DeletePlatformApplicationInput) Validate() error { 5186 invalidParams := request.ErrInvalidParams{Context: "DeletePlatformApplicationInput"} 5187 if s.PlatformApplicationArn == nil { 5188 invalidParams.Add(request.NewErrParamRequired("PlatformApplicationArn")) 5189 } 5190 5191 if invalidParams.Len() > 0 { 5192 return invalidParams 5193 } 5194 return nil 5195 } 5196 5197 // SetPlatformApplicationArn sets the PlatformApplicationArn field's value. 5198 func (s *DeletePlatformApplicationInput) SetPlatformApplicationArn(v string) *DeletePlatformApplicationInput { 5199 s.PlatformApplicationArn = &v 5200 return s 5201 } 5202 5203 type DeletePlatformApplicationOutput struct { 5204 _ struct{} `type:"structure"` 5205 } 5206 5207 // String returns the string representation. 5208 // 5209 // API parameter values that are decorated as "sensitive" in the API will not 5210 // be included in the string output. The member name will be present, but the 5211 // value will be replaced with "sensitive". 5212 func (s DeletePlatformApplicationOutput) String() string { 5213 return awsutil.Prettify(s) 5214 } 5215 5216 // GoString returns the string representation. 5217 // 5218 // API parameter values that are decorated as "sensitive" in the API will not 5219 // be included in the string output. The member name will be present, but the 5220 // value will be replaced with "sensitive". 5221 func (s DeletePlatformApplicationOutput) GoString() string { 5222 return s.String() 5223 } 5224 5225 type DeleteSMSSandboxPhoneNumberInput struct { 5226 _ struct{} `type:"structure"` 5227 5228 // The destination phone number to delete. 5229 // 5230 // PhoneNumber is a required field 5231 PhoneNumber *string `type:"string" required:"true"` 5232 } 5233 5234 // String returns the string representation. 5235 // 5236 // API parameter values that are decorated as "sensitive" in the API will not 5237 // be included in the string output. The member name will be present, but the 5238 // value will be replaced with "sensitive". 5239 func (s DeleteSMSSandboxPhoneNumberInput) String() string { 5240 return awsutil.Prettify(s) 5241 } 5242 5243 // GoString returns the string representation. 5244 // 5245 // API parameter values that are decorated as "sensitive" in the API will not 5246 // be included in the string output. The member name will be present, but the 5247 // value will be replaced with "sensitive". 5248 func (s DeleteSMSSandboxPhoneNumberInput) GoString() string { 5249 return s.String() 5250 } 5251 5252 // Validate inspects the fields of the type to determine if they are valid. 5253 func (s *DeleteSMSSandboxPhoneNumberInput) Validate() error { 5254 invalidParams := request.ErrInvalidParams{Context: "DeleteSMSSandboxPhoneNumberInput"} 5255 if s.PhoneNumber == nil { 5256 invalidParams.Add(request.NewErrParamRequired("PhoneNumber")) 5257 } 5258 5259 if invalidParams.Len() > 0 { 5260 return invalidParams 5261 } 5262 return nil 5263 } 5264 5265 // SetPhoneNumber sets the PhoneNumber field's value. 5266 func (s *DeleteSMSSandboxPhoneNumberInput) SetPhoneNumber(v string) *DeleteSMSSandboxPhoneNumberInput { 5267 s.PhoneNumber = &v 5268 return s 5269 } 5270 5271 type DeleteSMSSandboxPhoneNumberOutput struct { 5272 _ struct{} `type:"structure"` 5273 } 5274 5275 // String returns the string representation. 5276 // 5277 // API parameter values that are decorated as "sensitive" in the API will not 5278 // be included in the string output. The member name will be present, but the 5279 // value will be replaced with "sensitive". 5280 func (s DeleteSMSSandboxPhoneNumberOutput) String() string { 5281 return awsutil.Prettify(s) 5282 } 5283 5284 // GoString returns the string representation. 5285 // 5286 // API parameter values that are decorated as "sensitive" in the API will not 5287 // be included in the string output. The member name will be present, but the 5288 // value will be replaced with "sensitive". 5289 func (s DeleteSMSSandboxPhoneNumberOutput) GoString() string { 5290 return s.String() 5291 } 5292 5293 type DeleteTopicInput struct { 5294 _ struct{} `type:"structure"` 5295 5296 // The ARN of the topic you want to delete. 5297 // 5298 // TopicArn is a required field 5299 TopicArn *string `type:"string" required:"true"` 5300 } 5301 5302 // String returns the string representation. 5303 // 5304 // API parameter values that are decorated as "sensitive" in the API will not 5305 // be included in the string output. The member name will be present, but the 5306 // value will be replaced with "sensitive". 5307 func (s DeleteTopicInput) String() string { 5308 return awsutil.Prettify(s) 5309 } 5310 5311 // GoString returns the string representation. 5312 // 5313 // API parameter values that are decorated as "sensitive" in the API will not 5314 // be included in the string output. The member name will be present, but the 5315 // value will be replaced with "sensitive". 5316 func (s DeleteTopicInput) GoString() string { 5317 return s.String() 5318 } 5319 5320 // Validate inspects the fields of the type to determine if they are valid. 5321 func (s *DeleteTopicInput) Validate() error { 5322 invalidParams := request.ErrInvalidParams{Context: "DeleteTopicInput"} 5323 if s.TopicArn == nil { 5324 invalidParams.Add(request.NewErrParamRequired("TopicArn")) 5325 } 5326 5327 if invalidParams.Len() > 0 { 5328 return invalidParams 5329 } 5330 return nil 5331 } 5332 5333 // SetTopicArn sets the TopicArn field's value. 5334 func (s *DeleteTopicInput) SetTopicArn(v string) *DeleteTopicInput { 5335 s.TopicArn = &v 5336 return s 5337 } 5338 5339 type DeleteTopicOutput struct { 5340 _ struct{} `type:"structure"` 5341 } 5342 5343 // String returns the string representation. 5344 // 5345 // API parameter values that are decorated as "sensitive" in the API will not 5346 // be included in the string output. The member name will be present, but the 5347 // value will be replaced with "sensitive". 5348 func (s DeleteTopicOutput) String() string { 5349 return awsutil.Prettify(s) 5350 } 5351 5352 // GoString returns the string representation. 5353 // 5354 // API parameter values that are decorated as "sensitive" in the API will not 5355 // be included in the string output. The member name will be present, but the 5356 // value will be replaced with "sensitive". 5357 func (s DeleteTopicOutput) GoString() string { 5358 return s.String() 5359 } 5360 5361 // Endpoint for mobile app and device. 5362 type Endpoint struct { 5363 _ struct{} `type:"structure"` 5364 5365 // Attributes for endpoint. 5366 Attributes map[string]*string `type:"map"` 5367 5368 // EndpointArn for mobile app and device. 5369 EndpointArn *string `type:"string"` 5370 } 5371 5372 // String returns the string representation. 5373 // 5374 // API parameter values that are decorated as "sensitive" in the API will not 5375 // be included in the string output. The member name will be present, but the 5376 // value will be replaced with "sensitive". 5377 func (s Endpoint) String() string { 5378 return awsutil.Prettify(s) 5379 } 5380 5381 // GoString returns the string representation. 5382 // 5383 // API parameter values that are decorated as "sensitive" in the API will not 5384 // be included in the string output. The member name will be present, but the 5385 // value will be replaced with "sensitive". 5386 func (s Endpoint) GoString() string { 5387 return s.String() 5388 } 5389 5390 // SetAttributes sets the Attributes field's value. 5391 func (s *Endpoint) SetAttributes(v map[string]*string) *Endpoint { 5392 s.Attributes = v 5393 return s 5394 } 5395 5396 // SetEndpointArn sets the EndpointArn field's value. 5397 func (s *Endpoint) SetEndpointArn(v string) *Endpoint { 5398 s.EndpointArn = &v 5399 return s 5400 } 5401 5402 // Input for GetEndpointAttributes action. 5403 type GetEndpointAttributesInput struct { 5404 _ struct{} `type:"structure"` 5405 5406 // EndpointArn for GetEndpointAttributes input. 5407 // 5408 // EndpointArn is a required field 5409 EndpointArn *string `type:"string" required:"true"` 5410 } 5411 5412 // String returns the string representation. 5413 // 5414 // API parameter values that are decorated as "sensitive" in the API will not 5415 // be included in the string output. The member name will be present, but the 5416 // value will be replaced with "sensitive". 5417 func (s GetEndpointAttributesInput) String() string { 5418 return awsutil.Prettify(s) 5419 } 5420 5421 // GoString returns the string representation. 5422 // 5423 // API parameter values that are decorated as "sensitive" in the API will not 5424 // be included in the string output. The member name will be present, but the 5425 // value will be replaced with "sensitive". 5426 func (s GetEndpointAttributesInput) GoString() string { 5427 return s.String() 5428 } 5429 5430 // Validate inspects the fields of the type to determine if they are valid. 5431 func (s *GetEndpointAttributesInput) Validate() error { 5432 invalidParams := request.ErrInvalidParams{Context: "GetEndpointAttributesInput"} 5433 if s.EndpointArn == nil { 5434 invalidParams.Add(request.NewErrParamRequired("EndpointArn")) 5435 } 5436 5437 if invalidParams.Len() > 0 { 5438 return invalidParams 5439 } 5440 return nil 5441 } 5442 5443 // SetEndpointArn sets the EndpointArn field's value. 5444 func (s *GetEndpointAttributesInput) SetEndpointArn(v string) *GetEndpointAttributesInput { 5445 s.EndpointArn = &v 5446 return s 5447 } 5448 5449 // Response from GetEndpointAttributes of the EndpointArn. 5450 type GetEndpointAttributesOutput struct { 5451 _ struct{} `type:"structure"` 5452 5453 // Attributes include the following: 5454 // 5455 // * CustomUserData – arbitrary user data to associate with the endpoint. 5456 // Amazon SNS does not use this data. The data must be in UTF-8 format and 5457 // less than 2KB. 5458 // 5459 // * Enabled – flag that enables/disables delivery to the endpoint. Amazon 5460 // SNS will set this to false when a notification service indicates to Amazon 5461 // SNS that the endpoint is invalid. Users can set it back to true, typically 5462 // after updating Token. 5463 // 5464 // * Token – device token, also referred to as a registration id, for an 5465 // app and mobile device. This is returned from the notification service 5466 // when an app and mobile device are registered with the notification service. 5467 // The device token for the iOS platform is returned in lowercase. 5468 Attributes map[string]*string `type:"map"` 5469 } 5470 5471 // String returns the string representation. 5472 // 5473 // API parameter values that are decorated as "sensitive" in the API will not 5474 // be included in the string output. The member name will be present, but the 5475 // value will be replaced with "sensitive". 5476 func (s GetEndpointAttributesOutput) String() string { 5477 return awsutil.Prettify(s) 5478 } 5479 5480 // GoString returns the string representation. 5481 // 5482 // API parameter values that are decorated as "sensitive" in the API will not 5483 // be included in the string output. The member name will be present, but the 5484 // value will be replaced with "sensitive". 5485 func (s GetEndpointAttributesOutput) GoString() string { 5486 return s.String() 5487 } 5488 5489 // SetAttributes sets the Attributes field's value. 5490 func (s *GetEndpointAttributesOutput) SetAttributes(v map[string]*string) *GetEndpointAttributesOutput { 5491 s.Attributes = v 5492 return s 5493 } 5494 5495 // Input for GetPlatformApplicationAttributes action. 5496 type GetPlatformApplicationAttributesInput struct { 5497 _ struct{} `type:"structure"` 5498 5499 // PlatformApplicationArn for GetPlatformApplicationAttributesInput. 5500 // 5501 // PlatformApplicationArn is a required field 5502 PlatformApplicationArn *string `type:"string" required:"true"` 5503 } 5504 5505 // String returns the string representation. 5506 // 5507 // API parameter values that are decorated as "sensitive" in the API will not 5508 // be included in the string output. The member name will be present, but the 5509 // value will be replaced with "sensitive". 5510 func (s GetPlatformApplicationAttributesInput) String() string { 5511 return awsutil.Prettify(s) 5512 } 5513 5514 // GoString returns the string representation. 5515 // 5516 // API parameter values that are decorated as "sensitive" in the API will not 5517 // be included in the string output. The member name will be present, but the 5518 // value will be replaced with "sensitive". 5519 func (s GetPlatformApplicationAttributesInput) GoString() string { 5520 return s.String() 5521 } 5522 5523 // Validate inspects the fields of the type to determine if they are valid. 5524 func (s *GetPlatformApplicationAttributesInput) Validate() error { 5525 invalidParams := request.ErrInvalidParams{Context: "GetPlatformApplicationAttributesInput"} 5526 if s.PlatformApplicationArn == nil { 5527 invalidParams.Add(request.NewErrParamRequired("PlatformApplicationArn")) 5528 } 5529 5530 if invalidParams.Len() > 0 { 5531 return invalidParams 5532 } 5533 return nil 5534 } 5535 5536 // SetPlatformApplicationArn sets the PlatformApplicationArn field's value. 5537 func (s *GetPlatformApplicationAttributesInput) SetPlatformApplicationArn(v string) *GetPlatformApplicationAttributesInput { 5538 s.PlatformApplicationArn = &v 5539 return s 5540 } 5541 5542 // Response for GetPlatformApplicationAttributes action. 5543 type GetPlatformApplicationAttributesOutput struct { 5544 _ struct{} `type:"structure"` 5545 5546 // Attributes include the following: 5547 // 5548 // * EventEndpointCreated – Topic ARN to which EndpointCreated event notifications 5549 // should be sent. 5550 // 5551 // * EventEndpointDeleted – Topic ARN to which EndpointDeleted event notifications 5552 // should be sent. 5553 // 5554 // * EventEndpointUpdated – Topic ARN to which EndpointUpdate event notifications 5555 // should be sent. 5556 // 5557 // * EventDeliveryFailure – Topic ARN to which DeliveryFailure event notifications 5558 // should be sent upon Direct Publish delivery failure (permanent) to one 5559 // of the application's endpoints. 5560 Attributes map[string]*string `type:"map"` 5561 } 5562 5563 // String returns the string representation. 5564 // 5565 // API parameter values that are decorated as "sensitive" in the API will not 5566 // be included in the string output. The member name will be present, but the 5567 // value will be replaced with "sensitive". 5568 func (s GetPlatformApplicationAttributesOutput) String() string { 5569 return awsutil.Prettify(s) 5570 } 5571 5572 // GoString returns the string representation. 5573 // 5574 // API parameter values that are decorated as "sensitive" in the API will not 5575 // be included in the string output. The member name will be present, but the 5576 // value will be replaced with "sensitive". 5577 func (s GetPlatformApplicationAttributesOutput) GoString() string { 5578 return s.String() 5579 } 5580 5581 // SetAttributes sets the Attributes field's value. 5582 func (s *GetPlatformApplicationAttributesOutput) SetAttributes(v map[string]*string) *GetPlatformApplicationAttributesOutput { 5583 s.Attributes = v 5584 return s 5585 } 5586 5587 // The input for the GetSMSAttributes request. 5588 type GetSMSAttributesInput struct { 5589 _ struct{} `type:"structure"` 5590 5591 // A list of the individual attribute names, such as MonthlySpendLimit, for 5592 // which you want values. 5593 // 5594 // For all attribute names, see SetSMSAttributes (https://docs.aws.amazon.com/sns/latest/api/API_SetSMSAttributes.html). 5595 // 5596 // If you don't use this parameter, Amazon SNS returns all SMS attributes. 5597 Attributes []*string `locationName:"attributes" type:"list"` 5598 } 5599 5600 // String returns the string representation. 5601 // 5602 // API parameter values that are decorated as "sensitive" in the API will not 5603 // be included in the string output. The member name will be present, but the 5604 // value will be replaced with "sensitive". 5605 func (s GetSMSAttributesInput) String() string { 5606 return awsutil.Prettify(s) 5607 } 5608 5609 // GoString returns the string representation. 5610 // 5611 // API parameter values that are decorated as "sensitive" in the API will not 5612 // be included in the string output. The member name will be present, but the 5613 // value will be replaced with "sensitive". 5614 func (s GetSMSAttributesInput) GoString() string { 5615 return s.String() 5616 } 5617 5618 // SetAttributes sets the Attributes field's value. 5619 func (s *GetSMSAttributesInput) SetAttributes(v []*string) *GetSMSAttributesInput { 5620 s.Attributes = v 5621 return s 5622 } 5623 5624 // The response from the GetSMSAttributes request. 5625 type GetSMSAttributesOutput struct { 5626 _ struct{} `type:"structure"` 5627 5628 // The SMS attribute names and their values. 5629 Attributes map[string]*string `locationName:"attributes" type:"map"` 5630 } 5631 5632 // String returns the string representation. 5633 // 5634 // API parameter values that are decorated as "sensitive" in the API will not 5635 // be included in the string output. The member name will be present, but the 5636 // value will be replaced with "sensitive". 5637 func (s GetSMSAttributesOutput) String() string { 5638 return awsutil.Prettify(s) 5639 } 5640 5641 // GoString returns the string representation. 5642 // 5643 // API parameter values that are decorated as "sensitive" in the API will not 5644 // be included in the string output. The member name will be present, but the 5645 // value will be replaced with "sensitive". 5646 func (s GetSMSAttributesOutput) GoString() string { 5647 return s.String() 5648 } 5649 5650 // SetAttributes sets the Attributes field's value. 5651 func (s *GetSMSAttributesOutput) SetAttributes(v map[string]*string) *GetSMSAttributesOutput { 5652 s.Attributes = v 5653 return s 5654 } 5655 5656 type GetSMSSandboxAccountStatusInput struct { 5657 _ struct{} `type:"structure"` 5658 } 5659 5660 // String returns the string representation. 5661 // 5662 // API parameter values that are decorated as "sensitive" in the API will not 5663 // be included in the string output. The member name will be present, but the 5664 // value will be replaced with "sensitive". 5665 func (s GetSMSSandboxAccountStatusInput) String() string { 5666 return awsutil.Prettify(s) 5667 } 5668 5669 // GoString returns the string representation. 5670 // 5671 // API parameter values that are decorated as "sensitive" in the API will not 5672 // be included in the string output. The member name will be present, but the 5673 // value will be replaced with "sensitive". 5674 func (s GetSMSSandboxAccountStatusInput) GoString() string { 5675 return s.String() 5676 } 5677 5678 type GetSMSSandboxAccountStatusOutput struct { 5679 _ struct{} `type:"structure"` 5680 5681 // Indicates whether the calling account is in the SMS sandbox. 5682 // 5683 // IsInSandbox is a required field 5684 IsInSandbox *bool `type:"boolean" required:"true"` 5685 } 5686 5687 // String returns the string representation. 5688 // 5689 // API parameter values that are decorated as "sensitive" in the API will not 5690 // be included in the string output. The member name will be present, but the 5691 // value will be replaced with "sensitive". 5692 func (s GetSMSSandboxAccountStatusOutput) String() string { 5693 return awsutil.Prettify(s) 5694 } 5695 5696 // GoString returns the string representation. 5697 // 5698 // API parameter values that are decorated as "sensitive" in the API will not 5699 // be included in the string output. The member name will be present, but the 5700 // value will be replaced with "sensitive". 5701 func (s GetSMSSandboxAccountStatusOutput) GoString() string { 5702 return s.String() 5703 } 5704 5705 // SetIsInSandbox sets the IsInSandbox field's value. 5706 func (s *GetSMSSandboxAccountStatusOutput) SetIsInSandbox(v bool) *GetSMSSandboxAccountStatusOutput { 5707 s.IsInSandbox = &v 5708 return s 5709 } 5710 5711 // Input for GetSubscriptionAttributes. 5712 type GetSubscriptionAttributesInput struct { 5713 _ struct{} `type:"structure"` 5714 5715 // The ARN of the subscription whose properties you want to get. 5716 // 5717 // SubscriptionArn is a required field 5718 SubscriptionArn *string `type:"string" required:"true"` 5719 } 5720 5721 // String returns the string representation. 5722 // 5723 // API parameter values that are decorated as "sensitive" in the API will not 5724 // be included in the string output. The member name will be present, but the 5725 // value will be replaced with "sensitive". 5726 func (s GetSubscriptionAttributesInput) String() string { 5727 return awsutil.Prettify(s) 5728 } 5729 5730 // GoString returns the string representation. 5731 // 5732 // API parameter values that are decorated as "sensitive" in the API will not 5733 // be included in the string output. The member name will be present, but the 5734 // value will be replaced with "sensitive". 5735 func (s GetSubscriptionAttributesInput) GoString() string { 5736 return s.String() 5737 } 5738 5739 // Validate inspects the fields of the type to determine if they are valid. 5740 func (s *GetSubscriptionAttributesInput) Validate() error { 5741 invalidParams := request.ErrInvalidParams{Context: "GetSubscriptionAttributesInput"} 5742 if s.SubscriptionArn == nil { 5743 invalidParams.Add(request.NewErrParamRequired("SubscriptionArn")) 5744 } 5745 5746 if invalidParams.Len() > 0 { 5747 return invalidParams 5748 } 5749 return nil 5750 } 5751 5752 // SetSubscriptionArn sets the SubscriptionArn field's value. 5753 func (s *GetSubscriptionAttributesInput) SetSubscriptionArn(v string) *GetSubscriptionAttributesInput { 5754 s.SubscriptionArn = &v 5755 return s 5756 } 5757 5758 // Response for GetSubscriptionAttributes action. 5759 type GetSubscriptionAttributesOutput struct { 5760 _ struct{} `type:"structure"` 5761 5762 // A map of the subscription's attributes. Attributes in this map include the 5763 // following: 5764 // 5765 // * ConfirmationWasAuthenticated – true if the subscription confirmation 5766 // request was authenticated. 5767 // 5768 // * DeliveryPolicy – The JSON serialization of the subscription's delivery 5769 // policy. 5770 // 5771 // * EffectiveDeliveryPolicy – The JSON serialization of the effective 5772 // delivery policy that takes into account the topic delivery policy and 5773 // account system defaults. 5774 // 5775 // * FilterPolicy – The filter policy JSON that is assigned to the subscription. 5776 // For more information, see Amazon SNS Message Filtering (https://docs.aws.amazon.com/sns/latest/dg/sns-message-filtering.html) 5777 // in the Amazon SNS Developer Guide. 5778 // 5779 // * Owner – The account ID of the subscription's owner. 5780 // 5781 // * PendingConfirmation – true if the subscription hasn't been confirmed. 5782 // To confirm a pending subscription, call the ConfirmSubscription action 5783 // with a confirmation token. 5784 // 5785 // * RawMessageDelivery – true if raw message delivery is enabled for the 5786 // subscription. Raw messages are free of JSON formatting and can be sent 5787 // to HTTP/S and Amazon SQS endpoints. 5788 // 5789 // * RedrivePolicy – When specified, sends undeliverable messages to the 5790 // specified Amazon SQS dead-letter queue. Messages that can't be delivered 5791 // due to client errors (for example, when the subscribed endpoint is unreachable) 5792 // or server errors (for example, when the service that powers the subscribed 5793 // endpoint becomes unavailable) are held in the dead-letter queue for further 5794 // analysis or reprocessing. 5795 // 5796 // * SubscriptionArn – The subscription's ARN. 5797 // 5798 // * TopicArn – The topic ARN that the subscription is associated with. 5799 // 5800 // The following attribute applies only to Amazon Kinesis Data Firehose delivery 5801 // stream subscriptions: 5802 // 5803 // * SubscriptionRoleArn – The ARN of the IAM role that has the following: 5804 // Permission to write to the Kinesis Data Firehose delivery stream Amazon 5805 // SNS listed as a trusted entity Specifying a valid ARN for this attribute 5806 // is required for Kinesis Data Firehose delivery stream subscriptions. For 5807 // more information, see Fanout to Kinesis Data Firehose delivery streams 5808 // (https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html) 5809 // in the Amazon SNS Developer Guide. 5810 Attributes map[string]*string `type:"map"` 5811 } 5812 5813 // String returns the string representation. 5814 // 5815 // API parameter values that are decorated as "sensitive" in the API will not 5816 // be included in the string output. The member name will be present, but the 5817 // value will be replaced with "sensitive". 5818 func (s GetSubscriptionAttributesOutput) String() string { 5819 return awsutil.Prettify(s) 5820 } 5821 5822 // GoString returns the string representation. 5823 // 5824 // API parameter values that are decorated as "sensitive" in the API will not 5825 // be included in the string output. The member name will be present, but the 5826 // value will be replaced with "sensitive". 5827 func (s GetSubscriptionAttributesOutput) GoString() string { 5828 return s.String() 5829 } 5830 5831 // SetAttributes sets the Attributes field's value. 5832 func (s *GetSubscriptionAttributesOutput) SetAttributes(v map[string]*string) *GetSubscriptionAttributesOutput { 5833 s.Attributes = v 5834 return s 5835 } 5836 5837 // Input for GetTopicAttributes action. 5838 type GetTopicAttributesInput struct { 5839 _ struct{} `type:"structure"` 5840 5841 // The ARN of the topic whose properties you want to get. 5842 // 5843 // TopicArn is a required field 5844 TopicArn *string `type:"string" required:"true"` 5845 } 5846 5847 // String returns the string representation. 5848 // 5849 // API parameter values that are decorated as "sensitive" in the API will not 5850 // be included in the string output. The member name will be present, but the 5851 // value will be replaced with "sensitive". 5852 func (s GetTopicAttributesInput) String() string { 5853 return awsutil.Prettify(s) 5854 } 5855 5856 // GoString returns the string representation. 5857 // 5858 // API parameter values that are decorated as "sensitive" in the API will not 5859 // be included in the string output. The member name will be present, but the 5860 // value will be replaced with "sensitive". 5861 func (s GetTopicAttributesInput) GoString() string { 5862 return s.String() 5863 } 5864 5865 // Validate inspects the fields of the type to determine if they are valid. 5866 func (s *GetTopicAttributesInput) Validate() error { 5867 invalidParams := request.ErrInvalidParams{Context: "GetTopicAttributesInput"} 5868 if s.TopicArn == nil { 5869 invalidParams.Add(request.NewErrParamRequired("TopicArn")) 5870 } 5871 5872 if invalidParams.Len() > 0 { 5873 return invalidParams 5874 } 5875 return nil 5876 } 5877 5878 // SetTopicArn sets the TopicArn field's value. 5879 func (s *GetTopicAttributesInput) SetTopicArn(v string) *GetTopicAttributesInput { 5880 s.TopicArn = &v 5881 return s 5882 } 5883 5884 // Response for GetTopicAttributes action. 5885 type GetTopicAttributesOutput struct { 5886 _ struct{} `type:"structure"` 5887 5888 // A map of the topic's attributes. Attributes in this map include the following: 5889 // 5890 // * DeliveryPolicy – The JSON serialization of the topic's delivery policy. 5891 // 5892 // * DisplayName – The human-readable name used in the From field for notifications 5893 // to email and email-json endpoints. 5894 // 5895 // * Owner – The account ID of the topic's owner. 5896 // 5897 // * Policy – The JSON serialization of the topic's access control policy. 5898 // 5899 // * SubscriptionsConfirmed – The number of confirmed subscriptions for 5900 // the topic. 5901 // 5902 // * SubscriptionsDeleted – The number of deleted subscriptions for the 5903 // topic. 5904 // 5905 // * SubscriptionsPending – The number of subscriptions pending confirmation 5906 // for the topic. 5907 // 5908 // * TopicArn – The topic's ARN. 5909 // 5910 // * EffectiveDeliveryPolicy – The JSON serialization of the effective 5911 // delivery policy, taking system defaults into account. 5912 // 5913 // The following attribute applies only to server-side-encryption (https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html): 5914 // 5915 // * KmsMasterKeyId - The ID of an Amazon Web Services managed customer master 5916 // key (CMK) for Amazon SNS or a custom CMK. For more information, see Key 5917 // Terms (https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms). 5918 // For more examples, see KeyId (https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters) 5919 // in the Key Management Service API Reference. 5920 // 5921 // The following attributes apply only to FIFO topics (https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html): 5922 // 5923 // * FifoTopic – When this is set to true, a FIFO topic is created. 5924 // 5925 // * ContentBasedDeduplication – Enables content-based deduplication for 5926 // FIFO topics. By default, ContentBasedDeduplication is set to false. If 5927 // you create a FIFO topic and this attribute is false, you must specify 5928 // a value for the MessageDeduplicationId parameter for the Publish (https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) 5929 // action. When you set ContentBasedDeduplication to true, Amazon SNS uses 5930 // a SHA-256 hash to generate the MessageDeduplicationId using the body of 5931 // the message (but not the attributes of the message). (Optional) To override 5932 // the generated value, you can specify a value for the MessageDeduplicationId 5933 // parameter for the Publish action. 5934 Attributes map[string]*string `type:"map"` 5935 } 5936 5937 // String returns the string representation. 5938 // 5939 // API parameter values that are decorated as "sensitive" in the API will not 5940 // be included in the string output. The member name will be present, but the 5941 // value will be replaced with "sensitive". 5942 func (s GetTopicAttributesOutput) String() string { 5943 return awsutil.Prettify(s) 5944 } 5945 5946 // GoString returns the string representation. 5947 // 5948 // API parameter values that are decorated as "sensitive" in the API will not 5949 // be included in the string output. The member name will be present, but the 5950 // value will be replaced with "sensitive". 5951 func (s GetTopicAttributesOutput) GoString() string { 5952 return s.String() 5953 } 5954 5955 // SetAttributes sets the Attributes field's value. 5956 func (s *GetTopicAttributesOutput) SetAttributes(v map[string]*string) *GetTopicAttributesOutput { 5957 s.Attributes = v 5958 return s 5959 } 5960 5961 // Input for ListEndpointsByPlatformApplication action. 5962 type ListEndpointsByPlatformApplicationInput struct { 5963 _ struct{} `type:"structure"` 5964 5965 // NextToken string is used when calling ListEndpointsByPlatformApplication 5966 // action to retrieve additional records that are available after the first 5967 // page results. 5968 NextToken *string `type:"string"` 5969 5970 // PlatformApplicationArn for ListEndpointsByPlatformApplicationInput action. 5971 // 5972 // PlatformApplicationArn is a required field 5973 PlatformApplicationArn *string `type:"string" required:"true"` 5974 } 5975 5976 // String returns the string representation. 5977 // 5978 // API parameter values that are decorated as "sensitive" in the API will not 5979 // be included in the string output. The member name will be present, but the 5980 // value will be replaced with "sensitive". 5981 func (s ListEndpointsByPlatformApplicationInput) String() string { 5982 return awsutil.Prettify(s) 5983 } 5984 5985 // GoString returns the string representation. 5986 // 5987 // API parameter values that are decorated as "sensitive" in the API will not 5988 // be included in the string output. The member name will be present, but the 5989 // value will be replaced with "sensitive". 5990 func (s ListEndpointsByPlatformApplicationInput) GoString() string { 5991 return s.String() 5992 } 5993 5994 // Validate inspects the fields of the type to determine if they are valid. 5995 func (s *ListEndpointsByPlatformApplicationInput) Validate() error { 5996 invalidParams := request.ErrInvalidParams{Context: "ListEndpointsByPlatformApplicationInput"} 5997 if s.PlatformApplicationArn == nil { 5998 invalidParams.Add(request.NewErrParamRequired("PlatformApplicationArn")) 5999 } 6000 6001 if invalidParams.Len() > 0 { 6002 return invalidParams 6003 } 6004 return nil 6005 } 6006 6007 // SetNextToken sets the NextToken field's value. 6008 func (s *ListEndpointsByPlatformApplicationInput) SetNextToken(v string) *ListEndpointsByPlatformApplicationInput { 6009 s.NextToken = &v 6010 return s 6011 } 6012 6013 // SetPlatformApplicationArn sets the PlatformApplicationArn field's value. 6014 func (s *ListEndpointsByPlatformApplicationInput) SetPlatformApplicationArn(v string) *ListEndpointsByPlatformApplicationInput { 6015 s.PlatformApplicationArn = &v 6016 return s 6017 } 6018 6019 // Response for ListEndpointsByPlatformApplication action. 6020 type ListEndpointsByPlatformApplicationOutput struct { 6021 _ struct{} `type:"structure"` 6022 6023 // Endpoints returned for ListEndpointsByPlatformApplication action. 6024 Endpoints []*Endpoint `type:"list"` 6025 6026 // NextToken string is returned when calling ListEndpointsByPlatformApplication 6027 // action if additional records are available after the first page results. 6028 NextToken *string `type:"string"` 6029 } 6030 6031 // String returns the string representation. 6032 // 6033 // API parameter values that are decorated as "sensitive" in the API will not 6034 // be included in the string output. The member name will be present, but the 6035 // value will be replaced with "sensitive". 6036 func (s ListEndpointsByPlatformApplicationOutput) String() string { 6037 return awsutil.Prettify(s) 6038 } 6039 6040 // GoString returns the string representation. 6041 // 6042 // API parameter values that are decorated as "sensitive" in the API will not 6043 // be included in the string output. The member name will be present, but the 6044 // value will be replaced with "sensitive". 6045 func (s ListEndpointsByPlatformApplicationOutput) GoString() string { 6046 return s.String() 6047 } 6048 6049 // SetEndpoints sets the Endpoints field's value. 6050 func (s *ListEndpointsByPlatformApplicationOutput) SetEndpoints(v []*Endpoint) *ListEndpointsByPlatformApplicationOutput { 6051 s.Endpoints = v 6052 return s 6053 } 6054 6055 // SetNextToken sets the NextToken field's value. 6056 func (s *ListEndpointsByPlatformApplicationOutput) SetNextToken(v string) *ListEndpointsByPlatformApplicationOutput { 6057 s.NextToken = &v 6058 return s 6059 } 6060 6061 type ListOriginationNumbersInput struct { 6062 _ struct{} `type:"structure"` 6063 6064 // The maximum number of origination numbers to return. 6065 MaxResults *int64 `min:"1" type:"integer"` 6066 6067 // Token that the previous ListOriginationNumbers request returns. 6068 NextToken *string `type:"string"` 6069 } 6070 6071 // String returns the string representation. 6072 // 6073 // API parameter values that are decorated as "sensitive" in the API will not 6074 // be included in the string output. The member name will be present, but the 6075 // value will be replaced with "sensitive". 6076 func (s ListOriginationNumbersInput) String() string { 6077 return awsutil.Prettify(s) 6078 } 6079 6080 // GoString returns the string representation. 6081 // 6082 // API parameter values that are decorated as "sensitive" in the API will not 6083 // be included in the string output. The member name will be present, but the 6084 // value will be replaced with "sensitive". 6085 func (s ListOriginationNumbersInput) GoString() string { 6086 return s.String() 6087 } 6088 6089 // Validate inspects the fields of the type to determine if they are valid. 6090 func (s *ListOriginationNumbersInput) Validate() error { 6091 invalidParams := request.ErrInvalidParams{Context: "ListOriginationNumbersInput"} 6092 if s.MaxResults != nil && *s.MaxResults < 1 { 6093 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 6094 } 6095 6096 if invalidParams.Len() > 0 { 6097 return invalidParams 6098 } 6099 return nil 6100 } 6101 6102 // SetMaxResults sets the MaxResults field's value. 6103 func (s *ListOriginationNumbersInput) SetMaxResults(v int64) *ListOriginationNumbersInput { 6104 s.MaxResults = &v 6105 return s 6106 } 6107 6108 // SetNextToken sets the NextToken field's value. 6109 func (s *ListOriginationNumbersInput) SetNextToken(v string) *ListOriginationNumbersInput { 6110 s.NextToken = &v 6111 return s 6112 } 6113 6114 type ListOriginationNumbersOutput struct { 6115 _ struct{} `type:"structure"` 6116 6117 // A NextToken string is returned when you call the ListOriginationNumbers operation 6118 // if additional pages of records are available. 6119 NextToken *string `type:"string"` 6120 6121 // A list of the calling account's verified and pending origination numbers. 6122 PhoneNumbers []*PhoneNumberInformation `type:"list"` 6123 } 6124 6125 // String returns the string representation. 6126 // 6127 // API parameter values that are decorated as "sensitive" in the API will not 6128 // be included in the string output. The member name will be present, but the 6129 // value will be replaced with "sensitive". 6130 func (s ListOriginationNumbersOutput) String() string { 6131 return awsutil.Prettify(s) 6132 } 6133 6134 // GoString returns the string representation. 6135 // 6136 // API parameter values that are decorated as "sensitive" in the API will not 6137 // be included in the string output. The member name will be present, but the 6138 // value will be replaced with "sensitive". 6139 func (s ListOriginationNumbersOutput) GoString() string { 6140 return s.String() 6141 } 6142 6143 // SetNextToken sets the NextToken field's value. 6144 func (s *ListOriginationNumbersOutput) SetNextToken(v string) *ListOriginationNumbersOutput { 6145 s.NextToken = &v 6146 return s 6147 } 6148 6149 // SetPhoneNumbers sets the PhoneNumbers field's value. 6150 func (s *ListOriginationNumbersOutput) SetPhoneNumbers(v []*PhoneNumberInformation) *ListOriginationNumbersOutput { 6151 s.PhoneNumbers = v 6152 return s 6153 } 6154 6155 // The input for the ListPhoneNumbersOptedOut action. 6156 type ListPhoneNumbersOptedOutInput struct { 6157 _ struct{} `type:"structure"` 6158 6159 // A NextToken string is used when you call the ListPhoneNumbersOptedOut action 6160 // to retrieve additional records that are available after the first page of 6161 // results. 6162 NextToken *string `locationName:"nextToken" type:"string"` 6163 } 6164 6165 // String returns the string representation. 6166 // 6167 // API parameter values that are decorated as "sensitive" in the API will not 6168 // be included in the string output. The member name will be present, but the 6169 // value will be replaced with "sensitive". 6170 func (s ListPhoneNumbersOptedOutInput) String() string { 6171 return awsutil.Prettify(s) 6172 } 6173 6174 // GoString returns the string representation. 6175 // 6176 // API parameter values that are decorated as "sensitive" in the API will not 6177 // be included in the string output. The member name will be present, but the 6178 // value will be replaced with "sensitive". 6179 func (s ListPhoneNumbersOptedOutInput) GoString() string { 6180 return s.String() 6181 } 6182 6183 // SetNextToken sets the NextToken field's value. 6184 func (s *ListPhoneNumbersOptedOutInput) SetNextToken(v string) *ListPhoneNumbersOptedOutInput { 6185 s.NextToken = &v 6186 return s 6187 } 6188 6189 // The response from the ListPhoneNumbersOptedOut action. 6190 type ListPhoneNumbersOptedOutOutput struct { 6191 _ struct{} `type:"structure"` 6192 6193 // A NextToken string is returned when you call the ListPhoneNumbersOptedOut 6194 // action if additional records are available after the first page of results. 6195 NextToken *string `locationName:"nextToken" type:"string"` 6196 6197 // A list of phone numbers that are opted out of receiving SMS messages. The 6198 // list is paginated, and each page can contain up to 100 phone numbers. 6199 PhoneNumbers []*string `locationName:"phoneNumbers" type:"list"` 6200 } 6201 6202 // String returns the string representation. 6203 // 6204 // API parameter values that are decorated as "sensitive" in the API will not 6205 // be included in the string output. The member name will be present, but the 6206 // value will be replaced with "sensitive". 6207 func (s ListPhoneNumbersOptedOutOutput) String() string { 6208 return awsutil.Prettify(s) 6209 } 6210 6211 // GoString returns the string representation. 6212 // 6213 // API parameter values that are decorated as "sensitive" in the API will not 6214 // be included in the string output. The member name will be present, but the 6215 // value will be replaced with "sensitive". 6216 func (s ListPhoneNumbersOptedOutOutput) GoString() string { 6217 return s.String() 6218 } 6219 6220 // SetNextToken sets the NextToken field's value. 6221 func (s *ListPhoneNumbersOptedOutOutput) SetNextToken(v string) *ListPhoneNumbersOptedOutOutput { 6222 s.NextToken = &v 6223 return s 6224 } 6225 6226 // SetPhoneNumbers sets the PhoneNumbers field's value. 6227 func (s *ListPhoneNumbersOptedOutOutput) SetPhoneNumbers(v []*string) *ListPhoneNumbersOptedOutOutput { 6228 s.PhoneNumbers = v 6229 return s 6230 } 6231 6232 // Input for ListPlatformApplications action. 6233 type ListPlatformApplicationsInput struct { 6234 _ struct{} `type:"structure"` 6235 6236 // NextToken string is used when calling ListPlatformApplications action to 6237 // retrieve additional records that are available after the first page results. 6238 NextToken *string `type:"string"` 6239 } 6240 6241 // String returns the string representation. 6242 // 6243 // API parameter values that are decorated as "sensitive" in the API will not 6244 // be included in the string output. The member name will be present, but the 6245 // value will be replaced with "sensitive". 6246 func (s ListPlatformApplicationsInput) String() string { 6247 return awsutil.Prettify(s) 6248 } 6249 6250 // GoString returns the string representation. 6251 // 6252 // API parameter values that are decorated as "sensitive" in the API will not 6253 // be included in the string output. The member name will be present, but the 6254 // value will be replaced with "sensitive". 6255 func (s ListPlatformApplicationsInput) GoString() string { 6256 return s.String() 6257 } 6258 6259 // SetNextToken sets the NextToken field's value. 6260 func (s *ListPlatformApplicationsInput) SetNextToken(v string) *ListPlatformApplicationsInput { 6261 s.NextToken = &v 6262 return s 6263 } 6264 6265 // Response for ListPlatformApplications action. 6266 type ListPlatformApplicationsOutput struct { 6267 _ struct{} `type:"structure"` 6268 6269 // NextToken string is returned when calling ListPlatformApplications action 6270 // if additional records are available after the first page results. 6271 NextToken *string `type:"string"` 6272 6273 // Platform applications returned when calling ListPlatformApplications action. 6274 PlatformApplications []*PlatformApplication `type:"list"` 6275 } 6276 6277 // String returns the string representation. 6278 // 6279 // API parameter values that are decorated as "sensitive" in the API will not 6280 // be included in the string output. The member name will be present, but the 6281 // value will be replaced with "sensitive". 6282 func (s ListPlatformApplicationsOutput) String() string { 6283 return awsutil.Prettify(s) 6284 } 6285 6286 // GoString returns the string representation. 6287 // 6288 // API parameter values that are decorated as "sensitive" in the API will not 6289 // be included in the string output. The member name will be present, but the 6290 // value will be replaced with "sensitive". 6291 func (s ListPlatformApplicationsOutput) GoString() string { 6292 return s.String() 6293 } 6294 6295 // SetNextToken sets the NextToken field's value. 6296 func (s *ListPlatformApplicationsOutput) SetNextToken(v string) *ListPlatformApplicationsOutput { 6297 s.NextToken = &v 6298 return s 6299 } 6300 6301 // SetPlatformApplications sets the PlatformApplications field's value. 6302 func (s *ListPlatformApplicationsOutput) SetPlatformApplications(v []*PlatformApplication) *ListPlatformApplicationsOutput { 6303 s.PlatformApplications = v 6304 return s 6305 } 6306 6307 type ListSMSSandboxPhoneNumbersInput struct { 6308 _ struct{} `type:"structure"` 6309 6310 // The maximum number of phone numbers to return. 6311 MaxResults *int64 `min:"1" type:"integer"` 6312 6313 // Token that the previous ListSMSSandboxPhoneNumbersInput request returns. 6314 NextToken *string `type:"string"` 6315 } 6316 6317 // String returns the string representation. 6318 // 6319 // API parameter values that are decorated as "sensitive" in the API will not 6320 // be included in the string output. The member name will be present, but the 6321 // value will be replaced with "sensitive". 6322 func (s ListSMSSandboxPhoneNumbersInput) String() string { 6323 return awsutil.Prettify(s) 6324 } 6325 6326 // GoString returns the string representation. 6327 // 6328 // API parameter values that are decorated as "sensitive" in the API will not 6329 // be included in the string output. The member name will be present, but the 6330 // value will be replaced with "sensitive". 6331 func (s ListSMSSandboxPhoneNumbersInput) GoString() string { 6332 return s.String() 6333 } 6334 6335 // Validate inspects the fields of the type to determine if they are valid. 6336 func (s *ListSMSSandboxPhoneNumbersInput) Validate() error { 6337 invalidParams := request.ErrInvalidParams{Context: "ListSMSSandboxPhoneNumbersInput"} 6338 if s.MaxResults != nil && *s.MaxResults < 1 { 6339 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 6340 } 6341 6342 if invalidParams.Len() > 0 { 6343 return invalidParams 6344 } 6345 return nil 6346 } 6347 6348 // SetMaxResults sets the MaxResults field's value. 6349 func (s *ListSMSSandboxPhoneNumbersInput) SetMaxResults(v int64) *ListSMSSandboxPhoneNumbersInput { 6350 s.MaxResults = &v 6351 return s 6352 } 6353 6354 // SetNextToken sets the NextToken field's value. 6355 func (s *ListSMSSandboxPhoneNumbersInput) SetNextToken(v string) *ListSMSSandboxPhoneNumbersInput { 6356 s.NextToken = &v 6357 return s 6358 } 6359 6360 type ListSMSSandboxPhoneNumbersOutput struct { 6361 _ struct{} `type:"structure"` 6362 6363 // A NextToken string is returned when you call the ListSMSSandboxPhoneNumbersInput 6364 // operation if additional pages of records are available. 6365 NextToken *string `type:"string"` 6366 6367 // A list of the calling account's pending and verified phone numbers. 6368 // 6369 // PhoneNumbers is a required field 6370 PhoneNumbers []*SMSSandboxPhoneNumber `type:"list" required:"true"` 6371 } 6372 6373 // String returns the string representation. 6374 // 6375 // API parameter values that are decorated as "sensitive" in the API will not 6376 // be included in the string output. The member name will be present, but the 6377 // value will be replaced with "sensitive". 6378 func (s ListSMSSandboxPhoneNumbersOutput) String() string { 6379 return awsutil.Prettify(s) 6380 } 6381 6382 // GoString returns the string representation. 6383 // 6384 // API parameter values that are decorated as "sensitive" in the API will not 6385 // be included in the string output. The member name will be present, but the 6386 // value will be replaced with "sensitive". 6387 func (s ListSMSSandboxPhoneNumbersOutput) GoString() string { 6388 return s.String() 6389 } 6390 6391 // SetNextToken sets the NextToken field's value. 6392 func (s *ListSMSSandboxPhoneNumbersOutput) SetNextToken(v string) *ListSMSSandboxPhoneNumbersOutput { 6393 s.NextToken = &v 6394 return s 6395 } 6396 6397 // SetPhoneNumbers sets the PhoneNumbers field's value. 6398 func (s *ListSMSSandboxPhoneNumbersOutput) SetPhoneNumbers(v []*SMSSandboxPhoneNumber) *ListSMSSandboxPhoneNumbersOutput { 6399 s.PhoneNumbers = v 6400 return s 6401 } 6402 6403 // Input for ListSubscriptionsByTopic action. 6404 type ListSubscriptionsByTopicInput struct { 6405 _ struct{} `type:"structure"` 6406 6407 // Token returned by the previous ListSubscriptionsByTopic request. 6408 NextToken *string `type:"string"` 6409 6410 // The ARN of the topic for which you wish to find subscriptions. 6411 // 6412 // TopicArn is a required field 6413 TopicArn *string `type:"string" required:"true"` 6414 } 6415 6416 // String returns the string representation. 6417 // 6418 // API parameter values that are decorated as "sensitive" in the API will not 6419 // be included in the string output. The member name will be present, but the 6420 // value will be replaced with "sensitive". 6421 func (s ListSubscriptionsByTopicInput) String() string { 6422 return awsutil.Prettify(s) 6423 } 6424 6425 // GoString returns the string representation. 6426 // 6427 // API parameter values that are decorated as "sensitive" in the API will not 6428 // be included in the string output. The member name will be present, but the 6429 // value will be replaced with "sensitive". 6430 func (s ListSubscriptionsByTopicInput) GoString() string { 6431 return s.String() 6432 } 6433 6434 // Validate inspects the fields of the type to determine if they are valid. 6435 func (s *ListSubscriptionsByTopicInput) Validate() error { 6436 invalidParams := request.ErrInvalidParams{Context: "ListSubscriptionsByTopicInput"} 6437 if s.TopicArn == nil { 6438 invalidParams.Add(request.NewErrParamRequired("TopicArn")) 6439 } 6440 6441 if invalidParams.Len() > 0 { 6442 return invalidParams 6443 } 6444 return nil 6445 } 6446 6447 // SetNextToken sets the NextToken field's value. 6448 func (s *ListSubscriptionsByTopicInput) SetNextToken(v string) *ListSubscriptionsByTopicInput { 6449 s.NextToken = &v 6450 return s 6451 } 6452 6453 // SetTopicArn sets the TopicArn field's value. 6454 func (s *ListSubscriptionsByTopicInput) SetTopicArn(v string) *ListSubscriptionsByTopicInput { 6455 s.TopicArn = &v 6456 return s 6457 } 6458 6459 // Response for ListSubscriptionsByTopic action. 6460 type ListSubscriptionsByTopicOutput struct { 6461 _ struct{} `type:"structure"` 6462 6463 // Token to pass along to the next ListSubscriptionsByTopic request. This element 6464 // is returned if there are more subscriptions to retrieve. 6465 NextToken *string `type:"string"` 6466 6467 // A list of subscriptions. 6468 Subscriptions []*Subscription `type:"list"` 6469 } 6470 6471 // String returns the string representation. 6472 // 6473 // API parameter values that are decorated as "sensitive" in the API will not 6474 // be included in the string output. The member name will be present, but the 6475 // value will be replaced with "sensitive". 6476 func (s ListSubscriptionsByTopicOutput) String() string { 6477 return awsutil.Prettify(s) 6478 } 6479 6480 // GoString returns the string representation. 6481 // 6482 // API parameter values that are decorated as "sensitive" in the API will not 6483 // be included in the string output. The member name will be present, but the 6484 // value will be replaced with "sensitive". 6485 func (s ListSubscriptionsByTopicOutput) GoString() string { 6486 return s.String() 6487 } 6488 6489 // SetNextToken sets the NextToken field's value. 6490 func (s *ListSubscriptionsByTopicOutput) SetNextToken(v string) *ListSubscriptionsByTopicOutput { 6491 s.NextToken = &v 6492 return s 6493 } 6494 6495 // SetSubscriptions sets the Subscriptions field's value. 6496 func (s *ListSubscriptionsByTopicOutput) SetSubscriptions(v []*Subscription) *ListSubscriptionsByTopicOutput { 6497 s.Subscriptions = v 6498 return s 6499 } 6500 6501 // Input for ListSubscriptions action. 6502 type ListSubscriptionsInput struct { 6503 _ struct{} `type:"structure"` 6504 6505 // Token returned by the previous ListSubscriptions request. 6506 NextToken *string `type:"string"` 6507 } 6508 6509 // String returns the string representation. 6510 // 6511 // API parameter values that are decorated as "sensitive" in the API will not 6512 // be included in the string output. The member name will be present, but the 6513 // value will be replaced with "sensitive". 6514 func (s ListSubscriptionsInput) String() string { 6515 return awsutil.Prettify(s) 6516 } 6517 6518 // GoString returns the string representation. 6519 // 6520 // API parameter values that are decorated as "sensitive" in the API will not 6521 // be included in the string output. The member name will be present, but the 6522 // value will be replaced with "sensitive". 6523 func (s ListSubscriptionsInput) GoString() string { 6524 return s.String() 6525 } 6526 6527 // SetNextToken sets the NextToken field's value. 6528 func (s *ListSubscriptionsInput) SetNextToken(v string) *ListSubscriptionsInput { 6529 s.NextToken = &v 6530 return s 6531 } 6532 6533 // Response for ListSubscriptions action 6534 type ListSubscriptionsOutput struct { 6535 _ struct{} `type:"structure"` 6536 6537 // Token to pass along to the next ListSubscriptions request. This element is 6538 // returned if there are more subscriptions to retrieve. 6539 NextToken *string `type:"string"` 6540 6541 // A list of subscriptions. 6542 Subscriptions []*Subscription `type:"list"` 6543 } 6544 6545 // String returns the string representation. 6546 // 6547 // API parameter values that are decorated as "sensitive" in the API will not 6548 // be included in the string output. The member name will be present, but the 6549 // value will be replaced with "sensitive". 6550 func (s ListSubscriptionsOutput) String() string { 6551 return awsutil.Prettify(s) 6552 } 6553 6554 // GoString returns the string representation. 6555 // 6556 // API parameter values that are decorated as "sensitive" in the API will not 6557 // be included in the string output. The member name will be present, but the 6558 // value will be replaced with "sensitive". 6559 func (s ListSubscriptionsOutput) GoString() string { 6560 return s.String() 6561 } 6562 6563 // SetNextToken sets the NextToken field's value. 6564 func (s *ListSubscriptionsOutput) SetNextToken(v string) *ListSubscriptionsOutput { 6565 s.NextToken = &v 6566 return s 6567 } 6568 6569 // SetSubscriptions sets the Subscriptions field's value. 6570 func (s *ListSubscriptionsOutput) SetSubscriptions(v []*Subscription) *ListSubscriptionsOutput { 6571 s.Subscriptions = v 6572 return s 6573 } 6574 6575 type ListTagsForResourceInput struct { 6576 _ struct{} `type:"structure"` 6577 6578 // The ARN of the topic for which to list tags. 6579 // 6580 // ResourceArn is a required field 6581 ResourceArn *string `min:"1" type:"string" required:"true"` 6582 } 6583 6584 // String returns the string representation. 6585 // 6586 // API parameter values that are decorated as "sensitive" in the API will not 6587 // be included in the string output. The member name will be present, but the 6588 // value will be replaced with "sensitive". 6589 func (s ListTagsForResourceInput) String() string { 6590 return awsutil.Prettify(s) 6591 } 6592 6593 // GoString returns the string representation. 6594 // 6595 // API parameter values that are decorated as "sensitive" in the API will not 6596 // be included in the string output. The member name will be present, but the 6597 // value will be replaced with "sensitive". 6598 func (s ListTagsForResourceInput) GoString() string { 6599 return s.String() 6600 } 6601 6602 // Validate inspects the fields of the type to determine if they are valid. 6603 func (s *ListTagsForResourceInput) Validate() error { 6604 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 6605 if s.ResourceArn == nil { 6606 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 6607 } 6608 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 6609 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 6610 } 6611 6612 if invalidParams.Len() > 0 { 6613 return invalidParams 6614 } 6615 return nil 6616 } 6617 6618 // SetResourceArn sets the ResourceArn field's value. 6619 func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { 6620 s.ResourceArn = &v 6621 return s 6622 } 6623 6624 type ListTagsForResourceOutput struct { 6625 _ struct{} `type:"structure"` 6626 6627 // The tags associated with the specified topic. 6628 Tags []*Tag `type:"list"` 6629 } 6630 6631 // String returns the string representation. 6632 // 6633 // API parameter values that are decorated as "sensitive" in the API will not 6634 // be included in the string output. The member name will be present, but the 6635 // value will be replaced with "sensitive". 6636 func (s ListTagsForResourceOutput) String() string { 6637 return awsutil.Prettify(s) 6638 } 6639 6640 // GoString returns the string representation. 6641 // 6642 // API parameter values that are decorated as "sensitive" in the API will not 6643 // be included in the string output. The member name will be present, but the 6644 // value will be replaced with "sensitive". 6645 func (s ListTagsForResourceOutput) GoString() string { 6646 return s.String() 6647 } 6648 6649 // SetTags sets the Tags field's value. 6650 func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { 6651 s.Tags = v 6652 return s 6653 } 6654 6655 type ListTopicsInput struct { 6656 _ struct{} `type:"structure"` 6657 6658 // Token returned by the previous ListTopics request. 6659 NextToken *string `type:"string"` 6660 } 6661 6662 // String returns the string representation. 6663 // 6664 // API parameter values that are decorated as "sensitive" in the API will not 6665 // be included in the string output. The member name will be present, but the 6666 // value will be replaced with "sensitive". 6667 func (s ListTopicsInput) String() string { 6668 return awsutil.Prettify(s) 6669 } 6670 6671 // GoString returns the string representation. 6672 // 6673 // API parameter values that are decorated as "sensitive" in the API will not 6674 // be included in the string output. The member name will be present, but the 6675 // value will be replaced with "sensitive". 6676 func (s ListTopicsInput) GoString() string { 6677 return s.String() 6678 } 6679 6680 // SetNextToken sets the NextToken field's value. 6681 func (s *ListTopicsInput) SetNextToken(v string) *ListTopicsInput { 6682 s.NextToken = &v 6683 return s 6684 } 6685 6686 // Response for ListTopics action. 6687 type ListTopicsOutput struct { 6688 _ struct{} `type:"structure"` 6689 6690 // Token to pass along to the next ListTopics request. This element is returned 6691 // if there are additional topics to retrieve. 6692 NextToken *string `type:"string"` 6693 6694 // A list of topic ARNs. 6695 Topics []*Topic `type:"list"` 6696 } 6697 6698 // String returns the string representation. 6699 // 6700 // API parameter values that are decorated as "sensitive" in the API will not 6701 // be included in the string output. The member name will be present, but the 6702 // value will be replaced with "sensitive". 6703 func (s ListTopicsOutput) String() string { 6704 return awsutil.Prettify(s) 6705 } 6706 6707 // GoString returns the string representation. 6708 // 6709 // API parameter values that are decorated as "sensitive" in the API will not 6710 // be included in the string output. The member name will be present, but the 6711 // value will be replaced with "sensitive". 6712 func (s ListTopicsOutput) GoString() string { 6713 return s.String() 6714 } 6715 6716 // SetNextToken sets the NextToken field's value. 6717 func (s *ListTopicsOutput) SetNextToken(v string) *ListTopicsOutput { 6718 s.NextToken = &v 6719 return s 6720 } 6721 6722 // SetTopics sets the Topics field's value. 6723 func (s *ListTopicsOutput) SetTopics(v []*Topic) *ListTopicsOutput { 6724 s.Topics = v 6725 return s 6726 } 6727 6728 // The user-specified message attribute value. For string data types, the value 6729 // attribute has the same restrictions on the content as the message body. For 6730 // more information, see Publish (https://docs.aws.amazon.com/sns/latest/api/API_Publish.html). 6731 // 6732 // Name, type, and value must not be empty or null. In addition, the message 6733 // body should not be empty or null. All parts of the message attribute, including 6734 // name, type, and value, are included in the message size restriction, which 6735 // is currently 256 KB (262,144 bytes). For more information, see Amazon SNS 6736 // message attributes (https://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html) 6737 // and Publishing to a mobile phone (https://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html) 6738 // in the Amazon SNS Developer Guide. 6739 type MessageAttributeValue struct { 6740 _ struct{} `type:"structure"` 6741 6742 // Binary type attributes can store any binary data, for example, compressed 6743 // data, encrypted data, or images. 6744 // BinaryValue is automatically base64 encoded/decoded by the SDK. 6745 BinaryValue []byte `type:"blob"` 6746 6747 // Amazon SNS supports the following logical data types: String, String.Array, 6748 // Number, and Binary. For more information, see Message Attribute Data Types 6749 // (https://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html#SNSMessageAttributes.DataTypes). 6750 // 6751 // DataType is a required field 6752 DataType *string `type:"string" required:"true"` 6753 6754 // Strings are Unicode with UTF8 binary encoding. For a list of code values, 6755 // see ASCII Printable Characters (https://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters). 6756 StringValue *string `type:"string"` 6757 } 6758 6759 // String returns the string representation. 6760 // 6761 // API parameter values that are decorated as "sensitive" in the API will not 6762 // be included in the string output. The member name will be present, but the 6763 // value will be replaced with "sensitive". 6764 func (s MessageAttributeValue) String() string { 6765 return awsutil.Prettify(s) 6766 } 6767 6768 // GoString returns the string representation. 6769 // 6770 // API parameter values that are decorated as "sensitive" in the API will not 6771 // be included in the string output. The member name will be present, but the 6772 // value will be replaced with "sensitive". 6773 func (s MessageAttributeValue) GoString() string { 6774 return s.String() 6775 } 6776 6777 // Validate inspects the fields of the type to determine if they are valid. 6778 func (s *MessageAttributeValue) Validate() error { 6779 invalidParams := request.ErrInvalidParams{Context: "MessageAttributeValue"} 6780 if s.DataType == nil { 6781 invalidParams.Add(request.NewErrParamRequired("DataType")) 6782 } 6783 6784 if invalidParams.Len() > 0 { 6785 return invalidParams 6786 } 6787 return nil 6788 } 6789 6790 // SetBinaryValue sets the BinaryValue field's value. 6791 func (s *MessageAttributeValue) SetBinaryValue(v []byte) *MessageAttributeValue { 6792 s.BinaryValue = v 6793 return s 6794 } 6795 6796 // SetDataType sets the DataType field's value. 6797 func (s *MessageAttributeValue) SetDataType(v string) *MessageAttributeValue { 6798 s.DataType = &v 6799 return s 6800 } 6801 6802 // SetStringValue sets the StringValue field's value. 6803 func (s *MessageAttributeValue) SetStringValue(v string) *MessageAttributeValue { 6804 s.StringValue = &v 6805 return s 6806 } 6807 6808 // Input for the OptInPhoneNumber action. 6809 type OptInPhoneNumberInput struct { 6810 _ struct{} `type:"structure"` 6811 6812 // The phone number to opt in. Use E.164 format. 6813 // 6814 // PhoneNumber is a required field 6815 PhoneNumber *string `locationName:"phoneNumber" type:"string" required:"true"` 6816 } 6817 6818 // String returns the string representation. 6819 // 6820 // API parameter values that are decorated as "sensitive" in the API will not 6821 // be included in the string output. The member name will be present, but the 6822 // value will be replaced with "sensitive". 6823 func (s OptInPhoneNumberInput) String() string { 6824 return awsutil.Prettify(s) 6825 } 6826 6827 // GoString returns the string representation. 6828 // 6829 // API parameter values that are decorated as "sensitive" in the API will not 6830 // be included in the string output. The member name will be present, but the 6831 // value will be replaced with "sensitive". 6832 func (s OptInPhoneNumberInput) GoString() string { 6833 return s.String() 6834 } 6835 6836 // Validate inspects the fields of the type to determine if they are valid. 6837 func (s *OptInPhoneNumberInput) Validate() error { 6838 invalidParams := request.ErrInvalidParams{Context: "OptInPhoneNumberInput"} 6839 if s.PhoneNumber == nil { 6840 invalidParams.Add(request.NewErrParamRequired("PhoneNumber")) 6841 } 6842 6843 if invalidParams.Len() > 0 { 6844 return invalidParams 6845 } 6846 return nil 6847 } 6848 6849 // SetPhoneNumber sets the PhoneNumber field's value. 6850 func (s *OptInPhoneNumberInput) SetPhoneNumber(v string) *OptInPhoneNumberInput { 6851 s.PhoneNumber = &v 6852 return s 6853 } 6854 6855 // The response for the OptInPhoneNumber action. 6856 type OptInPhoneNumberOutput struct { 6857 _ struct{} `type:"structure"` 6858 } 6859 6860 // String returns the string representation. 6861 // 6862 // API parameter values that are decorated as "sensitive" in the API will not 6863 // be included in the string output. The member name will be present, but the 6864 // value will be replaced with "sensitive". 6865 func (s OptInPhoneNumberOutput) String() string { 6866 return awsutil.Prettify(s) 6867 } 6868 6869 // GoString returns the string representation. 6870 // 6871 // API parameter values that are decorated as "sensitive" in the API will not 6872 // be included in the string output. The member name will be present, but the 6873 // value will be replaced with "sensitive". 6874 func (s OptInPhoneNumberOutput) GoString() string { 6875 return s.String() 6876 } 6877 6878 // A list of phone numbers and their metadata. 6879 type PhoneNumberInformation struct { 6880 _ struct{} `type:"structure"` 6881 6882 // The date and time when the phone number was created. 6883 CreatedAt *time.Time `type:"timestamp"` 6884 6885 // The two-character code for the country or region, in ISO 3166-1 alpha-2 format. 6886 Iso2CountryCode *string `type:"string"` 6887 6888 // The capabilities of each phone number. 6889 NumberCapabilities []*string `type:"list"` 6890 6891 // The phone number. 6892 PhoneNumber *string `type:"string"` 6893 6894 // The list of supported routes. 6895 RouteType *string `type:"string" enum:"RouteType"` 6896 6897 // The status of the phone number. 6898 Status *string `type:"string"` 6899 } 6900 6901 // String returns the string representation. 6902 // 6903 // API parameter values that are decorated as "sensitive" in the API will not 6904 // be included in the string output. The member name will be present, but the 6905 // value will be replaced with "sensitive". 6906 func (s PhoneNumberInformation) String() string { 6907 return awsutil.Prettify(s) 6908 } 6909 6910 // GoString returns the string representation. 6911 // 6912 // API parameter values that are decorated as "sensitive" in the API will not 6913 // be included in the string output. The member name will be present, but the 6914 // value will be replaced with "sensitive". 6915 func (s PhoneNumberInformation) GoString() string { 6916 return s.String() 6917 } 6918 6919 // SetCreatedAt sets the CreatedAt field's value. 6920 func (s *PhoneNumberInformation) SetCreatedAt(v time.Time) *PhoneNumberInformation { 6921 s.CreatedAt = &v 6922 return s 6923 } 6924 6925 // SetIso2CountryCode sets the Iso2CountryCode field's value. 6926 func (s *PhoneNumberInformation) SetIso2CountryCode(v string) *PhoneNumberInformation { 6927 s.Iso2CountryCode = &v 6928 return s 6929 } 6930 6931 // SetNumberCapabilities sets the NumberCapabilities field's value. 6932 func (s *PhoneNumberInformation) SetNumberCapabilities(v []*string) *PhoneNumberInformation { 6933 s.NumberCapabilities = v 6934 return s 6935 } 6936 6937 // SetPhoneNumber sets the PhoneNumber field's value. 6938 func (s *PhoneNumberInformation) SetPhoneNumber(v string) *PhoneNumberInformation { 6939 s.PhoneNumber = &v 6940 return s 6941 } 6942 6943 // SetRouteType sets the RouteType field's value. 6944 func (s *PhoneNumberInformation) SetRouteType(v string) *PhoneNumberInformation { 6945 s.RouteType = &v 6946 return s 6947 } 6948 6949 // SetStatus sets the Status field's value. 6950 func (s *PhoneNumberInformation) SetStatus(v string) *PhoneNumberInformation { 6951 s.Status = &v 6952 return s 6953 } 6954 6955 // Platform application object. 6956 type PlatformApplication struct { 6957 _ struct{} `type:"structure"` 6958 6959 // Attributes for platform application object. 6960 Attributes map[string]*string `type:"map"` 6961 6962 // PlatformApplicationArn for platform application object. 6963 PlatformApplicationArn *string `type:"string"` 6964 } 6965 6966 // String returns the string representation. 6967 // 6968 // API parameter values that are decorated as "sensitive" in the API will not 6969 // be included in the string output. The member name will be present, but the 6970 // value will be replaced with "sensitive". 6971 func (s PlatformApplication) String() string { 6972 return awsutil.Prettify(s) 6973 } 6974 6975 // GoString returns the string representation. 6976 // 6977 // API parameter values that are decorated as "sensitive" in the API will not 6978 // be included in the string output. The member name will be present, but the 6979 // value will be replaced with "sensitive". 6980 func (s PlatformApplication) GoString() string { 6981 return s.String() 6982 } 6983 6984 // SetAttributes sets the Attributes field's value. 6985 func (s *PlatformApplication) SetAttributes(v map[string]*string) *PlatformApplication { 6986 s.Attributes = v 6987 return s 6988 } 6989 6990 // SetPlatformApplicationArn sets the PlatformApplicationArn field's value. 6991 func (s *PlatformApplication) SetPlatformApplicationArn(v string) *PlatformApplication { 6992 s.PlatformApplicationArn = &v 6993 return s 6994 } 6995 6996 // Input for Publish action. 6997 type PublishInput struct { 6998 _ struct{} `type:"structure"` 6999 7000 // The message you want to send. 7001 // 7002 // If you are publishing to a topic and you want to send the same message to 7003 // all transport protocols, include the text of the message as a String value. 7004 // If you want to send different messages for each transport protocol, set the 7005 // value of the MessageStructure parameter to json and use a JSON object for 7006 // the Message parameter. 7007 // 7008 // Constraints: 7009 // 7010 // * With the exception of SMS, messages must be UTF-8 encoded strings and 7011 // at most 256 KB in size (262,144 bytes, not 262,144 characters). 7012 // 7013 // * For SMS, each message can contain up to 140 characters. This character 7014 // limit depends on the encoding schema. For example, an SMS message can 7015 // contain 160 GSM characters, 140 ASCII characters, or 70 UCS-2 characters. 7016 // If you publish a message that exceeds this size limit, Amazon SNS sends 7017 // the message as multiple messages, each fitting within the size limit. 7018 // Messages aren't truncated mid-word but are cut off at whole-word boundaries. 7019 // The total size limit for a single SMS Publish action is 1,600 characters. 7020 // 7021 // JSON-specific constraints: 7022 // 7023 // * Keys in the JSON object that correspond to supported transport protocols 7024 // must have simple JSON string values. 7025 // 7026 // * The values will be parsed (unescaped) before they are used in outgoing 7027 // messages. 7028 // 7029 // * Outbound notifications are JSON encoded (meaning that the characters 7030 // will be reescaped for sending). 7031 // 7032 // * Values have a minimum length of 0 (the empty string, "", is allowed). 7033 // 7034 // * Values have a maximum length bounded by the overall message size (so, 7035 // including multiple protocols may limit message sizes). 7036 // 7037 // * Non-string values will cause the key to be ignored. 7038 // 7039 // * Keys that do not correspond to supported transport protocols are ignored. 7040 // 7041 // * Duplicate keys are not allowed. 7042 // 7043 // * Failure to parse or validate any key or value in the message will cause 7044 // the Publish call to return an error (no partial delivery). 7045 // 7046 // Message is a required field 7047 Message *string `type:"string" required:"true"` 7048 7049 // Message attributes for Publish action. 7050 MessageAttributes map[string]*MessageAttributeValue `locationNameKey:"Name" locationNameValue:"Value" type:"map"` 7051 7052 // This parameter applies only to FIFO (first-in-first-out) topics. The MessageDeduplicationId 7053 // can contain up to 128 alphanumeric characters (a-z, A-Z, 0-9) and punctuation 7054 // (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). 7055 // 7056 // Every message must have a unique MessageDeduplicationId, which is a token 7057 // used for deduplication of sent messages. If a message with a particular MessageDeduplicationId 7058 // is sent successfully, any message sent with the same MessageDeduplicationId 7059 // during the 5-minute deduplication interval is treated as a duplicate. 7060 // 7061 // If the topic has ContentBasedDeduplication set, the system generates a MessageDeduplicationId 7062 // based on the contents of the message. Your MessageDeduplicationId overrides 7063 // the generated one. 7064 MessageDeduplicationId *string `type:"string"` 7065 7066 // This parameter applies only to FIFO (first-in-first-out) topics. The MessageGroupId 7067 // can contain up to 128 alphanumeric characters (a-z, A-Z, 0-9) and punctuation 7068 // (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). 7069 // 7070 // The MessageGroupId is a tag that specifies that a message belongs to a specific 7071 // message group. Messages that belong to the same message group are processed 7072 // in a FIFO manner (however, messages in different message groups might be 7073 // processed out of order). Every message must include a MessageGroupId. 7074 MessageGroupId *string `type:"string"` 7075 7076 // Set MessageStructure to json if you want to send a different message for 7077 // each protocol. For example, using one publish action, you can send a short 7078 // message to your SMS subscribers and a longer message to your email subscribers. 7079 // If you set MessageStructure to json, the value of the Message parameter must: 7080 // 7081 // * be a syntactically valid JSON object; and 7082 // 7083 // * contain at least a top-level JSON key of "default" with a value that 7084 // is a string. 7085 // 7086 // You can define other top-level keys that define the message you want to send 7087 // to a specific transport protocol (e.g., "http"). 7088 // 7089 // Valid value: json 7090 MessageStructure *string `type:"string"` 7091 7092 // The phone number to which you want to deliver an SMS message. Use E.164 format. 7093 // 7094 // If you don't specify a value for the PhoneNumber parameter, you must specify 7095 // a value for the TargetArn or TopicArn parameters. 7096 PhoneNumber *string `type:"string"` 7097 7098 // Optional parameter to be used as the "Subject" line when the message is delivered 7099 // to email endpoints. This field will also be included, if present, in the 7100 // standard JSON messages delivered to other endpoints. 7101 // 7102 // Constraints: Subjects must be ASCII text that begins with a letter, number, 7103 // or punctuation mark; must not include line breaks or control characters; 7104 // and must be less than 100 characters long. 7105 Subject *string `type:"string"` 7106 7107 // If you don't specify a value for the TargetArn parameter, you must specify 7108 // a value for the PhoneNumber or TopicArn parameters. 7109 TargetArn *string `type:"string"` 7110 7111 // The topic you want to publish to. 7112 // 7113 // If you don't specify a value for the TopicArn parameter, you must specify 7114 // a value for the PhoneNumber or TargetArn parameters. 7115 TopicArn *string `type:"string"` 7116 } 7117 7118 // String returns the string representation. 7119 // 7120 // API parameter values that are decorated as "sensitive" in the API will not 7121 // be included in the string output. The member name will be present, but the 7122 // value will be replaced with "sensitive". 7123 func (s PublishInput) String() string { 7124 return awsutil.Prettify(s) 7125 } 7126 7127 // GoString returns the string representation. 7128 // 7129 // API parameter values that are decorated as "sensitive" in the API will not 7130 // be included in the string output. The member name will be present, but the 7131 // value will be replaced with "sensitive". 7132 func (s PublishInput) GoString() string { 7133 return s.String() 7134 } 7135 7136 // Validate inspects the fields of the type to determine if they are valid. 7137 func (s *PublishInput) Validate() error { 7138 invalidParams := request.ErrInvalidParams{Context: "PublishInput"} 7139 if s.Message == nil { 7140 invalidParams.Add(request.NewErrParamRequired("Message")) 7141 } 7142 if s.MessageAttributes != nil { 7143 for i, v := range s.MessageAttributes { 7144 if v == nil { 7145 continue 7146 } 7147 if err := v.Validate(); err != nil { 7148 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MessageAttributes", i), err.(request.ErrInvalidParams)) 7149 } 7150 } 7151 } 7152 7153 if invalidParams.Len() > 0 { 7154 return invalidParams 7155 } 7156 return nil 7157 } 7158 7159 // SetMessage sets the Message field's value. 7160 func (s *PublishInput) SetMessage(v string) *PublishInput { 7161 s.Message = &v 7162 return s 7163 } 7164 7165 // SetMessageAttributes sets the MessageAttributes field's value. 7166 func (s *PublishInput) SetMessageAttributes(v map[string]*MessageAttributeValue) *PublishInput { 7167 s.MessageAttributes = v 7168 return s 7169 } 7170 7171 // SetMessageDeduplicationId sets the MessageDeduplicationId field's value. 7172 func (s *PublishInput) SetMessageDeduplicationId(v string) *PublishInput { 7173 s.MessageDeduplicationId = &v 7174 return s 7175 } 7176 7177 // SetMessageGroupId sets the MessageGroupId field's value. 7178 func (s *PublishInput) SetMessageGroupId(v string) *PublishInput { 7179 s.MessageGroupId = &v 7180 return s 7181 } 7182 7183 // SetMessageStructure sets the MessageStructure field's value. 7184 func (s *PublishInput) SetMessageStructure(v string) *PublishInput { 7185 s.MessageStructure = &v 7186 return s 7187 } 7188 7189 // SetPhoneNumber sets the PhoneNumber field's value. 7190 func (s *PublishInput) SetPhoneNumber(v string) *PublishInput { 7191 s.PhoneNumber = &v 7192 return s 7193 } 7194 7195 // SetSubject sets the Subject field's value. 7196 func (s *PublishInput) SetSubject(v string) *PublishInput { 7197 s.Subject = &v 7198 return s 7199 } 7200 7201 // SetTargetArn sets the TargetArn field's value. 7202 func (s *PublishInput) SetTargetArn(v string) *PublishInput { 7203 s.TargetArn = &v 7204 return s 7205 } 7206 7207 // SetTopicArn sets the TopicArn field's value. 7208 func (s *PublishInput) SetTopicArn(v string) *PublishInput { 7209 s.TopicArn = &v 7210 return s 7211 } 7212 7213 // Response for Publish action. 7214 type PublishOutput struct { 7215 _ struct{} `type:"structure"` 7216 7217 // Unique identifier assigned to the published message. 7218 // 7219 // Length Constraint: Maximum 100 characters 7220 MessageId *string `type:"string"` 7221 7222 // This response element applies only to FIFO (first-in-first-out) topics. 7223 // 7224 // The sequence number is a large, non-consecutive number that Amazon SNS assigns 7225 // to each message. The length of SequenceNumber is 128 bits. SequenceNumber 7226 // continues to increase for each MessageGroupId. 7227 SequenceNumber *string `type:"string"` 7228 } 7229 7230 // String returns the string representation. 7231 // 7232 // API parameter values that are decorated as "sensitive" in the API will not 7233 // be included in the string output. The member name will be present, but the 7234 // value will be replaced with "sensitive". 7235 func (s PublishOutput) String() string { 7236 return awsutil.Prettify(s) 7237 } 7238 7239 // GoString returns the string representation. 7240 // 7241 // API parameter values that are decorated as "sensitive" in the API will not 7242 // be included in the string output. The member name will be present, but the 7243 // value will be replaced with "sensitive". 7244 func (s PublishOutput) GoString() string { 7245 return s.String() 7246 } 7247 7248 // SetMessageId sets the MessageId field's value. 7249 func (s *PublishOutput) SetMessageId(v string) *PublishOutput { 7250 s.MessageId = &v 7251 return s 7252 } 7253 7254 // SetSequenceNumber sets the SequenceNumber field's value. 7255 func (s *PublishOutput) SetSequenceNumber(v string) *PublishOutput { 7256 s.SequenceNumber = &v 7257 return s 7258 } 7259 7260 // Input for RemovePermission action. 7261 type RemovePermissionInput struct { 7262 _ struct{} `type:"structure"` 7263 7264 // The unique label of the statement you want to remove. 7265 // 7266 // Label is a required field 7267 Label *string `type:"string" required:"true"` 7268 7269 // The ARN of the topic whose access control policy you wish to modify. 7270 // 7271 // TopicArn is a required field 7272 TopicArn *string `type:"string" required:"true"` 7273 } 7274 7275 // String returns the string representation. 7276 // 7277 // API parameter values that are decorated as "sensitive" in the API will not 7278 // be included in the string output. The member name will be present, but the 7279 // value will be replaced with "sensitive". 7280 func (s RemovePermissionInput) String() string { 7281 return awsutil.Prettify(s) 7282 } 7283 7284 // GoString returns the string representation. 7285 // 7286 // API parameter values that are decorated as "sensitive" in the API will not 7287 // be included in the string output. The member name will be present, but the 7288 // value will be replaced with "sensitive". 7289 func (s RemovePermissionInput) GoString() string { 7290 return s.String() 7291 } 7292 7293 // Validate inspects the fields of the type to determine if they are valid. 7294 func (s *RemovePermissionInput) Validate() error { 7295 invalidParams := request.ErrInvalidParams{Context: "RemovePermissionInput"} 7296 if s.Label == nil { 7297 invalidParams.Add(request.NewErrParamRequired("Label")) 7298 } 7299 if s.TopicArn == nil { 7300 invalidParams.Add(request.NewErrParamRequired("TopicArn")) 7301 } 7302 7303 if invalidParams.Len() > 0 { 7304 return invalidParams 7305 } 7306 return nil 7307 } 7308 7309 // SetLabel sets the Label field's value. 7310 func (s *RemovePermissionInput) SetLabel(v string) *RemovePermissionInput { 7311 s.Label = &v 7312 return s 7313 } 7314 7315 // SetTopicArn sets the TopicArn field's value. 7316 func (s *RemovePermissionInput) SetTopicArn(v string) *RemovePermissionInput { 7317 s.TopicArn = &v 7318 return s 7319 } 7320 7321 type RemovePermissionOutput struct { 7322 _ struct{} `type:"structure"` 7323 } 7324 7325 // String returns the string representation. 7326 // 7327 // API parameter values that are decorated as "sensitive" in the API will not 7328 // be included in the string output. The member name will be present, but the 7329 // value will be replaced with "sensitive". 7330 func (s RemovePermissionOutput) String() string { 7331 return awsutil.Prettify(s) 7332 } 7333 7334 // GoString returns the string representation. 7335 // 7336 // API parameter values that are decorated as "sensitive" in the API will not 7337 // be included in the string output. The member name will be present, but the 7338 // value will be replaced with "sensitive". 7339 func (s RemovePermissionOutput) GoString() string { 7340 return s.String() 7341 } 7342 7343 // A verified or pending destination phone number in the SMS sandbox. 7344 // 7345 // When you start using Amazon SNS to send SMS messages, your account is in 7346 // the SMS sandbox. The SMS sandbox provides a safe environment for you to try 7347 // Amazon SNS features without risking your reputation as an SMS sender. While 7348 // your account is in the SMS sandbox, you can use all of the features of Amazon 7349 // SNS. However, you can send SMS messages only to verified destination phone 7350 // numbers. For more information, including how to move out of the sandbox to 7351 // send messages without restrictions, see SMS sandbox (https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html) 7352 // in the Amazon SNS Developer Guide. 7353 type SMSSandboxPhoneNumber struct { 7354 _ struct{} `type:"structure"` 7355 7356 // The destination phone number. 7357 PhoneNumber *string `type:"string"` 7358 7359 // The destination phone number's verification status. 7360 Status *string `type:"string" enum:"SMSSandboxPhoneNumberVerificationStatus"` 7361 } 7362 7363 // String returns the string representation. 7364 // 7365 // API parameter values that are decorated as "sensitive" in the API will not 7366 // be included in the string output. The member name will be present, but the 7367 // value will be replaced with "sensitive". 7368 func (s SMSSandboxPhoneNumber) String() string { 7369 return awsutil.Prettify(s) 7370 } 7371 7372 // GoString returns the string representation. 7373 // 7374 // API parameter values that are decorated as "sensitive" in the API will not 7375 // be included in the string output. The member name will be present, but the 7376 // value will be replaced with "sensitive". 7377 func (s SMSSandboxPhoneNumber) GoString() string { 7378 return s.String() 7379 } 7380 7381 // SetPhoneNumber sets the PhoneNumber field's value. 7382 func (s *SMSSandboxPhoneNumber) SetPhoneNumber(v string) *SMSSandboxPhoneNumber { 7383 s.PhoneNumber = &v 7384 return s 7385 } 7386 7387 // SetStatus sets the Status field's value. 7388 func (s *SMSSandboxPhoneNumber) SetStatus(v string) *SMSSandboxPhoneNumber { 7389 s.Status = &v 7390 return s 7391 } 7392 7393 // Input for SetEndpointAttributes action. 7394 type SetEndpointAttributesInput struct { 7395 _ struct{} `type:"structure"` 7396 7397 // A map of the endpoint attributes. Attributes in this map include the following: 7398 // 7399 // * CustomUserData – arbitrary user data to associate with the endpoint. 7400 // Amazon SNS does not use this data. The data must be in UTF-8 format and 7401 // less than 2KB. 7402 // 7403 // * Enabled – flag that enables/disables delivery to the endpoint. Amazon 7404 // SNS will set this to false when a notification service indicates to Amazon 7405 // SNS that the endpoint is invalid. Users can set it back to true, typically 7406 // after updating Token. 7407 // 7408 // * Token – device token, also referred to as a registration id, for an 7409 // app and mobile device. This is returned from the notification service 7410 // when an app and mobile device are registered with the notification service. 7411 // 7412 // Attributes is a required field 7413 Attributes map[string]*string `type:"map" required:"true"` 7414 7415 // EndpointArn used for SetEndpointAttributes action. 7416 // 7417 // EndpointArn is a required field 7418 EndpointArn *string `type:"string" required:"true"` 7419 } 7420 7421 // String returns the string representation. 7422 // 7423 // API parameter values that are decorated as "sensitive" in the API will not 7424 // be included in the string output. The member name will be present, but the 7425 // value will be replaced with "sensitive". 7426 func (s SetEndpointAttributesInput) String() string { 7427 return awsutil.Prettify(s) 7428 } 7429 7430 // GoString returns the string representation. 7431 // 7432 // API parameter values that are decorated as "sensitive" in the API will not 7433 // be included in the string output. The member name will be present, but the 7434 // value will be replaced with "sensitive". 7435 func (s SetEndpointAttributesInput) GoString() string { 7436 return s.String() 7437 } 7438 7439 // Validate inspects the fields of the type to determine if they are valid. 7440 func (s *SetEndpointAttributesInput) Validate() error { 7441 invalidParams := request.ErrInvalidParams{Context: "SetEndpointAttributesInput"} 7442 if s.Attributes == nil { 7443 invalidParams.Add(request.NewErrParamRequired("Attributes")) 7444 } 7445 if s.EndpointArn == nil { 7446 invalidParams.Add(request.NewErrParamRequired("EndpointArn")) 7447 } 7448 7449 if invalidParams.Len() > 0 { 7450 return invalidParams 7451 } 7452 return nil 7453 } 7454 7455 // SetAttributes sets the Attributes field's value. 7456 func (s *SetEndpointAttributesInput) SetAttributes(v map[string]*string) *SetEndpointAttributesInput { 7457 s.Attributes = v 7458 return s 7459 } 7460 7461 // SetEndpointArn sets the EndpointArn field's value. 7462 func (s *SetEndpointAttributesInput) SetEndpointArn(v string) *SetEndpointAttributesInput { 7463 s.EndpointArn = &v 7464 return s 7465 } 7466 7467 type SetEndpointAttributesOutput struct { 7468 _ struct{} `type:"structure"` 7469 } 7470 7471 // String returns the string representation. 7472 // 7473 // API parameter values that are decorated as "sensitive" in the API will not 7474 // be included in the string output. The member name will be present, but the 7475 // value will be replaced with "sensitive". 7476 func (s SetEndpointAttributesOutput) String() string { 7477 return awsutil.Prettify(s) 7478 } 7479 7480 // GoString returns the string representation. 7481 // 7482 // API parameter values that are decorated as "sensitive" in the API will not 7483 // be included in the string output. The member name will be present, but the 7484 // value will be replaced with "sensitive". 7485 func (s SetEndpointAttributesOutput) GoString() string { 7486 return s.String() 7487 } 7488 7489 // Input for SetPlatformApplicationAttributes action. 7490 type SetPlatformApplicationAttributesInput struct { 7491 _ struct{} `type:"structure"` 7492 7493 // A map of the platform application attributes. Attributes in this map include 7494 // the following: 7495 // 7496 // * PlatformCredential – The credential received from the notification 7497 // service. For APNS and APNS_SANDBOX, PlatformCredential is private key. 7498 // For GCM (Firebase Cloud Messaging), PlatformCredential is API key. For 7499 // ADM, PlatformCredential is client secret. 7500 // 7501 // * PlatformPrincipal – The principal received from the notification service. 7502 // For APNS and APNS_SANDBOX, PlatformPrincipal is SSL certificate. For GCM 7503 // (Firebase Cloud Messaging), there is no PlatformPrincipal. For ADM, PlatformPrincipal 7504 // is client id. 7505 // 7506 // * EventEndpointCreated – Topic ARN to which EndpointCreated event notifications 7507 // are sent. 7508 // 7509 // * EventEndpointDeleted – Topic ARN to which EndpointDeleted event notifications 7510 // are sent. 7511 // 7512 // * EventEndpointUpdated – Topic ARN to which EndpointUpdate event notifications 7513 // are sent. 7514 // 7515 // * EventDeliveryFailure – Topic ARN to which DeliveryFailure event notifications 7516 // are sent upon Direct Publish delivery failure (permanent) to one of the 7517 // application's endpoints. 7518 // 7519 // * SuccessFeedbackRoleArn – IAM role ARN used to give Amazon SNS write 7520 // access to use CloudWatch Logs on your behalf. 7521 // 7522 // * FailureFeedbackRoleArn – IAM role ARN used to give Amazon SNS write 7523 // access to use CloudWatch Logs on your behalf. 7524 // 7525 // * SuccessFeedbackSampleRate – Sample rate percentage (0-100) of successfully 7526 // delivered messages. 7527 // 7528 // Attributes is a required field 7529 Attributes map[string]*string `type:"map" required:"true"` 7530 7531 // PlatformApplicationArn for SetPlatformApplicationAttributes action. 7532 // 7533 // PlatformApplicationArn is a required field 7534 PlatformApplicationArn *string `type:"string" required:"true"` 7535 } 7536 7537 // String returns the string representation. 7538 // 7539 // API parameter values that are decorated as "sensitive" in the API will not 7540 // be included in the string output. The member name will be present, but the 7541 // value will be replaced with "sensitive". 7542 func (s SetPlatformApplicationAttributesInput) String() string { 7543 return awsutil.Prettify(s) 7544 } 7545 7546 // GoString returns the string representation. 7547 // 7548 // API parameter values that are decorated as "sensitive" in the API will not 7549 // be included in the string output. The member name will be present, but the 7550 // value will be replaced with "sensitive". 7551 func (s SetPlatformApplicationAttributesInput) GoString() string { 7552 return s.String() 7553 } 7554 7555 // Validate inspects the fields of the type to determine if they are valid. 7556 func (s *SetPlatformApplicationAttributesInput) Validate() error { 7557 invalidParams := request.ErrInvalidParams{Context: "SetPlatformApplicationAttributesInput"} 7558 if s.Attributes == nil { 7559 invalidParams.Add(request.NewErrParamRequired("Attributes")) 7560 } 7561 if s.PlatformApplicationArn == nil { 7562 invalidParams.Add(request.NewErrParamRequired("PlatformApplicationArn")) 7563 } 7564 7565 if invalidParams.Len() > 0 { 7566 return invalidParams 7567 } 7568 return nil 7569 } 7570 7571 // SetAttributes sets the Attributes field's value. 7572 func (s *SetPlatformApplicationAttributesInput) SetAttributes(v map[string]*string) *SetPlatformApplicationAttributesInput { 7573 s.Attributes = v 7574 return s 7575 } 7576 7577 // SetPlatformApplicationArn sets the PlatformApplicationArn field's value. 7578 func (s *SetPlatformApplicationAttributesInput) SetPlatformApplicationArn(v string) *SetPlatformApplicationAttributesInput { 7579 s.PlatformApplicationArn = &v 7580 return s 7581 } 7582 7583 type SetPlatformApplicationAttributesOutput struct { 7584 _ struct{} `type:"structure"` 7585 } 7586 7587 // String returns the string representation. 7588 // 7589 // API parameter values that are decorated as "sensitive" in the API will not 7590 // be included in the string output. The member name will be present, but the 7591 // value will be replaced with "sensitive". 7592 func (s SetPlatformApplicationAttributesOutput) String() string { 7593 return awsutil.Prettify(s) 7594 } 7595 7596 // GoString returns the string representation. 7597 // 7598 // API parameter values that are decorated as "sensitive" in the API will not 7599 // be included in the string output. The member name will be present, but the 7600 // value will be replaced with "sensitive". 7601 func (s SetPlatformApplicationAttributesOutput) GoString() string { 7602 return s.String() 7603 } 7604 7605 // The input for the SetSMSAttributes action. 7606 type SetSMSAttributesInput struct { 7607 _ struct{} `type:"structure"` 7608 7609 // The default settings for sending SMS messages from your account. You can 7610 // set values for the following attribute names: 7611 // 7612 // MonthlySpendLimit – The maximum amount in USD that you are willing to spend 7613 // each month to send SMS messages. When Amazon SNS determines that sending 7614 // an SMS message would incur a cost that exceeds this limit, it stops sending 7615 // SMS messages within minutes. 7616 // 7617 // Amazon SNS stops sending SMS messages within minutes of the limit being crossed. 7618 // During that interval, if you continue to send SMS messages, you will incur 7619 // costs that exceed your limit. 7620 // 7621 // By default, the spend limit is set to the maximum allowed by Amazon SNS. 7622 // If you want to raise the limit, submit an SNS Limit Increase case (https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-sns). 7623 // For New limit value, enter your desired monthly spend limit. In the Use Case 7624 // Description field, explain that you are requesting an SMS monthly spend limit 7625 // increase. 7626 // 7627 // DeliveryStatusIAMRole – The ARN of the IAM role that allows Amazon SNS 7628 // to write logs about SMS deliveries in CloudWatch Logs. For each SMS message 7629 // that you send, Amazon SNS writes a log that includes the message price, the 7630 // success or failure status, the reason for failure (if the message failed), 7631 // the message dwell time, and other information. 7632 // 7633 // DeliveryStatusSuccessSamplingRate – The percentage of successful SMS deliveries 7634 // for which Amazon SNS will write logs in CloudWatch Logs. The value can be 7635 // an integer from 0 - 100. For example, to write logs only for failed deliveries, 7636 // set this value to 0. To write logs for 10% of your successful deliveries, 7637 // set it to 10. 7638 // 7639 // DefaultSenderID – A string, such as your business brand, that is displayed 7640 // as the sender on the receiving device. Support for sender IDs varies by country. 7641 // The sender ID can be 1 - 11 alphanumeric characters, and it must contain 7642 // at least one letter. 7643 // 7644 // DefaultSMSType – The type of SMS message that you will send by default. 7645 // You can assign the following values: 7646 // 7647 // * Promotional – (Default) Noncritical messages, such as marketing messages. 7648 // Amazon SNS optimizes the message delivery to incur the lowest cost. 7649 // 7650 // * Transactional – Critical messages that support customer transactions, 7651 // such as one-time passcodes for multi-factor authentication. Amazon SNS 7652 // optimizes the message delivery to achieve the highest reliability. 7653 // 7654 // UsageReportS3Bucket – The name of the Amazon S3 bucket to receive daily 7655 // SMS usage reports from Amazon SNS. Each day, Amazon SNS will deliver a usage 7656 // report as a CSV file to the bucket. The report includes the following information 7657 // for each SMS message that was successfully delivered by your account: 7658 // 7659 // * Time that the message was published (in UTC) 7660 // 7661 // * Message ID 7662 // 7663 // * Destination phone number 7664 // 7665 // * Message type 7666 // 7667 // * Delivery status 7668 // 7669 // * Message price (in USD) 7670 // 7671 // * Part number (a message is split into multiple parts if it is too long 7672 // for a single message) 7673 // 7674 // * Total number of parts 7675 // 7676 // To receive the report, the bucket must have a policy that allows the Amazon 7677 // SNS service principal to perform the s3:PutObject and s3:GetBucketLocation 7678 // actions. 7679 // 7680 // For an example bucket policy and usage report, see Monitoring SMS Activity 7681 // (https://docs.aws.amazon.com/sns/latest/dg/sms_stats.html) in the Amazon 7682 // SNS Developer Guide. 7683 // 7684 // Attributes is a required field 7685 Attributes map[string]*string `locationName:"attributes" type:"map" required:"true"` 7686 } 7687 7688 // String returns the string representation. 7689 // 7690 // API parameter values that are decorated as "sensitive" in the API will not 7691 // be included in the string output. The member name will be present, but the 7692 // value will be replaced with "sensitive". 7693 func (s SetSMSAttributesInput) String() string { 7694 return awsutil.Prettify(s) 7695 } 7696 7697 // GoString returns the string representation. 7698 // 7699 // API parameter values that are decorated as "sensitive" in the API will not 7700 // be included in the string output. The member name will be present, but the 7701 // value will be replaced with "sensitive". 7702 func (s SetSMSAttributesInput) GoString() string { 7703 return s.String() 7704 } 7705 7706 // Validate inspects the fields of the type to determine if they are valid. 7707 func (s *SetSMSAttributesInput) Validate() error { 7708 invalidParams := request.ErrInvalidParams{Context: "SetSMSAttributesInput"} 7709 if s.Attributes == nil { 7710 invalidParams.Add(request.NewErrParamRequired("Attributes")) 7711 } 7712 7713 if invalidParams.Len() > 0 { 7714 return invalidParams 7715 } 7716 return nil 7717 } 7718 7719 // SetAttributes sets the Attributes field's value. 7720 func (s *SetSMSAttributesInput) SetAttributes(v map[string]*string) *SetSMSAttributesInput { 7721 s.Attributes = v 7722 return s 7723 } 7724 7725 // The response for the SetSMSAttributes action. 7726 type SetSMSAttributesOutput struct { 7727 _ struct{} `type:"structure"` 7728 } 7729 7730 // String returns the string representation. 7731 // 7732 // API parameter values that are decorated as "sensitive" in the API will not 7733 // be included in the string output. The member name will be present, but the 7734 // value will be replaced with "sensitive". 7735 func (s SetSMSAttributesOutput) String() string { 7736 return awsutil.Prettify(s) 7737 } 7738 7739 // GoString returns the string representation. 7740 // 7741 // API parameter values that are decorated as "sensitive" in the API will not 7742 // be included in the string output. The member name will be present, but the 7743 // value will be replaced with "sensitive". 7744 func (s SetSMSAttributesOutput) GoString() string { 7745 return s.String() 7746 } 7747 7748 // Input for SetSubscriptionAttributes action. 7749 type SetSubscriptionAttributesInput struct { 7750 _ struct{} `type:"structure"` 7751 7752 // A map of attributes with their corresponding values. 7753 // 7754 // The following lists the names, descriptions, and values of the special request 7755 // parameters that this action uses: 7756 // 7757 // * DeliveryPolicy – The policy that defines how Amazon SNS retries failed 7758 // deliveries to HTTP/S endpoints. 7759 // 7760 // * FilterPolicy – The simple JSON object that lets your subscriber receive 7761 // only a subset of messages, rather than receiving every message published 7762 // to the topic. 7763 // 7764 // * RawMessageDelivery – When set to true, enables raw message delivery 7765 // to Amazon SQS or HTTP/S endpoints. This eliminates the need for the endpoints 7766 // to process JSON formatting, which is otherwise created for Amazon SNS 7767 // metadata. 7768 // 7769 // * RedrivePolicy – When specified, sends undeliverable messages to the 7770 // specified Amazon SQS dead-letter queue. Messages that can't be delivered 7771 // due to client errors (for example, when the subscribed endpoint is unreachable) 7772 // or server errors (for example, when the service that powers the subscribed 7773 // endpoint becomes unavailable) are held in the dead-letter queue for further 7774 // analysis or reprocessing. 7775 // 7776 // The following attribute applies only to Amazon Kinesis Data Firehose delivery 7777 // stream subscriptions: 7778 // 7779 // * SubscriptionRoleArn – The ARN of the IAM role that has the following: 7780 // Permission to write to the Kinesis Data Firehose delivery stream Amazon 7781 // SNS listed as a trusted entity Specifying a valid ARN for this attribute 7782 // is required for Kinesis Data Firehose delivery stream subscriptions. For 7783 // more information, see Fanout to Kinesis Data Firehose delivery streams 7784 // (https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html) 7785 // in the Amazon SNS Developer Guide. 7786 // 7787 // AttributeName is a required field 7788 AttributeName *string `type:"string" required:"true"` 7789 7790 // The new value for the attribute in JSON format. 7791 AttributeValue *string `type:"string"` 7792 7793 // The ARN of the subscription to modify. 7794 // 7795 // SubscriptionArn is a required field 7796 SubscriptionArn *string `type:"string" required:"true"` 7797 } 7798 7799 // String returns the string representation. 7800 // 7801 // API parameter values that are decorated as "sensitive" in the API will not 7802 // be included in the string output. The member name will be present, but the 7803 // value will be replaced with "sensitive". 7804 func (s SetSubscriptionAttributesInput) String() string { 7805 return awsutil.Prettify(s) 7806 } 7807 7808 // GoString returns the string representation. 7809 // 7810 // API parameter values that are decorated as "sensitive" in the API will not 7811 // be included in the string output. The member name will be present, but the 7812 // value will be replaced with "sensitive". 7813 func (s SetSubscriptionAttributesInput) GoString() string { 7814 return s.String() 7815 } 7816 7817 // Validate inspects the fields of the type to determine if they are valid. 7818 func (s *SetSubscriptionAttributesInput) Validate() error { 7819 invalidParams := request.ErrInvalidParams{Context: "SetSubscriptionAttributesInput"} 7820 if s.AttributeName == nil { 7821 invalidParams.Add(request.NewErrParamRequired("AttributeName")) 7822 } 7823 if s.SubscriptionArn == nil { 7824 invalidParams.Add(request.NewErrParamRequired("SubscriptionArn")) 7825 } 7826 7827 if invalidParams.Len() > 0 { 7828 return invalidParams 7829 } 7830 return nil 7831 } 7832 7833 // SetAttributeName sets the AttributeName field's value. 7834 func (s *SetSubscriptionAttributesInput) SetAttributeName(v string) *SetSubscriptionAttributesInput { 7835 s.AttributeName = &v 7836 return s 7837 } 7838 7839 // SetAttributeValue sets the AttributeValue field's value. 7840 func (s *SetSubscriptionAttributesInput) SetAttributeValue(v string) *SetSubscriptionAttributesInput { 7841 s.AttributeValue = &v 7842 return s 7843 } 7844 7845 // SetSubscriptionArn sets the SubscriptionArn field's value. 7846 func (s *SetSubscriptionAttributesInput) SetSubscriptionArn(v string) *SetSubscriptionAttributesInput { 7847 s.SubscriptionArn = &v 7848 return s 7849 } 7850 7851 type SetSubscriptionAttributesOutput struct { 7852 _ struct{} `type:"structure"` 7853 } 7854 7855 // String returns the string representation. 7856 // 7857 // API parameter values that are decorated as "sensitive" in the API will not 7858 // be included in the string output. The member name will be present, but the 7859 // value will be replaced with "sensitive". 7860 func (s SetSubscriptionAttributesOutput) String() string { 7861 return awsutil.Prettify(s) 7862 } 7863 7864 // GoString returns the string representation. 7865 // 7866 // API parameter values that are decorated as "sensitive" in the API will not 7867 // be included in the string output. The member name will be present, but the 7868 // value will be replaced with "sensitive". 7869 func (s SetSubscriptionAttributesOutput) GoString() string { 7870 return s.String() 7871 } 7872 7873 // Input for SetTopicAttributes action. 7874 type SetTopicAttributesInput struct { 7875 _ struct{} `type:"structure"` 7876 7877 // A map of attributes with their corresponding values. 7878 // 7879 // The following lists the names, descriptions, and values of the special request 7880 // parameters that the SetTopicAttributes action uses: 7881 // 7882 // * DeliveryPolicy – The policy that defines how Amazon SNS retries failed 7883 // deliveries to HTTP/S endpoints. 7884 // 7885 // * DisplayName – The display name to use for a topic with SMS subscriptions. 7886 // 7887 // * Policy – The policy that defines who can access your topic. By default, 7888 // only the topic owner can publish or subscribe to the topic. 7889 // 7890 // The following attribute applies only to server-side-encryption (https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html): 7891 // 7892 // * KmsMasterKeyId – The ID of an Amazon Web Services managed customer 7893 // master key (CMK) for Amazon SNS or a custom CMK. For more information, 7894 // see Key Terms (https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms). 7895 // For more examples, see KeyId (https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters) 7896 // in the Key Management Service API Reference. 7897 // 7898 // The following attribute applies only to FIFO topics (https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html): 7899 // 7900 // * ContentBasedDeduplication – Enables content-based deduplication for 7901 // FIFO topics. By default, ContentBasedDeduplication is set to false. If 7902 // you create a FIFO topic and this attribute is false, you must specify 7903 // a value for the MessageDeduplicationId parameter for the Publish (https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) 7904 // action. When you set ContentBasedDeduplication to true, Amazon SNS uses 7905 // a SHA-256 hash to generate the MessageDeduplicationId using the body of 7906 // the message (but not the attributes of the message). (Optional) To override 7907 // the generated value, you can specify a value for the MessageDeduplicationId 7908 // parameter for the Publish action. 7909 // 7910 // AttributeName is a required field 7911 AttributeName *string `type:"string" required:"true"` 7912 7913 // The new value for the attribute. 7914 AttributeValue *string `type:"string"` 7915 7916 // The ARN of the topic to modify. 7917 // 7918 // TopicArn is a required field 7919 TopicArn *string `type:"string" required:"true"` 7920 } 7921 7922 // String returns the string representation. 7923 // 7924 // API parameter values that are decorated as "sensitive" in the API will not 7925 // be included in the string output. The member name will be present, but the 7926 // value will be replaced with "sensitive". 7927 func (s SetTopicAttributesInput) String() string { 7928 return awsutil.Prettify(s) 7929 } 7930 7931 // GoString returns the string representation. 7932 // 7933 // API parameter values that are decorated as "sensitive" in the API will not 7934 // be included in the string output. The member name will be present, but the 7935 // value will be replaced with "sensitive". 7936 func (s SetTopicAttributesInput) GoString() string { 7937 return s.String() 7938 } 7939 7940 // Validate inspects the fields of the type to determine if they are valid. 7941 func (s *SetTopicAttributesInput) Validate() error { 7942 invalidParams := request.ErrInvalidParams{Context: "SetTopicAttributesInput"} 7943 if s.AttributeName == nil { 7944 invalidParams.Add(request.NewErrParamRequired("AttributeName")) 7945 } 7946 if s.TopicArn == nil { 7947 invalidParams.Add(request.NewErrParamRequired("TopicArn")) 7948 } 7949 7950 if invalidParams.Len() > 0 { 7951 return invalidParams 7952 } 7953 return nil 7954 } 7955 7956 // SetAttributeName sets the AttributeName field's value. 7957 func (s *SetTopicAttributesInput) SetAttributeName(v string) *SetTopicAttributesInput { 7958 s.AttributeName = &v 7959 return s 7960 } 7961 7962 // SetAttributeValue sets the AttributeValue field's value. 7963 func (s *SetTopicAttributesInput) SetAttributeValue(v string) *SetTopicAttributesInput { 7964 s.AttributeValue = &v 7965 return s 7966 } 7967 7968 // SetTopicArn sets the TopicArn field's value. 7969 func (s *SetTopicAttributesInput) SetTopicArn(v string) *SetTopicAttributesInput { 7970 s.TopicArn = &v 7971 return s 7972 } 7973 7974 type SetTopicAttributesOutput struct { 7975 _ struct{} `type:"structure"` 7976 } 7977 7978 // String returns the string representation. 7979 // 7980 // API parameter values that are decorated as "sensitive" in the API will not 7981 // be included in the string output. The member name will be present, but the 7982 // value will be replaced with "sensitive". 7983 func (s SetTopicAttributesOutput) String() string { 7984 return awsutil.Prettify(s) 7985 } 7986 7987 // GoString returns the string representation. 7988 // 7989 // API parameter values that are decorated as "sensitive" in the API will not 7990 // be included in the string output. The member name will be present, but the 7991 // value will be replaced with "sensitive". 7992 func (s SetTopicAttributesOutput) GoString() string { 7993 return s.String() 7994 } 7995 7996 // Input for Subscribe action. 7997 type SubscribeInput struct { 7998 _ struct{} `type:"structure"` 7999 8000 // A map of attributes with their corresponding values. 8001 // 8002 // The following lists the names, descriptions, and values of the special request 8003 // parameters that the Subscribe action uses: 8004 // 8005 // * DeliveryPolicy – The policy that defines how Amazon SNS retries failed 8006 // deliveries to HTTP/S endpoints. 8007 // 8008 // * FilterPolicy – The simple JSON object that lets your subscriber receive 8009 // only a subset of messages, rather than receiving every message published 8010 // to the topic. 8011 // 8012 // * RawMessageDelivery – When set to true, enables raw message delivery 8013 // to Amazon SQS or HTTP/S endpoints. This eliminates the need for the endpoints 8014 // to process JSON formatting, which is otherwise created for Amazon SNS 8015 // metadata. 8016 // 8017 // * RedrivePolicy – When specified, sends undeliverable messages to the 8018 // specified Amazon SQS dead-letter queue. Messages that can't be delivered 8019 // due to client errors (for example, when the subscribed endpoint is unreachable) 8020 // or server errors (for example, when the service that powers the subscribed 8021 // endpoint becomes unavailable) are held in the dead-letter queue for further 8022 // analysis or reprocessing. 8023 // 8024 // The following attribute applies only to Amazon Kinesis Data Firehose delivery 8025 // stream subscriptions: 8026 // 8027 // * SubscriptionRoleArn – The ARN of the IAM role that has the following: 8028 // Permission to write to the Kinesis Data Firehose delivery stream Amazon 8029 // SNS listed as a trusted entity Specifying a valid ARN for this attribute 8030 // is required for Kinesis Data Firehose delivery stream subscriptions. For 8031 // more information, see Fanout to Kinesis Data Firehose delivery streams 8032 // (https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html) 8033 // in the Amazon SNS Developer Guide. 8034 Attributes map[string]*string `type:"map"` 8035 8036 // The endpoint that you want to receive notifications. Endpoints vary by protocol: 8037 // 8038 // * For the http protocol, the (public) endpoint is a URL beginning with 8039 // http://. 8040 // 8041 // * For the https protocol, the (public) endpoint is a URL beginning with 8042 // https://. 8043 // 8044 // * For the email protocol, the endpoint is an email address. 8045 // 8046 // * For the email-json protocol, the endpoint is an email address. 8047 // 8048 // * For the sms protocol, the endpoint is a phone number of an SMS-enabled 8049 // device. 8050 // 8051 // * For the sqs protocol, the endpoint is the ARN of an Amazon SQS queue. 8052 // 8053 // * For the application protocol, the endpoint is the EndpointArn of a mobile 8054 // app and device. 8055 // 8056 // * For the lambda protocol, the endpoint is the ARN of an Lambda function. 8057 // 8058 // * For the firehose protocol, the endpoint is the ARN of an Amazon Kinesis 8059 // Data Firehose delivery stream. 8060 Endpoint *string `type:"string"` 8061 8062 // The protocol that you want to use. Supported protocols include: 8063 // 8064 // * http – delivery of JSON-encoded message via HTTP POST 8065 // 8066 // * https – delivery of JSON-encoded message via HTTPS POST 8067 // 8068 // * email – delivery of message via SMTP 8069 // 8070 // * email-json – delivery of JSON-encoded message via SMTP 8071 // 8072 // * sms – delivery of message via SMS 8073 // 8074 // * sqs – delivery of JSON-encoded message to an Amazon SQS queue 8075 // 8076 // * application – delivery of JSON-encoded message to an EndpointArn for 8077 // a mobile app and device 8078 // 8079 // * lambda – delivery of JSON-encoded message to an Lambda function 8080 // 8081 // * firehose – delivery of JSON-encoded message to an Amazon Kinesis Data 8082 // Firehose delivery stream. 8083 // 8084 // Protocol is a required field 8085 Protocol *string `type:"string" required:"true"` 8086 8087 // Sets whether the response from the Subscribe request includes the subscription 8088 // ARN, even if the subscription is not yet confirmed. 8089 // 8090 // If you set this parameter to true, the response includes the ARN in all cases, 8091 // even if the subscription is not yet confirmed. In addition to the ARN for 8092 // confirmed subscriptions, the response also includes the pending subscription 8093 // ARN value for subscriptions that aren't yet confirmed. A subscription becomes 8094 // confirmed when the subscriber calls the ConfirmSubscription action with a 8095 // confirmation token. 8096 // 8097 // The default value is false. 8098 ReturnSubscriptionArn *bool `type:"boolean"` 8099 8100 // The ARN of the topic you want to subscribe to. 8101 // 8102 // TopicArn is a required field 8103 TopicArn *string `type:"string" required:"true"` 8104 } 8105 8106 // String returns the string representation. 8107 // 8108 // API parameter values that are decorated as "sensitive" in the API will not 8109 // be included in the string output. The member name will be present, but the 8110 // value will be replaced with "sensitive". 8111 func (s SubscribeInput) String() string { 8112 return awsutil.Prettify(s) 8113 } 8114 8115 // GoString returns the string representation. 8116 // 8117 // API parameter values that are decorated as "sensitive" in the API will not 8118 // be included in the string output. The member name will be present, but the 8119 // value will be replaced with "sensitive". 8120 func (s SubscribeInput) GoString() string { 8121 return s.String() 8122 } 8123 8124 // Validate inspects the fields of the type to determine if they are valid. 8125 func (s *SubscribeInput) Validate() error { 8126 invalidParams := request.ErrInvalidParams{Context: "SubscribeInput"} 8127 if s.Protocol == nil { 8128 invalidParams.Add(request.NewErrParamRequired("Protocol")) 8129 } 8130 if s.TopicArn == nil { 8131 invalidParams.Add(request.NewErrParamRequired("TopicArn")) 8132 } 8133 8134 if invalidParams.Len() > 0 { 8135 return invalidParams 8136 } 8137 return nil 8138 } 8139 8140 // SetAttributes sets the Attributes field's value. 8141 func (s *SubscribeInput) SetAttributes(v map[string]*string) *SubscribeInput { 8142 s.Attributes = v 8143 return s 8144 } 8145 8146 // SetEndpoint sets the Endpoint field's value. 8147 func (s *SubscribeInput) SetEndpoint(v string) *SubscribeInput { 8148 s.Endpoint = &v 8149 return s 8150 } 8151 8152 // SetProtocol sets the Protocol field's value. 8153 func (s *SubscribeInput) SetProtocol(v string) *SubscribeInput { 8154 s.Protocol = &v 8155 return s 8156 } 8157 8158 // SetReturnSubscriptionArn sets the ReturnSubscriptionArn field's value. 8159 func (s *SubscribeInput) SetReturnSubscriptionArn(v bool) *SubscribeInput { 8160 s.ReturnSubscriptionArn = &v 8161 return s 8162 } 8163 8164 // SetTopicArn sets the TopicArn field's value. 8165 func (s *SubscribeInput) SetTopicArn(v string) *SubscribeInput { 8166 s.TopicArn = &v 8167 return s 8168 } 8169 8170 // Response for Subscribe action. 8171 type SubscribeOutput struct { 8172 _ struct{} `type:"structure"` 8173 8174 // The ARN of the subscription if it is confirmed, or the string "pending confirmation" 8175 // if the subscription requires confirmation. However, if the API request parameter 8176 // ReturnSubscriptionArn is true, then the value is always the subscription 8177 // ARN, even if the subscription requires confirmation. 8178 SubscriptionArn *string `type:"string"` 8179 } 8180 8181 // String returns the string representation. 8182 // 8183 // API parameter values that are decorated as "sensitive" in the API will not 8184 // be included in the string output. The member name will be present, but the 8185 // value will be replaced with "sensitive". 8186 func (s SubscribeOutput) String() string { 8187 return awsutil.Prettify(s) 8188 } 8189 8190 // GoString returns the string representation. 8191 // 8192 // API parameter values that are decorated as "sensitive" in the API will not 8193 // be included in the string output. The member name will be present, but the 8194 // value will be replaced with "sensitive". 8195 func (s SubscribeOutput) GoString() string { 8196 return s.String() 8197 } 8198 8199 // SetSubscriptionArn sets the SubscriptionArn field's value. 8200 func (s *SubscribeOutput) SetSubscriptionArn(v string) *SubscribeOutput { 8201 s.SubscriptionArn = &v 8202 return s 8203 } 8204 8205 // A wrapper type for the attributes of an Amazon SNS subscription. 8206 type Subscription struct { 8207 _ struct{} `type:"structure"` 8208 8209 // The subscription's endpoint (format depends on the protocol). 8210 Endpoint *string `type:"string"` 8211 8212 // The subscription's owner. 8213 Owner *string `type:"string"` 8214 8215 // The subscription's protocol. 8216 Protocol *string `type:"string"` 8217 8218 // The subscription's ARN. 8219 SubscriptionArn *string `type:"string"` 8220 8221 // The ARN of the subscription's topic. 8222 TopicArn *string `type:"string"` 8223 } 8224 8225 // String returns the string representation. 8226 // 8227 // API parameter values that are decorated as "sensitive" in the API will not 8228 // be included in the string output. The member name will be present, but the 8229 // value will be replaced with "sensitive". 8230 func (s Subscription) String() string { 8231 return awsutil.Prettify(s) 8232 } 8233 8234 // GoString returns the string representation. 8235 // 8236 // API parameter values that are decorated as "sensitive" in the API will not 8237 // be included in the string output. The member name will be present, but the 8238 // value will be replaced with "sensitive". 8239 func (s Subscription) GoString() string { 8240 return s.String() 8241 } 8242 8243 // SetEndpoint sets the Endpoint field's value. 8244 func (s *Subscription) SetEndpoint(v string) *Subscription { 8245 s.Endpoint = &v 8246 return s 8247 } 8248 8249 // SetOwner sets the Owner field's value. 8250 func (s *Subscription) SetOwner(v string) *Subscription { 8251 s.Owner = &v 8252 return s 8253 } 8254 8255 // SetProtocol sets the Protocol field's value. 8256 func (s *Subscription) SetProtocol(v string) *Subscription { 8257 s.Protocol = &v 8258 return s 8259 } 8260 8261 // SetSubscriptionArn sets the SubscriptionArn field's value. 8262 func (s *Subscription) SetSubscriptionArn(v string) *Subscription { 8263 s.SubscriptionArn = &v 8264 return s 8265 } 8266 8267 // SetTopicArn sets the TopicArn field's value. 8268 func (s *Subscription) SetTopicArn(v string) *Subscription { 8269 s.TopicArn = &v 8270 return s 8271 } 8272 8273 // The list of tags to be added to the specified topic. 8274 type Tag struct { 8275 _ struct{} `type:"structure"` 8276 8277 // The required key portion of the tag. 8278 // 8279 // Key is a required field 8280 Key *string `min:"1" type:"string" required:"true"` 8281 8282 // The optional value portion of the tag. 8283 // 8284 // Value is a required field 8285 Value *string `type:"string" required:"true"` 8286 } 8287 8288 // String returns the string representation. 8289 // 8290 // API parameter values that are decorated as "sensitive" in the API will not 8291 // be included in the string output. The member name will be present, but the 8292 // value will be replaced with "sensitive". 8293 func (s Tag) String() string { 8294 return awsutil.Prettify(s) 8295 } 8296 8297 // GoString returns the string representation. 8298 // 8299 // API parameter values that are decorated as "sensitive" in the API will not 8300 // be included in the string output. The member name will be present, but the 8301 // value will be replaced with "sensitive". 8302 func (s Tag) GoString() string { 8303 return s.String() 8304 } 8305 8306 // Validate inspects the fields of the type to determine if they are valid. 8307 func (s *Tag) Validate() error { 8308 invalidParams := request.ErrInvalidParams{Context: "Tag"} 8309 if s.Key == nil { 8310 invalidParams.Add(request.NewErrParamRequired("Key")) 8311 } 8312 if s.Key != nil && len(*s.Key) < 1 { 8313 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 8314 } 8315 if s.Value == nil { 8316 invalidParams.Add(request.NewErrParamRequired("Value")) 8317 } 8318 8319 if invalidParams.Len() > 0 { 8320 return invalidParams 8321 } 8322 return nil 8323 } 8324 8325 // SetKey sets the Key field's value. 8326 func (s *Tag) SetKey(v string) *Tag { 8327 s.Key = &v 8328 return s 8329 } 8330 8331 // SetValue sets the Value field's value. 8332 func (s *Tag) SetValue(v string) *Tag { 8333 s.Value = &v 8334 return s 8335 } 8336 8337 type TagResourceInput struct { 8338 _ struct{} `type:"structure"` 8339 8340 // The ARN of the topic to which to add tags. 8341 // 8342 // ResourceArn is a required field 8343 ResourceArn *string `min:"1" type:"string" required:"true"` 8344 8345 // The tags to be added to the specified topic. A tag consists of a required 8346 // key and an optional value. 8347 // 8348 // Tags is a required field 8349 Tags []*Tag `type:"list" required:"true"` 8350 } 8351 8352 // String returns the string representation. 8353 // 8354 // API parameter values that are decorated as "sensitive" in the API will not 8355 // be included in the string output. The member name will be present, but the 8356 // value will be replaced with "sensitive". 8357 func (s TagResourceInput) String() string { 8358 return awsutil.Prettify(s) 8359 } 8360 8361 // GoString returns the string representation. 8362 // 8363 // API parameter values that are decorated as "sensitive" in the API will not 8364 // be included in the string output. The member name will be present, but the 8365 // value will be replaced with "sensitive". 8366 func (s TagResourceInput) GoString() string { 8367 return s.String() 8368 } 8369 8370 // Validate inspects the fields of the type to determine if they are valid. 8371 func (s *TagResourceInput) Validate() error { 8372 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 8373 if s.ResourceArn == nil { 8374 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 8375 } 8376 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 8377 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 8378 } 8379 if s.Tags == nil { 8380 invalidParams.Add(request.NewErrParamRequired("Tags")) 8381 } 8382 if s.Tags != nil { 8383 for i, v := range s.Tags { 8384 if v == nil { 8385 continue 8386 } 8387 if err := v.Validate(); err != nil { 8388 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 8389 } 8390 } 8391 } 8392 8393 if invalidParams.Len() > 0 { 8394 return invalidParams 8395 } 8396 return nil 8397 } 8398 8399 // SetResourceArn sets the ResourceArn field's value. 8400 func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { 8401 s.ResourceArn = &v 8402 return s 8403 } 8404 8405 // SetTags sets the Tags field's value. 8406 func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { 8407 s.Tags = v 8408 return s 8409 } 8410 8411 type TagResourceOutput struct { 8412 _ struct{} `type:"structure"` 8413 } 8414 8415 // String returns the string representation. 8416 // 8417 // API parameter values that are decorated as "sensitive" in the API will not 8418 // be included in the string output. The member name will be present, but the 8419 // value will be replaced with "sensitive". 8420 func (s TagResourceOutput) String() string { 8421 return awsutil.Prettify(s) 8422 } 8423 8424 // GoString returns the string representation. 8425 // 8426 // API parameter values that are decorated as "sensitive" in the API will not 8427 // be included in the string output. The member name will be present, but the 8428 // value will be replaced with "sensitive". 8429 func (s TagResourceOutput) GoString() string { 8430 return s.String() 8431 } 8432 8433 // A wrapper type for the topic's Amazon Resource Name (ARN). To retrieve a 8434 // topic's attributes, use GetTopicAttributes. 8435 type Topic struct { 8436 _ struct{} `type:"structure"` 8437 8438 // The topic's ARN. 8439 TopicArn *string `type:"string"` 8440 } 8441 8442 // String returns the string representation. 8443 // 8444 // API parameter values that are decorated as "sensitive" in the API will not 8445 // be included in the string output. The member name will be present, but the 8446 // value will be replaced with "sensitive". 8447 func (s Topic) String() string { 8448 return awsutil.Prettify(s) 8449 } 8450 8451 // GoString returns the string representation. 8452 // 8453 // API parameter values that are decorated as "sensitive" in the API will not 8454 // be included in the string output. The member name will be present, but the 8455 // value will be replaced with "sensitive". 8456 func (s Topic) GoString() string { 8457 return s.String() 8458 } 8459 8460 // SetTopicArn sets the TopicArn field's value. 8461 func (s *Topic) SetTopicArn(v string) *Topic { 8462 s.TopicArn = &v 8463 return s 8464 } 8465 8466 // Input for Unsubscribe action. 8467 type UnsubscribeInput struct { 8468 _ struct{} `type:"structure"` 8469 8470 // The ARN of the subscription to be deleted. 8471 // 8472 // SubscriptionArn is a required field 8473 SubscriptionArn *string `type:"string" required:"true"` 8474 } 8475 8476 // String returns the string representation. 8477 // 8478 // API parameter values that are decorated as "sensitive" in the API will not 8479 // be included in the string output. The member name will be present, but the 8480 // value will be replaced with "sensitive". 8481 func (s UnsubscribeInput) String() string { 8482 return awsutil.Prettify(s) 8483 } 8484 8485 // GoString returns the string representation. 8486 // 8487 // API parameter values that are decorated as "sensitive" in the API will not 8488 // be included in the string output. The member name will be present, but the 8489 // value will be replaced with "sensitive". 8490 func (s UnsubscribeInput) GoString() string { 8491 return s.String() 8492 } 8493 8494 // Validate inspects the fields of the type to determine if they are valid. 8495 func (s *UnsubscribeInput) Validate() error { 8496 invalidParams := request.ErrInvalidParams{Context: "UnsubscribeInput"} 8497 if s.SubscriptionArn == nil { 8498 invalidParams.Add(request.NewErrParamRequired("SubscriptionArn")) 8499 } 8500 8501 if invalidParams.Len() > 0 { 8502 return invalidParams 8503 } 8504 return nil 8505 } 8506 8507 // SetSubscriptionArn sets the SubscriptionArn field's value. 8508 func (s *UnsubscribeInput) SetSubscriptionArn(v string) *UnsubscribeInput { 8509 s.SubscriptionArn = &v 8510 return s 8511 } 8512 8513 type UnsubscribeOutput struct { 8514 _ struct{} `type:"structure"` 8515 } 8516 8517 // String returns the string representation. 8518 // 8519 // API parameter values that are decorated as "sensitive" in the API will not 8520 // be included in the string output. The member name will be present, but the 8521 // value will be replaced with "sensitive". 8522 func (s UnsubscribeOutput) String() string { 8523 return awsutil.Prettify(s) 8524 } 8525 8526 // GoString returns the string representation. 8527 // 8528 // API parameter values that are decorated as "sensitive" in the API will not 8529 // be included in the string output. The member name will be present, but the 8530 // value will be replaced with "sensitive". 8531 func (s UnsubscribeOutput) GoString() string { 8532 return s.String() 8533 } 8534 8535 type UntagResourceInput struct { 8536 _ struct{} `type:"structure"` 8537 8538 // The ARN of the topic from which to remove tags. 8539 // 8540 // ResourceArn is a required field 8541 ResourceArn *string `min:"1" type:"string" required:"true"` 8542 8543 // The list of tag keys to remove from the specified topic. 8544 // 8545 // TagKeys is a required field 8546 TagKeys []*string `type:"list" required:"true"` 8547 } 8548 8549 // String returns the string representation. 8550 // 8551 // API parameter values that are decorated as "sensitive" in the API will not 8552 // be included in the string output. The member name will be present, but the 8553 // value will be replaced with "sensitive". 8554 func (s UntagResourceInput) String() string { 8555 return awsutil.Prettify(s) 8556 } 8557 8558 // GoString returns the string representation. 8559 // 8560 // API parameter values that are decorated as "sensitive" in the API will not 8561 // be included in the string output. The member name will be present, but the 8562 // value will be replaced with "sensitive". 8563 func (s UntagResourceInput) GoString() string { 8564 return s.String() 8565 } 8566 8567 // Validate inspects the fields of the type to determine if they are valid. 8568 func (s *UntagResourceInput) Validate() error { 8569 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 8570 if s.ResourceArn == nil { 8571 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 8572 } 8573 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 8574 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 8575 } 8576 if s.TagKeys == nil { 8577 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 8578 } 8579 8580 if invalidParams.Len() > 0 { 8581 return invalidParams 8582 } 8583 return nil 8584 } 8585 8586 // SetResourceArn sets the ResourceArn field's value. 8587 func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { 8588 s.ResourceArn = &v 8589 return s 8590 } 8591 8592 // SetTagKeys sets the TagKeys field's value. 8593 func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 8594 s.TagKeys = v 8595 return s 8596 } 8597 8598 type UntagResourceOutput struct { 8599 _ struct{} `type:"structure"` 8600 } 8601 8602 // String returns the string representation. 8603 // 8604 // API parameter values that are decorated as "sensitive" in the API will not 8605 // be included in the string output. The member name will be present, but the 8606 // value will be replaced with "sensitive". 8607 func (s UntagResourceOutput) String() string { 8608 return awsutil.Prettify(s) 8609 } 8610 8611 // GoString returns the string representation. 8612 // 8613 // API parameter values that are decorated as "sensitive" in the API will not 8614 // be included in the string output. The member name will be present, but the 8615 // value will be replaced with "sensitive". 8616 func (s UntagResourceOutput) GoString() string { 8617 return s.String() 8618 } 8619 8620 type VerifySMSSandboxPhoneNumberInput struct { 8621 _ struct{} `type:"structure"` 8622 8623 // The OTP sent to the destination number from the CreateSMSSandBoxPhoneNumber 8624 // call. 8625 // 8626 // OneTimePassword is a required field 8627 OneTimePassword *string `min:"5" type:"string" required:"true"` 8628 8629 // The destination phone number to verify. 8630 // 8631 // PhoneNumber is a required field 8632 PhoneNumber *string `type:"string" required:"true"` 8633 } 8634 8635 // String returns the string representation. 8636 // 8637 // API parameter values that are decorated as "sensitive" in the API will not 8638 // be included in the string output. The member name will be present, but the 8639 // value will be replaced with "sensitive". 8640 func (s VerifySMSSandboxPhoneNumberInput) String() string { 8641 return awsutil.Prettify(s) 8642 } 8643 8644 // GoString returns the string representation. 8645 // 8646 // API parameter values that are decorated as "sensitive" in the API will not 8647 // be included in the string output. The member name will be present, but the 8648 // value will be replaced with "sensitive". 8649 func (s VerifySMSSandboxPhoneNumberInput) GoString() string { 8650 return s.String() 8651 } 8652 8653 // Validate inspects the fields of the type to determine if they are valid. 8654 func (s *VerifySMSSandboxPhoneNumberInput) Validate() error { 8655 invalidParams := request.ErrInvalidParams{Context: "VerifySMSSandboxPhoneNumberInput"} 8656 if s.OneTimePassword == nil { 8657 invalidParams.Add(request.NewErrParamRequired("OneTimePassword")) 8658 } 8659 if s.OneTimePassword != nil && len(*s.OneTimePassword) < 5 { 8660 invalidParams.Add(request.NewErrParamMinLen("OneTimePassword", 5)) 8661 } 8662 if s.PhoneNumber == nil { 8663 invalidParams.Add(request.NewErrParamRequired("PhoneNumber")) 8664 } 8665 8666 if invalidParams.Len() > 0 { 8667 return invalidParams 8668 } 8669 return nil 8670 } 8671 8672 // SetOneTimePassword sets the OneTimePassword field's value. 8673 func (s *VerifySMSSandboxPhoneNumberInput) SetOneTimePassword(v string) *VerifySMSSandboxPhoneNumberInput { 8674 s.OneTimePassword = &v 8675 return s 8676 } 8677 8678 // SetPhoneNumber sets the PhoneNumber field's value. 8679 func (s *VerifySMSSandboxPhoneNumberInput) SetPhoneNumber(v string) *VerifySMSSandboxPhoneNumberInput { 8680 s.PhoneNumber = &v 8681 return s 8682 } 8683 8684 // The destination phone number's verification status. 8685 type VerifySMSSandboxPhoneNumberOutput struct { 8686 _ struct{} `type:"structure"` 8687 } 8688 8689 // String returns the string representation. 8690 // 8691 // API parameter values that are decorated as "sensitive" in the API will not 8692 // be included in the string output. The member name will be present, but the 8693 // value will be replaced with "sensitive". 8694 func (s VerifySMSSandboxPhoneNumberOutput) String() string { 8695 return awsutil.Prettify(s) 8696 } 8697 8698 // GoString returns the string representation. 8699 // 8700 // API parameter values that are decorated as "sensitive" in the API will not 8701 // be included in the string output. The member name will be present, but the 8702 // value will be replaced with "sensitive". 8703 func (s VerifySMSSandboxPhoneNumberOutput) GoString() string { 8704 return s.String() 8705 } 8706 8707 // Supported language code for sending OTP message 8708 const ( 8709 // LanguageCodeStringEnUs is a LanguageCodeString enum value 8710 LanguageCodeStringEnUs = "en-US" 8711 8712 // LanguageCodeStringEnGb is a LanguageCodeString enum value 8713 LanguageCodeStringEnGb = "en-GB" 8714 8715 // LanguageCodeStringEs419 is a LanguageCodeString enum value 8716 LanguageCodeStringEs419 = "es-419" 8717 8718 // LanguageCodeStringEsEs is a LanguageCodeString enum value 8719 LanguageCodeStringEsEs = "es-ES" 8720 8721 // LanguageCodeStringDeDe is a LanguageCodeString enum value 8722 LanguageCodeStringDeDe = "de-DE" 8723 8724 // LanguageCodeStringFrCa is a LanguageCodeString enum value 8725 LanguageCodeStringFrCa = "fr-CA" 8726 8727 // LanguageCodeStringFrFr is a LanguageCodeString enum value 8728 LanguageCodeStringFrFr = "fr-FR" 8729 8730 // LanguageCodeStringItIt is a LanguageCodeString enum value 8731 LanguageCodeStringItIt = "it-IT" 8732 8733 // LanguageCodeStringJaJp is a LanguageCodeString enum value 8734 LanguageCodeStringJaJp = "ja-JP" 8735 8736 // LanguageCodeStringPtBr is a LanguageCodeString enum value 8737 LanguageCodeStringPtBr = "pt-BR" 8738 8739 // LanguageCodeStringKrKr is a LanguageCodeString enum value 8740 LanguageCodeStringKrKr = "kr-KR" 8741 8742 // LanguageCodeStringZhCn is a LanguageCodeString enum value 8743 LanguageCodeStringZhCn = "zh-CN" 8744 8745 // LanguageCodeStringZhTw is a LanguageCodeString enum value 8746 LanguageCodeStringZhTw = "zh-TW" 8747 ) 8748 8749 // LanguageCodeString_Values returns all elements of the LanguageCodeString enum 8750 func LanguageCodeString_Values() []string { 8751 return []string{ 8752 LanguageCodeStringEnUs, 8753 LanguageCodeStringEnGb, 8754 LanguageCodeStringEs419, 8755 LanguageCodeStringEsEs, 8756 LanguageCodeStringDeDe, 8757 LanguageCodeStringFrCa, 8758 LanguageCodeStringFrFr, 8759 LanguageCodeStringItIt, 8760 LanguageCodeStringJaJp, 8761 LanguageCodeStringPtBr, 8762 LanguageCodeStringKrKr, 8763 LanguageCodeStringZhCn, 8764 LanguageCodeStringZhTw, 8765 } 8766 } 8767 8768 // Enum listing out all supported number capabilities. 8769 const ( 8770 // NumberCapabilitySms is a NumberCapability enum value 8771 NumberCapabilitySms = "SMS" 8772 8773 // NumberCapabilityMms is a NumberCapability enum value 8774 NumberCapabilityMms = "MMS" 8775 8776 // NumberCapabilityVoice is a NumberCapability enum value 8777 NumberCapabilityVoice = "VOICE" 8778 ) 8779 8780 // NumberCapability_Values returns all elements of the NumberCapability enum 8781 func NumberCapability_Values() []string { 8782 return []string{ 8783 NumberCapabilitySms, 8784 NumberCapabilityMms, 8785 NumberCapabilityVoice, 8786 } 8787 } 8788 8789 // Enum listing out all supported route types. The following enum values are 8790 // supported. 1. Transactional : Non-marketing traffic 2. Promotional : Marketing 8791 // 3. Premium : Premium routes for OTP delivery to the carriers 8792 const ( 8793 // RouteTypeTransactional is a RouteType enum value 8794 RouteTypeTransactional = "Transactional" 8795 8796 // RouteTypePromotional is a RouteType enum value 8797 RouteTypePromotional = "Promotional" 8798 8799 // RouteTypePremium is a RouteType enum value 8800 RouteTypePremium = "Premium" 8801 ) 8802 8803 // RouteType_Values returns all elements of the RouteType enum 8804 func RouteType_Values() []string { 8805 return []string{ 8806 RouteTypeTransactional, 8807 RouteTypePromotional, 8808 RouteTypePremium, 8809 } 8810 } 8811 8812 // Enum listing out all supported destination phone number verification statuses. 8813 // The following enum values are supported. 1. PENDING : The destination phone 8814 // number is pending verification. 2. VERIFIED : The destination phone number 8815 // is verified. 8816 const ( 8817 // SMSSandboxPhoneNumberVerificationStatusPending is a SMSSandboxPhoneNumberVerificationStatus enum value 8818 SMSSandboxPhoneNumberVerificationStatusPending = "Pending" 8819 8820 // SMSSandboxPhoneNumberVerificationStatusVerified is a SMSSandboxPhoneNumberVerificationStatus enum value 8821 SMSSandboxPhoneNumberVerificationStatusVerified = "Verified" 8822 ) 8823 8824 // SMSSandboxPhoneNumberVerificationStatus_Values returns all elements of the SMSSandboxPhoneNumberVerificationStatus enum 8825 func SMSSandboxPhoneNumberVerificationStatus_Values() []string { 8826 return []string{ 8827 SMSSandboxPhoneNumberVerificationStatusPending, 8828 SMSSandboxPhoneNumberVerificationStatusVerified, 8829 } 8830 }