github.com/aavshr/aws-sdk-go@v1.41.3/service/elasticinference/api.go (about)

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  package elasticinference
     4  
     5  import (
     6  	"fmt"
     7  
     8  	"github.com/aavshr/aws-sdk-go/aws"
     9  	"github.com/aavshr/aws-sdk-go/aws/awsutil"
    10  	"github.com/aavshr/aws-sdk-go/aws/request"
    11  	"github.com/aavshr/aws-sdk-go/private/protocol"
    12  	"github.com/aavshr/aws-sdk-go/private/protocol/restjson"
    13  )
    14  
    15  const opDescribeAcceleratorOfferings = "DescribeAcceleratorOfferings"
    16  
    17  // DescribeAcceleratorOfferingsRequest generates a "aws/request.Request" representing the
    18  // client's request for the DescribeAcceleratorOfferings operation. The "output" return
    19  // value will be populated with the request's response once the request completes
    20  // successfully.
    21  //
    22  // Use "Send" method on the returned Request to send the API call to the service.
    23  // the "output" return value is not valid until after Send returns without error.
    24  //
    25  // See DescribeAcceleratorOfferings for more information on using the DescribeAcceleratorOfferings
    26  // API call, and error handling.
    27  //
    28  // This method is useful when you want to inject custom logic or configuration
    29  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
    30  //
    31  //
    32  //    // Example sending a request using the DescribeAcceleratorOfferingsRequest method.
    33  //    req, resp := client.DescribeAcceleratorOfferingsRequest(params)
    34  //
    35  //    err := req.Send()
    36  //    if err == nil { // resp is now filled
    37  //        fmt.Println(resp)
    38  //    }
    39  //
    40  // See also, https://docs.aws.amazon.com/goto/WebAPI/elastic-inference-2017-07-25/DescribeAcceleratorOfferings
    41  func (c *ElasticInference) DescribeAcceleratorOfferingsRequest(input *DescribeAcceleratorOfferingsInput) (req *request.Request, output *DescribeAcceleratorOfferingsOutput) {
    42  	op := &request.Operation{
    43  		Name:       opDescribeAcceleratorOfferings,
    44  		HTTPMethod: "POST",
    45  		HTTPPath:   "/describe-accelerator-offerings",
    46  	}
    47  
    48  	if input == nil {
    49  		input = &DescribeAcceleratorOfferingsInput{}
    50  	}
    51  
    52  	output = &DescribeAcceleratorOfferingsOutput{}
    53  	req = c.newRequest(op, input, output)
    54  	return
    55  }
    56  
    57  // DescribeAcceleratorOfferings API operation for Amazon Elastic  Inference.
    58  //
    59  // Describes the locations in which a given accelerator type or set of types
    60  // is present in a given region.
    61  //
    62  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
    63  // with awserr.Error's Code and Message methods to get detailed information about
    64  // the error.
    65  //
    66  // See the AWS API reference guide for Amazon Elastic  Inference's
    67  // API operation DescribeAcceleratorOfferings for usage and error information.
    68  //
    69  // Returned Error Types:
    70  //   * BadRequestException
    71  //   Raised when a malformed input has been provided to the API.
    72  //
    73  //   * ResourceNotFoundException
    74  //   Raised when the requested resource cannot be found.
    75  //
    76  //   * InternalServerException
    77  //   Raised when an unexpected error occurred during request processing.
    78  //
    79  // See also, https://docs.aws.amazon.com/goto/WebAPI/elastic-inference-2017-07-25/DescribeAcceleratorOfferings
    80  func (c *ElasticInference) DescribeAcceleratorOfferings(input *DescribeAcceleratorOfferingsInput) (*DescribeAcceleratorOfferingsOutput, error) {
    81  	req, out := c.DescribeAcceleratorOfferingsRequest(input)
    82  	return out, req.Send()
    83  }
    84  
    85  // DescribeAcceleratorOfferingsWithContext is the same as DescribeAcceleratorOfferings with the addition of
    86  // the ability to pass a context and additional request options.
    87  //
    88  // See DescribeAcceleratorOfferings for details on how to use this API operation.
    89  //
    90  // The context must be non-nil and will be used for request cancellation. If
    91  // the context is nil a panic will occur. In the future the SDK may create
    92  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
    93  // for more information on using Contexts.
    94  func (c *ElasticInference) DescribeAcceleratorOfferingsWithContext(ctx aws.Context, input *DescribeAcceleratorOfferingsInput, opts ...request.Option) (*DescribeAcceleratorOfferingsOutput, error) {
    95  	req, out := c.DescribeAcceleratorOfferingsRequest(input)
    96  	req.SetContext(ctx)
    97  	req.ApplyOptions(opts...)
    98  	return out, req.Send()
    99  }
   100  
   101  const opDescribeAcceleratorTypes = "DescribeAcceleratorTypes"
   102  
   103  // DescribeAcceleratorTypesRequest generates a "aws/request.Request" representing the
   104  // client's request for the DescribeAcceleratorTypes operation. The "output" return
   105  // value will be populated with the request's response once the request completes
   106  // successfully.
   107  //
   108  // Use "Send" method on the returned Request to send the API call to the service.
   109  // the "output" return value is not valid until after Send returns without error.
   110  //
   111  // See DescribeAcceleratorTypes for more information on using the DescribeAcceleratorTypes
   112  // API call, and error handling.
   113  //
   114  // This method is useful when you want to inject custom logic or configuration
   115  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   116  //
   117  //
   118  //    // Example sending a request using the DescribeAcceleratorTypesRequest method.
   119  //    req, resp := client.DescribeAcceleratorTypesRequest(params)
   120  //
   121  //    err := req.Send()
   122  //    if err == nil { // resp is now filled
   123  //        fmt.Println(resp)
   124  //    }
   125  //
   126  // See also, https://docs.aws.amazon.com/goto/WebAPI/elastic-inference-2017-07-25/DescribeAcceleratorTypes
   127  func (c *ElasticInference) DescribeAcceleratorTypesRequest(input *DescribeAcceleratorTypesInput) (req *request.Request, output *DescribeAcceleratorTypesOutput) {
   128  	op := &request.Operation{
   129  		Name:       opDescribeAcceleratorTypes,
   130  		HTTPMethod: "GET",
   131  		HTTPPath:   "/describe-accelerator-types",
   132  	}
   133  
   134  	if input == nil {
   135  		input = &DescribeAcceleratorTypesInput{}
   136  	}
   137  
   138  	output = &DescribeAcceleratorTypesOutput{}
   139  	req = c.newRequest(op, input, output)
   140  	return
   141  }
   142  
   143  // DescribeAcceleratorTypes API operation for Amazon Elastic  Inference.
   144  //
   145  // Describes the accelerator types available in a given region, as well as their
   146  // characteristics, such as memory and throughput.
   147  //
   148  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   149  // with awserr.Error's Code and Message methods to get detailed information about
   150  // the error.
   151  //
   152  // See the AWS API reference guide for Amazon Elastic  Inference's
   153  // API operation DescribeAcceleratorTypes for usage and error information.
   154  //
   155  // Returned Error Types:
   156  //   * InternalServerException
   157  //   Raised when an unexpected error occurred during request processing.
   158  //
   159  // See also, https://docs.aws.amazon.com/goto/WebAPI/elastic-inference-2017-07-25/DescribeAcceleratorTypes
   160  func (c *ElasticInference) DescribeAcceleratorTypes(input *DescribeAcceleratorTypesInput) (*DescribeAcceleratorTypesOutput, error) {
   161  	req, out := c.DescribeAcceleratorTypesRequest(input)
   162  	return out, req.Send()
   163  }
   164  
   165  // DescribeAcceleratorTypesWithContext is the same as DescribeAcceleratorTypes with the addition of
   166  // the ability to pass a context and additional request options.
   167  //
   168  // See DescribeAcceleratorTypes for details on how to use this API operation.
   169  //
   170  // The context must be non-nil and will be used for request cancellation. If
   171  // the context is nil a panic will occur. In the future the SDK may create
   172  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   173  // for more information on using Contexts.
   174  func (c *ElasticInference) DescribeAcceleratorTypesWithContext(ctx aws.Context, input *DescribeAcceleratorTypesInput, opts ...request.Option) (*DescribeAcceleratorTypesOutput, error) {
   175  	req, out := c.DescribeAcceleratorTypesRequest(input)
   176  	req.SetContext(ctx)
   177  	req.ApplyOptions(opts...)
   178  	return out, req.Send()
   179  }
   180  
   181  const opDescribeAccelerators = "DescribeAccelerators"
   182  
   183  // DescribeAcceleratorsRequest generates a "aws/request.Request" representing the
   184  // client's request for the DescribeAccelerators operation. The "output" return
   185  // value will be populated with the request's response once the request completes
   186  // successfully.
   187  //
   188  // Use "Send" method on the returned Request to send the API call to the service.
   189  // the "output" return value is not valid until after Send returns without error.
   190  //
   191  // See DescribeAccelerators for more information on using the DescribeAccelerators
   192  // API call, and error handling.
   193  //
   194  // This method is useful when you want to inject custom logic or configuration
   195  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   196  //
   197  //
   198  //    // Example sending a request using the DescribeAcceleratorsRequest method.
   199  //    req, resp := client.DescribeAcceleratorsRequest(params)
   200  //
   201  //    err := req.Send()
   202  //    if err == nil { // resp is now filled
   203  //        fmt.Println(resp)
   204  //    }
   205  //
   206  // See also, https://docs.aws.amazon.com/goto/WebAPI/elastic-inference-2017-07-25/DescribeAccelerators
   207  func (c *ElasticInference) DescribeAcceleratorsRequest(input *DescribeAcceleratorsInput) (req *request.Request, output *DescribeAcceleratorsOutput) {
   208  	op := &request.Operation{
   209  		Name:       opDescribeAccelerators,
   210  		HTTPMethod: "POST",
   211  		HTTPPath:   "/describe-accelerators",
   212  		Paginator: &request.Paginator{
   213  			InputTokens:     []string{"nextToken"},
   214  			OutputTokens:    []string{"nextToken"},
   215  			LimitToken:      "maxResults",
   216  			TruncationToken: "",
   217  		},
   218  	}
   219  
   220  	if input == nil {
   221  		input = &DescribeAcceleratorsInput{}
   222  	}
   223  
   224  	output = &DescribeAcceleratorsOutput{}
   225  	req = c.newRequest(op, input, output)
   226  	return
   227  }
   228  
   229  // DescribeAccelerators API operation for Amazon Elastic  Inference.
   230  //
   231  // Describes information over a provided set of accelerators belonging to an
   232  // account.
   233  //
   234  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   235  // with awserr.Error's Code and Message methods to get detailed information about
   236  // the error.
   237  //
   238  // See the AWS API reference guide for Amazon Elastic  Inference's
   239  // API operation DescribeAccelerators for usage and error information.
   240  //
   241  // Returned Error Types:
   242  //   * BadRequestException
   243  //   Raised when a malformed input has been provided to the API.
   244  //
   245  //   * ResourceNotFoundException
   246  //   Raised when the requested resource cannot be found.
   247  //
   248  //   * InternalServerException
   249  //   Raised when an unexpected error occurred during request processing.
   250  //
   251  // See also, https://docs.aws.amazon.com/goto/WebAPI/elastic-inference-2017-07-25/DescribeAccelerators
   252  func (c *ElasticInference) DescribeAccelerators(input *DescribeAcceleratorsInput) (*DescribeAcceleratorsOutput, error) {
   253  	req, out := c.DescribeAcceleratorsRequest(input)
   254  	return out, req.Send()
   255  }
   256  
   257  // DescribeAcceleratorsWithContext is the same as DescribeAccelerators with the addition of
   258  // the ability to pass a context and additional request options.
   259  //
   260  // See DescribeAccelerators for details on how to use this API operation.
   261  //
   262  // The context must be non-nil and will be used for request cancellation. If
   263  // the context is nil a panic will occur. In the future the SDK may create
   264  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   265  // for more information on using Contexts.
   266  func (c *ElasticInference) DescribeAcceleratorsWithContext(ctx aws.Context, input *DescribeAcceleratorsInput, opts ...request.Option) (*DescribeAcceleratorsOutput, error) {
   267  	req, out := c.DescribeAcceleratorsRequest(input)
   268  	req.SetContext(ctx)
   269  	req.ApplyOptions(opts...)
   270  	return out, req.Send()
   271  }
   272  
   273  // DescribeAcceleratorsPages iterates over the pages of a DescribeAccelerators operation,
   274  // calling the "fn" function with the response data for each page. To stop
   275  // iterating, return false from the fn function.
   276  //
   277  // See DescribeAccelerators method for more information on how to use this operation.
   278  //
   279  // Note: This operation can generate multiple requests to a service.
   280  //
   281  //    // Example iterating over at most 3 pages of a DescribeAccelerators operation.
   282  //    pageNum := 0
   283  //    err := client.DescribeAcceleratorsPages(params,
   284  //        func(page *elasticinference.DescribeAcceleratorsOutput, lastPage bool) bool {
   285  //            pageNum++
   286  //            fmt.Println(page)
   287  //            return pageNum <= 3
   288  //        })
   289  //
   290  func (c *ElasticInference) DescribeAcceleratorsPages(input *DescribeAcceleratorsInput, fn func(*DescribeAcceleratorsOutput, bool) bool) error {
   291  	return c.DescribeAcceleratorsPagesWithContext(aws.BackgroundContext(), input, fn)
   292  }
   293  
   294  // DescribeAcceleratorsPagesWithContext same as DescribeAcceleratorsPages except
   295  // it takes a Context and allows setting request options on the pages.
   296  //
   297  // The context must be non-nil and will be used for request cancellation. If
   298  // the context is nil a panic will occur. In the future the SDK may create
   299  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   300  // for more information on using Contexts.
   301  func (c *ElasticInference) DescribeAcceleratorsPagesWithContext(ctx aws.Context, input *DescribeAcceleratorsInput, fn func(*DescribeAcceleratorsOutput, bool) bool, opts ...request.Option) error {
   302  	p := request.Pagination{
   303  		NewRequest: func() (*request.Request, error) {
   304  			var inCpy *DescribeAcceleratorsInput
   305  			if input != nil {
   306  				tmp := *input
   307  				inCpy = &tmp
   308  			}
   309  			req, _ := c.DescribeAcceleratorsRequest(inCpy)
   310  			req.SetContext(ctx)
   311  			req.ApplyOptions(opts...)
   312  			return req, nil
   313  		},
   314  	}
   315  
   316  	for p.Next() {
   317  		if !fn(p.Page().(*DescribeAcceleratorsOutput), !p.HasNextPage()) {
   318  			break
   319  		}
   320  	}
   321  
   322  	return p.Err()
   323  }
   324  
   325  const opListTagsForResource = "ListTagsForResource"
   326  
   327  // ListTagsForResourceRequest generates a "aws/request.Request" representing the
   328  // client's request for the ListTagsForResource operation. The "output" return
   329  // value will be populated with the request's response once the request completes
   330  // successfully.
   331  //
   332  // Use "Send" method on the returned Request to send the API call to the service.
   333  // the "output" return value is not valid until after Send returns without error.
   334  //
   335  // See ListTagsForResource for more information on using the ListTagsForResource
   336  // API call, and error handling.
   337  //
   338  // This method is useful when you want to inject custom logic or configuration
   339  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   340  //
   341  //
   342  //    // Example sending a request using the ListTagsForResourceRequest method.
   343  //    req, resp := client.ListTagsForResourceRequest(params)
   344  //
   345  //    err := req.Send()
   346  //    if err == nil { // resp is now filled
   347  //        fmt.Println(resp)
   348  //    }
   349  //
   350  // See also, https://docs.aws.amazon.com/goto/WebAPI/elastic-inference-2017-07-25/ListTagsForResource
   351  func (c *ElasticInference) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
   352  	op := &request.Operation{
   353  		Name:       opListTagsForResource,
   354  		HTTPMethod: "GET",
   355  		HTTPPath:   "/tags/{resourceArn}",
   356  	}
   357  
   358  	if input == nil {
   359  		input = &ListTagsForResourceInput{}
   360  	}
   361  
   362  	output = &ListTagsForResourceOutput{}
   363  	req = c.newRequest(op, input, output)
   364  	return
   365  }
   366  
   367  // ListTagsForResource API operation for Amazon Elastic  Inference.
   368  //
   369  // Returns all tags of an Elastic Inference Accelerator.
   370  //
   371  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   372  // with awserr.Error's Code and Message methods to get detailed information about
   373  // the error.
   374  //
   375  // See the AWS API reference guide for Amazon Elastic  Inference's
   376  // API operation ListTagsForResource for usage and error information.
   377  //
   378  // Returned Error Types:
   379  //   * BadRequestException
   380  //   Raised when a malformed input has been provided to the API.
   381  //
   382  //   * ResourceNotFoundException
   383  //   Raised when the requested resource cannot be found.
   384  //
   385  //   * InternalServerException
   386  //   Raised when an unexpected error occurred during request processing.
   387  //
   388  // See also, https://docs.aws.amazon.com/goto/WebAPI/elastic-inference-2017-07-25/ListTagsForResource
   389  func (c *ElasticInference) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
   390  	req, out := c.ListTagsForResourceRequest(input)
   391  	return out, req.Send()
   392  }
   393  
   394  // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
   395  // the ability to pass a context and additional request options.
   396  //
   397  // See ListTagsForResource for details on how to use this API operation.
   398  //
   399  // The context must be non-nil and will be used for request cancellation. If
   400  // the context is nil a panic will occur. In the future the SDK may create
   401  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   402  // for more information on using Contexts.
   403  func (c *ElasticInference) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
   404  	req, out := c.ListTagsForResourceRequest(input)
   405  	req.SetContext(ctx)
   406  	req.ApplyOptions(opts...)
   407  	return out, req.Send()
   408  }
   409  
   410  const opTagResource = "TagResource"
   411  
   412  // TagResourceRequest generates a "aws/request.Request" representing the
   413  // client's request for the TagResource operation. The "output" return
   414  // value will be populated with the request's response once the request completes
   415  // successfully.
   416  //
   417  // Use "Send" method on the returned Request to send the API call to the service.
   418  // the "output" return value is not valid until after Send returns without error.
   419  //
   420  // See TagResource for more information on using the TagResource
   421  // API call, and error handling.
   422  //
   423  // This method is useful when you want to inject custom logic or configuration
   424  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   425  //
   426  //
   427  //    // Example sending a request using the TagResourceRequest method.
   428  //    req, resp := client.TagResourceRequest(params)
   429  //
   430  //    err := req.Send()
   431  //    if err == nil { // resp is now filled
   432  //        fmt.Println(resp)
   433  //    }
   434  //
   435  // See also, https://docs.aws.amazon.com/goto/WebAPI/elastic-inference-2017-07-25/TagResource
   436  func (c *ElasticInference) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
   437  	op := &request.Operation{
   438  		Name:       opTagResource,
   439  		HTTPMethod: "POST",
   440  		HTTPPath:   "/tags/{resourceArn}",
   441  	}
   442  
   443  	if input == nil {
   444  		input = &TagResourceInput{}
   445  	}
   446  
   447  	output = &TagResourceOutput{}
   448  	req = c.newRequest(op, input, output)
   449  	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   450  	return
   451  }
   452  
   453  // TagResource API operation for Amazon Elastic  Inference.
   454  //
   455  // Adds the specified tags to an Elastic Inference Accelerator.
   456  //
   457  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   458  // with awserr.Error's Code and Message methods to get detailed information about
   459  // the error.
   460  //
   461  // See the AWS API reference guide for Amazon Elastic  Inference's
   462  // API operation TagResource for usage and error information.
   463  //
   464  // Returned Error Types:
   465  //   * BadRequestException
   466  //   Raised when a malformed input has been provided to the API.
   467  //
   468  //   * ResourceNotFoundException
   469  //   Raised when the requested resource cannot be found.
   470  //
   471  //   * InternalServerException
   472  //   Raised when an unexpected error occurred during request processing.
   473  //
   474  // See also, https://docs.aws.amazon.com/goto/WebAPI/elastic-inference-2017-07-25/TagResource
   475  func (c *ElasticInference) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
   476  	req, out := c.TagResourceRequest(input)
   477  	return out, req.Send()
   478  }
   479  
   480  // TagResourceWithContext is the same as TagResource with the addition of
   481  // the ability to pass a context and additional request options.
   482  //
   483  // See TagResource for details on how to use this API operation.
   484  //
   485  // The context must be non-nil and will be used for request cancellation. If
   486  // the context is nil a panic will occur. In the future the SDK may create
   487  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   488  // for more information on using Contexts.
   489  func (c *ElasticInference) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
   490  	req, out := c.TagResourceRequest(input)
   491  	req.SetContext(ctx)
   492  	req.ApplyOptions(opts...)
   493  	return out, req.Send()
   494  }
   495  
   496  const opUntagResource = "UntagResource"
   497  
   498  // UntagResourceRequest generates a "aws/request.Request" representing the
   499  // client's request for the UntagResource operation. The "output" return
   500  // value will be populated with the request's response once the request completes
   501  // successfully.
   502  //
   503  // Use "Send" method on the returned Request to send the API call to the service.
   504  // the "output" return value is not valid until after Send returns without error.
   505  //
   506  // See UntagResource for more information on using the UntagResource
   507  // API call, and error handling.
   508  //
   509  // This method is useful when you want to inject custom logic or configuration
   510  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   511  //
   512  //
   513  //    // Example sending a request using the UntagResourceRequest method.
   514  //    req, resp := client.UntagResourceRequest(params)
   515  //
   516  //    err := req.Send()
   517  //    if err == nil { // resp is now filled
   518  //        fmt.Println(resp)
   519  //    }
   520  //
   521  // See also, https://docs.aws.amazon.com/goto/WebAPI/elastic-inference-2017-07-25/UntagResource
   522  func (c *ElasticInference) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
   523  	op := &request.Operation{
   524  		Name:       opUntagResource,
   525  		HTTPMethod: "DELETE",
   526  		HTTPPath:   "/tags/{resourceArn}",
   527  	}
   528  
   529  	if input == nil {
   530  		input = &UntagResourceInput{}
   531  	}
   532  
   533  	output = &UntagResourceOutput{}
   534  	req = c.newRequest(op, input, output)
   535  	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   536  	return
   537  }
   538  
   539  // UntagResource API operation for Amazon Elastic  Inference.
   540  //
   541  // Removes the specified tags from an Elastic Inference Accelerator.
   542  //
   543  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   544  // with awserr.Error's Code and Message methods to get detailed information about
   545  // the error.
   546  //
   547  // See the AWS API reference guide for Amazon Elastic  Inference's
   548  // API operation UntagResource for usage and error information.
   549  //
   550  // Returned Error Types:
   551  //   * BadRequestException
   552  //   Raised when a malformed input has been provided to the API.
   553  //
   554  //   * ResourceNotFoundException
   555  //   Raised when the requested resource cannot be found.
   556  //
   557  //   * InternalServerException
   558  //   Raised when an unexpected error occurred during request processing.
   559  //
   560  // See also, https://docs.aws.amazon.com/goto/WebAPI/elastic-inference-2017-07-25/UntagResource
   561  func (c *ElasticInference) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
   562  	req, out := c.UntagResourceRequest(input)
   563  	return out, req.Send()
   564  }
   565  
   566  // UntagResourceWithContext is the same as UntagResource with the addition of
   567  // the ability to pass a context and additional request options.
   568  //
   569  // See UntagResource for details on how to use this API operation.
   570  //
   571  // The context must be non-nil and will be used for request cancellation. If
   572  // the context is nil a panic will occur. In the future the SDK may create
   573  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   574  // for more information on using Contexts.
   575  func (c *ElasticInference) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
   576  	req, out := c.UntagResourceRequest(input)
   577  	req.SetContext(ctx)
   578  	req.ApplyOptions(opts...)
   579  	return out, req.Send()
   580  }
   581  
   582  // The details of an Elastic Inference Accelerator type.
   583  type AcceleratorType struct {
   584  	_ struct{} `type:"structure"`
   585  
   586  	// The name of the Elastic Inference Accelerator type.
   587  	AcceleratorTypeName *string `locationName:"acceleratorTypeName" min:"1" type:"string"`
   588  
   589  	// The memory information of the Elastic Inference Accelerator type.
   590  	MemoryInfo *MemoryInfo `locationName:"memoryInfo" type:"structure"`
   591  
   592  	// The throughput information of the Elastic Inference Accelerator type.
   593  	ThroughputInfo []*KeyValuePair `locationName:"throughputInfo" type:"list"`
   594  }
   595  
   596  // String returns the string representation.
   597  //
   598  // API parameter values that are decorated as "sensitive" in the API will not
   599  // be included in the string output. The member name will be present, but the
   600  // value will be replaced with "sensitive".
   601  func (s AcceleratorType) String() string {
   602  	return awsutil.Prettify(s)
   603  }
   604  
   605  // GoString returns the string representation.
   606  //
   607  // API parameter values that are decorated as "sensitive" in the API will not
   608  // be included in the string output. The member name will be present, but the
   609  // value will be replaced with "sensitive".
   610  func (s AcceleratorType) GoString() string {
   611  	return s.String()
   612  }
   613  
   614  // SetAcceleratorTypeName sets the AcceleratorTypeName field's value.
   615  func (s *AcceleratorType) SetAcceleratorTypeName(v string) *AcceleratorType {
   616  	s.AcceleratorTypeName = &v
   617  	return s
   618  }
   619  
   620  // SetMemoryInfo sets the MemoryInfo field's value.
   621  func (s *AcceleratorType) SetMemoryInfo(v *MemoryInfo) *AcceleratorType {
   622  	s.MemoryInfo = v
   623  	return s
   624  }
   625  
   626  // SetThroughputInfo sets the ThroughputInfo field's value.
   627  func (s *AcceleratorType) SetThroughputInfo(v []*KeyValuePair) *AcceleratorType {
   628  	s.ThroughputInfo = v
   629  	return s
   630  }
   631  
   632  // The offering for an Elastic Inference Accelerator type.
   633  type AcceleratorTypeOffering struct {
   634  	_ struct{} `type:"structure"`
   635  
   636  	// The name of the Elastic Inference Accelerator type.
   637  	AcceleratorType *string `locationName:"acceleratorType" min:"1" type:"string"`
   638  
   639  	// The location for the offering. It will return either the region, availability
   640  	// zone or availability zone id for the offering depending on the locationType
   641  	// value.
   642  	Location *string `locationName:"location" min:"1" type:"string"`
   643  
   644  	// The location type for the offering. It can assume the following values: region:
   645  	// defines that the offering is at the regional level. availability-zone: defines
   646  	// that the offering is at the availability zone level. availability-zone-id:
   647  	// defines that the offering is at the availability zone level, defined by the
   648  	// availability zone id.
   649  	LocationType *string `locationName:"locationType" min:"1" type:"string" enum:"LocationType"`
   650  }
   651  
   652  // String returns the string representation.
   653  //
   654  // API parameter values that are decorated as "sensitive" in the API will not
   655  // be included in the string output. The member name will be present, but the
   656  // value will be replaced with "sensitive".
   657  func (s AcceleratorTypeOffering) String() string {
   658  	return awsutil.Prettify(s)
   659  }
   660  
   661  // GoString returns the string representation.
   662  //
   663  // API parameter values that are decorated as "sensitive" in the API will not
   664  // be included in the string output. The member name will be present, but the
   665  // value will be replaced with "sensitive".
   666  func (s AcceleratorTypeOffering) GoString() string {
   667  	return s.String()
   668  }
   669  
   670  // SetAcceleratorType sets the AcceleratorType field's value.
   671  func (s *AcceleratorTypeOffering) SetAcceleratorType(v string) *AcceleratorTypeOffering {
   672  	s.AcceleratorType = &v
   673  	return s
   674  }
   675  
   676  // SetLocation sets the Location field's value.
   677  func (s *AcceleratorTypeOffering) SetLocation(v string) *AcceleratorTypeOffering {
   678  	s.Location = &v
   679  	return s
   680  }
   681  
   682  // SetLocationType sets the LocationType field's value.
   683  func (s *AcceleratorTypeOffering) SetLocationType(v string) *AcceleratorTypeOffering {
   684  	s.LocationType = &v
   685  	return s
   686  }
   687  
   688  // Raised when a malformed input has been provided to the API.
   689  type BadRequestException struct {
   690  	_            struct{}                  `type:"structure"`
   691  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
   692  
   693  	Message_ *string `locationName:"message" type:"string"`
   694  }
   695  
   696  // String returns the string representation.
   697  //
   698  // API parameter values that are decorated as "sensitive" in the API will not
   699  // be included in the string output. The member name will be present, but the
   700  // value will be replaced with "sensitive".
   701  func (s BadRequestException) String() string {
   702  	return awsutil.Prettify(s)
   703  }
   704  
   705  // GoString returns the string representation.
   706  //
   707  // API parameter values that are decorated as "sensitive" in the API will not
   708  // be included in the string output. The member name will be present, but the
   709  // value will be replaced with "sensitive".
   710  func (s BadRequestException) GoString() string {
   711  	return s.String()
   712  }
   713  
   714  func newErrorBadRequestException(v protocol.ResponseMetadata) error {
   715  	return &BadRequestException{
   716  		RespMetadata: v,
   717  	}
   718  }
   719  
   720  // Code returns the exception type name.
   721  func (s *BadRequestException) Code() string {
   722  	return "BadRequestException"
   723  }
   724  
   725  // Message returns the exception's message.
   726  func (s *BadRequestException) Message() string {
   727  	if s.Message_ != nil {
   728  		return *s.Message_
   729  	}
   730  	return ""
   731  }
   732  
   733  // OrigErr always returns nil, satisfies awserr.Error interface.
   734  func (s *BadRequestException) OrigErr() error {
   735  	return nil
   736  }
   737  
   738  func (s *BadRequestException) Error() string {
   739  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
   740  }
   741  
   742  // Status code returns the HTTP status code for the request's response error.
   743  func (s *BadRequestException) StatusCode() int {
   744  	return s.RespMetadata.StatusCode
   745  }
   746  
   747  // RequestID returns the service's response RequestID for request.
   748  func (s *BadRequestException) RequestID() string {
   749  	return s.RespMetadata.RequestID
   750  }
   751  
   752  type DescribeAcceleratorOfferingsInput struct {
   753  	_ struct{} `type:"structure"`
   754  
   755  	// The list of accelerator types to describe.
   756  	AcceleratorTypes []*string `locationName:"acceleratorTypes" type:"list"`
   757  
   758  	// The location type that you want to describe accelerator type offerings for.
   759  	// It can assume the following values: region: will return the accelerator type
   760  	// offering at the regional level. availability-zone: will return the accelerator
   761  	// type offering at the availability zone level. availability-zone-id: will
   762  	// return the accelerator type offering at the availability zone level returning
   763  	// the availability zone id.
   764  	//
   765  	// LocationType is a required field
   766  	LocationType *string `locationName:"locationType" min:"1" type:"string" required:"true" enum:"LocationType"`
   767  }
   768  
   769  // String returns the string representation.
   770  //
   771  // API parameter values that are decorated as "sensitive" in the API will not
   772  // be included in the string output. The member name will be present, but the
   773  // value will be replaced with "sensitive".
   774  func (s DescribeAcceleratorOfferingsInput) String() string {
   775  	return awsutil.Prettify(s)
   776  }
   777  
   778  // GoString returns the string representation.
   779  //
   780  // API parameter values that are decorated as "sensitive" in the API will not
   781  // be included in the string output. The member name will be present, but the
   782  // value will be replaced with "sensitive".
   783  func (s DescribeAcceleratorOfferingsInput) GoString() string {
   784  	return s.String()
   785  }
   786  
   787  // Validate inspects the fields of the type to determine if they are valid.
   788  func (s *DescribeAcceleratorOfferingsInput) Validate() error {
   789  	invalidParams := request.ErrInvalidParams{Context: "DescribeAcceleratorOfferingsInput"}
   790  	if s.LocationType == nil {
   791  		invalidParams.Add(request.NewErrParamRequired("LocationType"))
   792  	}
   793  	if s.LocationType != nil && len(*s.LocationType) < 1 {
   794  		invalidParams.Add(request.NewErrParamMinLen("LocationType", 1))
   795  	}
   796  
   797  	if invalidParams.Len() > 0 {
   798  		return invalidParams
   799  	}
   800  	return nil
   801  }
   802  
   803  // SetAcceleratorTypes sets the AcceleratorTypes field's value.
   804  func (s *DescribeAcceleratorOfferingsInput) SetAcceleratorTypes(v []*string) *DescribeAcceleratorOfferingsInput {
   805  	s.AcceleratorTypes = v
   806  	return s
   807  }
   808  
   809  // SetLocationType sets the LocationType field's value.
   810  func (s *DescribeAcceleratorOfferingsInput) SetLocationType(v string) *DescribeAcceleratorOfferingsInput {
   811  	s.LocationType = &v
   812  	return s
   813  }
   814  
   815  type DescribeAcceleratorOfferingsOutput struct {
   816  	_ struct{} `type:"structure"`
   817  
   818  	// The list of accelerator type offerings for a specific location.
   819  	AcceleratorTypeOfferings []*AcceleratorTypeOffering `locationName:"acceleratorTypeOfferings" type:"list"`
   820  }
   821  
   822  // String returns the string representation.
   823  //
   824  // API parameter values that are decorated as "sensitive" in the API will not
   825  // be included in the string output. The member name will be present, but the
   826  // value will be replaced with "sensitive".
   827  func (s DescribeAcceleratorOfferingsOutput) String() string {
   828  	return awsutil.Prettify(s)
   829  }
   830  
   831  // GoString returns the string representation.
   832  //
   833  // API parameter values that are decorated as "sensitive" in the API will not
   834  // be included in the string output. The member name will be present, but the
   835  // value will be replaced with "sensitive".
   836  func (s DescribeAcceleratorOfferingsOutput) GoString() string {
   837  	return s.String()
   838  }
   839  
   840  // SetAcceleratorTypeOfferings sets the AcceleratorTypeOfferings field's value.
   841  func (s *DescribeAcceleratorOfferingsOutput) SetAcceleratorTypeOfferings(v []*AcceleratorTypeOffering) *DescribeAcceleratorOfferingsOutput {
   842  	s.AcceleratorTypeOfferings = v
   843  	return s
   844  }
   845  
   846  type DescribeAcceleratorTypesInput struct {
   847  	_ struct{} `type:"structure" nopayload:"true"`
   848  }
   849  
   850  // String returns the string representation.
   851  //
   852  // API parameter values that are decorated as "sensitive" in the API will not
   853  // be included in the string output. The member name will be present, but the
   854  // value will be replaced with "sensitive".
   855  func (s DescribeAcceleratorTypesInput) String() string {
   856  	return awsutil.Prettify(s)
   857  }
   858  
   859  // GoString returns the string representation.
   860  //
   861  // API parameter values that are decorated as "sensitive" in the API will not
   862  // be included in the string output. The member name will be present, but the
   863  // value will be replaced with "sensitive".
   864  func (s DescribeAcceleratorTypesInput) GoString() string {
   865  	return s.String()
   866  }
   867  
   868  type DescribeAcceleratorTypesOutput struct {
   869  	_ struct{} `type:"structure"`
   870  
   871  	// The available accelerator types.
   872  	AcceleratorTypes []*AcceleratorType `locationName:"acceleratorTypes" type:"list"`
   873  }
   874  
   875  // String returns the string representation.
   876  //
   877  // API parameter values that are decorated as "sensitive" in the API will not
   878  // be included in the string output. The member name will be present, but the
   879  // value will be replaced with "sensitive".
   880  func (s DescribeAcceleratorTypesOutput) String() string {
   881  	return awsutil.Prettify(s)
   882  }
   883  
   884  // GoString returns the string representation.
   885  //
   886  // API parameter values that are decorated as "sensitive" in the API will not
   887  // be included in the string output. The member name will be present, but the
   888  // value will be replaced with "sensitive".
   889  func (s DescribeAcceleratorTypesOutput) GoString() string {
   890  	return s.String()
   891  }
   892  
   893  // SetAcceleratorTypes sets the AcceleratorTypes field's value.
   894  func (s *DescribeAcceleratorTypesOutput) SetAcceleratorTypes(v []*AcceleratorType) *DescribeAcceleratorTypesOutput {
   895  	s.AcceleratorTypes = v
   896  	return s
   897  }
   898  
   899  type DescribeAcceleratorsInput struct {
   900  	_ struct{} `type:"structure"`
   901  
   902  	// The IDs of the accelerators to describe.
   903  	AcceleratorIds []*string `locationName:"acceleratorIds" type:"list"`
   904  
   905  	// One or more filters. Filter names and values are case-sensitive. Valid filter
   906  	// names are: accelerator-types: can provide a list of accelerator type names
   907  	// to filter for. instance-id: can provide a list of EC2 instance ids to filter
   908  	// for.
   909  	Filters []*Filter `locationName:"filters" type:"list"`
   910  
   911  	// The total number of items to return in the command's output. If the total
   912  	// number of items available is more than the value specified, a NextToken is
   913  	// provided in the command's output. To resume pagination, provide the NextToken
   914  	// value in the starting-token argument of a subsequent command. Do not use
   915  	// the NextToken response element directly outside of the AWS CLI.
   916  	MaxResults *int64 `locationName:"maxResults" type:"integer"`
   917  
   918  	// A token to specify where to start paginating. This is the NextToken from
   919  	// a previously truncated response.
   920  	NextToken *string `locationName:"nextToken" min:"1" type:"string"`
   921  }
   922  
   923  // String returns the string representation.
   924  //
   925  // API parameter values that are decorated as "sensitive" in the API will not
   926  // be included in the string output. The member name will be present, but the
   927  // value will be replaced with "sensitive".
   928  func (s DescribeAcceleratorsInput) String() string {
   929  	return awsutil.Prettify(s)
   930  }
   931  
   932  // GoString returns the string representation.
   933  //
   934  // API parameter values that are decorated as "sensitive" in the API will not
   935  // be included in the string output. The member name will be present, but the
   936  // value will be replaced with "sensitive".
   937  func (s DescribeAcceleratorsInput) GoString() string {
   938  	return s.String()
   939  }
   940  
   941  // Validate inspects the fields of the type to determine if they are valid.
   942  func (s *DescribeAcceleratorsInput) Validate() error {
   943  	invalidParams := request.ErrInvalidParams{Context: "DescribeAcceleratorsInput"}
   944  	if s.NextToken != nil && len(*s.NextToken) < 1 {
   945  		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
   946  	}
   947  	if s.Filters != nil {
   948  		for i, v := range s.Filters {
   949  			if v == nil {
   950  				continue
   951  			}
   952  			if err := v.Validate(); err != nil {
   953  				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams))
   954  			}
   955  		}
   956  	}
   957  
   958  	if invalidParams.Len() > 0 {
   959  		return invalidParams
   960  	}
   961  	return nil
   962  }
   963  
   964  // SetAcceleratorIds sets the AcceleratorIds field's value.
   965  func (s *DescribeAcceleratorsInput) SetAcceleratorIds(v []*string) *DescribeAcceleratorsInput {
   966  	s.AcceleratorIds = v
   967  	return s
   968  }
   969  
   970  // SetFilters sets the Filters field's value.
   971  func (s *DescribeAcceleratorsInput) SetFilters(v []*Filter) *DescribeAcceleratorsInput {
   972  	s.Filters = v
   973  	return s
   974  }
   975  
   976  // SetMaxResults sets the MaxResults field's value.
   977  func (s *DescribeAcceleratorsInput) SetMaxResults(v int64) *DescribeAcceleratorsInput {
   978  	s.MaxResults = &v
   979  	return s
   980  }
   981  
   982  // SetNextToken sets the NextToken field's value.
   983  func (s *DescribeAcceleratorsInput) SetNextToken(v string) *DescribeAcceleratorsInput {
   984  	s.NextToken = &v
   985  	return s
   986  }
   987  
   988  type DescribeAcceleratorsOutput struct {
   989  	_ struct{} `type:"structure"`
   990  
   991  	// The details of the Elastic Inference Accelerators.
   992  	AcceleratorSet []*ElasticInferenceAccelerator `locationName:"acceleratorSet" type:"list"`
   993  
   994  	// A token to specify where to start paginating. This is the NextToken from
   995  	// a previously truncated response.
   996  	NextToken *string `locationName:"nextToken" min:"1" type:"string"`
   997  }
   998  
   999  // String returns the string representation.
  1000  //
  1001  // API parameter values that are decorated as "sensitive" in the API will not
  1002  // be included in the string output. The member name will be present, but the
  1003  // value will be replaced with "sensitive".
  1004  func (s DescribeAcceleratorsOutput) String() string {
  1005  	return awsutil.Prettify(s)
  1006  }
  1007  
  1008  // GoString returns the string representation.
  1009  //
  1010  // API parameter values that are decorated as "sensitive" in the API will not
  1011  // be included in the string output. The member name will be present, but the
  1012  // value will be replaced with "sensitive".
  1013  func (s DescribeAcceleratorsOutput) GoString() string {
  1014  	return s.String()
  1015  }
  1016  
  1017  // SetAcceleratorSet sets the AcceleratorSet field's value.
  1018  func (s *DescribeAcceleratorsOutput) SetAcceleratorSet(v []*ElasticInferenceAccelerator) *DescribeAcceleratorsOutput {
  1019  	s.AcceleratorSet = v
  1020  	return s
  1021  }
  1022  
  1023  // SetNextToken sets the NextToken field's value.
  1024  func (s *DescribeAcceleratorsOutput) SetNextToken(v string) *DescribeAcceleratorsOutput {
  1025  	s.NextToken = &v
  1026  	return s
  1027  }
  1028  
  1029  // The details of an Elastic Inference Accelerator.
  1030  type ElasticInferenceAccelerator struct {
  1031  	_ struct{} `type:"structure"`
  1032  
  1033  	// The health of the Elastic Inference Accelerator.
  1034  	AcceleratorHealth *ElasticInferenceAcceleratorHealth `locationName:"acceleratorHealth" type:"structure"`
  1035  
  1036  	// The ID of the Elastic Inference Accelerator.
  1037  	AcceleratorId *string `locationName:"acceleratorId" min:"1" type:"string"`
  1038  
  1039  	// The type of the Elastic Inference Accelerator.
  1040  	AcceleratorType *string `locationName:"acceleratorType" min:"1" type:"string"`
  1041  
  1042  	// The ARN of the resource that the Elastic Inference Accelerator is attached
  1043  	// to.
  1044  	AttachedResource *string `locationName:"attachedResource" min:"1" type:"string"`
  1045  
  1046  	// The availability zone where the Elastic Inference Accelerator is present.
  1047  	AvailabilityZone *string `locationName:"availabilityZone" min:"1" type:"string"`
  1048  }
  1049  
  1050  // String returns the string representation.
  1051  //
  1052  // API parameter values that are decorated as "sensitive" in the API will not
  1053  // be included in the string output. The member name will be present, but the
  1054  // value will be replaced with "sensitive".
  1055  func (s ElasticInferenceAccelerator) String() string {
  1056  	return awsutil.Prettify(s)
  1057  }
  1058  
  1059  // GoString returns the string representation.
  1060  //
  1061  // API parameter values that are decorated as "sensitive" in the API will not
  1062  // be included in the string output. The member name will be present, but the
  1063  // value will be replaced with "sensitive".
  1064  func (s ElasticInferenceAccelerator) GoString() string {
  1065  	return s.String()
  1066  }
  1067  
  1068  // SetAcceleratorHealth sets the AcceleratorHealth field's value.
  1069  func (s *ElasticInferenceAccelerator) SetAcceleratorHealth(v *ElasticInferenceAcceleratorHealth) *ElasticInferenceAccelerator {
  1070  	s.AcceleratorHealth = v
  1071  	return s
  1072  }
  1073  
  1074  // SetAcceleratorId sets the AcceleratorId field's value.
  1075  func (s *ElasticInferenceAccelerator) SetAcceleratorId(v string) *ElasticInferenceAccelerator {
  1076  	s.AcceleratorId = &v
  1077  	return s
  1078  }
  1079  
  1080  // SetAcceleratorType sets the AcceleratorType field's value.
  1081  func (s *ElasticInferenceAccelerator) SetAcceleratorType(v string) *ElasticInferenceAccelerator {
  1082  	s.AcceleratorType = &v
  1083  	return s
  1084  }
  1085  
  1086  // SetAttachedResource sets the AttachedResource field's value.
  1087  func (s *ElasticInferenceAccelerator) SetAttachedResource(v string) *ElasticInferenceAccelerator {
  1088  	s.AttachedResource = &v
  1089  	return s
  1090  }
  1091  
  1092  // SetAvailabilityZone sets the AvailabilityZone field's value.
  1093  func (s *ElasticInferenceAccelerator) SetAvailabilityZone(v string) *ElasticInferenceAccelerator {
  1094  	s.AvailabilityZone = &v
  1095  	return s
  1096  }
  1097  
  1098  // The health details of an Elastic Inference Accelerator.
  1099  type ElasticInferenceAcceleratorHealth struct {
  1100  	_ struct{} `type:"structure"`
  1101  
  1102  	// The health status of the Elastic Inference Accelerator.
  1103  	Status *string `locationName:"status" min:"1" type:"string"`
  1104  }
  1105  
  1106  // String returns the string representation.
  1107  //
  1108  // API parameter values that are decorated as "sensitive" in the API will not
  1109  // be included in the string output. The member name will be present, but the
  1110  // value will be replaced with "sensitive".
  1111  func (s ElasticInferenceAcceleratorHealth) String() string {
  1112  	return awsutil.Prettify(s)
  1113  }
  1114  
  1115  // GoString returns the string representation.
  1116  //
  1117  // API parameter values that are decorated as "sensitive" in the API will not
  1118  // be included in the string output. The member name will be present, but the
  1119  // value will be replaced with "sensitive".
  1120  func (s ElasticInferenceAcceleratorHealth) GoString() string {
  1121  	return s.String()
  1122  }
  1123  
  1124  // SetStatus sets the Status field's value.
  1125  func (s *ElasticInferenceAcceleratorHealth) SetStatus(v string) *ElasticInferenceAcceleratorHealth {
  1126  	s.Status = &v
  1127  	return s
  1128  }
  1129  
  1130  // A filter expression for the Elastic Inference Accelerator list.
  1131  type Filter struct {
  1132  	_ struct{} `type:"structure"`
  1133  
  1134  	// The filter name for the Elastic Inference Accelerator list. It can assume
  1135  	// the following values: accelerator-type: the type of Elastic Inference Accelerator
  1136  	// to filter for. instance-id: an EC2 instance id to filter for.
  1137  	Name *string `locationName:"name" min:"1" type:"string"`
  1138  
  1139  	// The values for the filter of the Elastic Inference Accelerator list.
  1140  	Values []*string `locationName:"values" type:"list"`
  1141  }
  1142  
  1143  // String returns the string representation.
  1144  //
  1145  // API parameter values that are decorated as "sensitive" in the API will not
  1146  // be included in the string output. The member name will be present, but the
  1147  // value will be replaced with "sensitive".
  1148  func (s Filter) String() string {
  1149  	return awsutil.Prettify(s)
  1150  }
  1151  
  1152  // GoString returns the string representation.
  1153  //
  1154  // API parameter values that are decorated as "sensitive" in the API will not
  1155  // be included in the string output. The member name will be present, but the
  1156  // value will be replaced with "sensitive".
  1157  func (s Filter) GoString() string {
  1158  	return s.String()
  1159  }
  1160  
  1161  // Validate inspects the fields of the type to determine if they are valid.
  1162  func (s *Filter) Validate() error {
  1163  	invalidParams := request.ErrInvalidParams{Context: "Filter"}
  1164  	if s.Name != nil && len(*s.Name) < 1 {
  1165  		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  1166  	}
  1167  
  1168  	if invalidParams.Len() > 0 {
  1169  		return invalidParams
  1170  	}
  1171  	return nil
  1172  }
  1173  
  1174  // SetName sets the Name field's value.
  1175  func (s *Filter) SetName(v string) *Filter {
  1176  	s.Name = &v
  1177  	return s
  1178  }
  1179  
  1180  // SetValues sets the Values field's value.
  1181  func (s *Filter) SetValues(v []*string) *Filter {
  1182  	s.Values = v
  1183  	return s
  1184  }
  1185  
  1186  // Raised when an unexpected error occurred during request processing.
  1187  type InternalServerException struct {
  1188  	_            struct{}                  `type:"structure"`
  1189  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1190  
  1191  	Message_ *string `locationName:"message" type:"string"`
  1192  }
  1193  
  1194  // String returns the string representation.
  1195  //
  1196  // API parameter values that are decorated as "sensitive" in the API will not
  1197  // be included in the string output. The member name will be present, but the
  1198  // value will be replaced with "sensitive".
  1199  func (s InternalServerException) String() string {
  1200  	return awsutil.Prettify(s)
  1201  }
  1202  
  1203  // GoString returns the string representation.
  1204  //
  1205  // API parameter values that are decorated as "sensitive" in the API will not
  1206  // be included in the string output. The member name will be present, but the
  1207  // value will be replaced with "sensitive".
  1208  func (s InternalServerException) GoString() string {
  1209  	return s.String()
  1210  }
  1211  
  1212  func newErrorInternalServerException(v protocol.ResponseMetadata) error {
  1213  	return &InternalServerException{
  1214  		RespMetadata: v,
  1215  	}
  1216  }
  1217  
  1218  // Code returns the exception type name.
  1219  func (s *InternalServerException) Code() string {
  1220  	return "InternalServerException"
  1221  }
  1222  
  1223  // Message returns the exception's message.
  1224  func (s *InternalServerException) Message() string {
  1225  	if s.Message_ != nil {
  1226  		return *s.Message_
  1227  	}
  1228  	return ""
  1229  }
  1230  
  1231  // OrigErr always returns nil, satisfies awserr.Error interface.
  1232  func (s *InternalServerException) OrigErr() error {
  1233  	return nil
  1234  }
  1235  
  1236  func (s *InternalServerException) Error() string {
  1237  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1238  }
  1239  
  1240  // Status code returns the HTTP status code for the request's response error.
  1241  func (s *InternalServerException) StatusCode() int {
  1242  	return s.RespMetadata.StatusCode
  1243  }
  1244  
  1245  // RequestID returns the service's response RequestID for request.
  1246  func (s *InternalServerException) RequestID() string {
  1247  	return s.RespMetadata.RequestID
  1248  }
  1249  
  1250  // A throughput entry for an Elastic Inference Accelerator type.
  1251  type KeyValuePair struct {
  1252  	_ struct{} `type:"structure"`
  1253  
  1254  	// The throughput value of the Elastic Inference Accelerator type. It can assume
  1255  	// the following values: TFLOPS16bit: the throughput expressed in 16bit TeraFLOPS.
  1256  	// TFLOPS32bit: the throughput expressed in 32bit TeraFLOPS.
  1257  	Key *string `locationName:"key" min:"1" type:"string"`
  1258  
  1259  	// The throughput value of the Elastic Inference Accelerator type.
  1260  	Value *int64 `locationName:"value" type:"integer"`
  1261  }
  1262  
  1263  // String returns the string representation.
  1264  //
  1265  // API parameter values that are decorated as "sensitive" in the API will not
  1266  // be included in the string output. The member name will be present, but the
  1267  // value will be replaced with "sensitive".
  1268  func (s KeyValuePair) String() string {
  1269  	return awsutil.Prettify(s)
  1270  }
  1271  
  1272  // GoString returns the string representation.
  1273  //
  1274  // API parameter values that are decorated as "sensitive" in the API will not
  1275  // be included in the string output. The member name will be present, but the
  1276  // value will be replaced with "sensitive".
  1277  func (s KeyValuePair) GoString() string {
  1278  	return s.String()
  1279  }
  1280  
  1281  // SetKey sets the Key field's value.
  1282  func (s *KeyValuePair) SetKey(v string) *KeyValuePair {
  1283  	s.Key = &v
  1284  	return s
  1285  }
  1286  
  1287  // SetValue sets the Value field's value.
  1288  func (s *KeyValuePair) SetValue(v int64) *KeyValuePair {
  1289  	s.Value = &v
  1290  	return s
  1291  }
  1292  
  1293  type ListTagsForResourceInput struct {
  1294  	_ struct{} `type:"structure" nopayload:"true"`
  1295  
  1296  	// The ARN of the Elastic Inference Accelerator to list the tags for.
  1297  	//
  1298  	// ResourceArn is a required field
  1299  	ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"`
  1300  }
  1301  
  1302  // String returns the string representation.
  1303  //
  1304  // API parameter values that are decorated as "sensitive" in the API will not
  1305  // be included in the string output. The member name will be present, but the
  1306  // value will be replaced with "sensitive".
  1307  func (s ListTagsForResourceInput) String() string {
  1308  	return awsutil.Prettify(s)
  1309  }
  1310  
  1311  // GoString returns the string representation.
  1312  //
  1313  // API parameter values that are decorated as "sensitive" in the API will not
  1314  // be included in the string output. The member name will be present, but the
  1315  // value will be replaced with "sensitive".
  1316  func (s ListTagsForResourceInput) GoString() string {
  1317  	return s.String()
  1318  }
  1319  
  1320  // Validate inspects the fields of the type to determine if they are valid.
  1321  func (s *ListTagsForResourceInput) Validate() error {
  1322  	invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
  1323  	if s.ResourceArn == nil {
  1324  		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  1325  	}
  1326  	if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  1327  		invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  1328  	}
  1329  
  1330  	if invalidParams.Len() > 0 {
  1331  		return invalidParams
  1332  	}
  1333  	return nil
  1334  }
  1335  
  1336  // SetResourceArn sets the ResourceArn field's value.
  1337  func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput {
  1338  	s.ResourceArn = &v
  1339  	return s
  1340  }
  1341  
  1342  type ListTagsForResourceOutput struct {
  1343  	_ struct{} `type:"structure"`
  1344  
  1345  	// The tags of the Elastic Inference Accelerator.
  1346  	Tags map[string]*string `locationName:"tags" min:"1" type:"map"`
  1347  }
  1348  
  1349  // String returns the string representation.
  1350  //
  1351  // API parameter values that are decorated as "sensitive" in the API will not
  1352  // be included in the string output. The member name will be present, but the
  1353  // value will be replaced with "sensitive".
  1354  func (s ListTagsForResourceOutput) String() string {
  1355  	return awsutil.Prettify(s)
  1356  }
  1357  
  1358  // GoString returns the string representation.
  1359  //
  1360  // API parameter values that are decorated as "sensitive" in the API will not
  1361  // be included in the string output. The member name will be present, but the
  1362  // value will be replaced with "sensitive".
  1363  func (s ListTagsForResourceOutput) GoString() string {
  1364  	return s.String()
  1365  }
  1366  
  1367  // SetTags sets the Tags field's value.
  1368  func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForResourceOutput {
  1369  	s.Tags = v
  1370  	return s
  1371  }
  1372  
  1373  // The memory information of an Elastic Inference Accelerator type.
  1374  type MemoryInfo struct {
  1375  	_ struct{} `type:"structure"`
  1376  
  1377  	// The size in mebibytes of the Elastic Inference Accelerator type.
  1378  	SizeInMiB *int64 `locationName:"sizeInMiB" type:"integer"`
  1379  }
  1380  
  1381  // String returns the string representation.
  1382  //
  1383  // API parameter values that are decorated as "sensitive" in the API will not
  1384  // be included in the string output. The member name will be present, but the
  1385  // value will be replaced with "sensitive".
  1386  func (s MemoryInfo) String() string {
  1387  	return awsutil.Prettify(s)
  1388  }
  1389  
  1390  // GoString returns the string representation.
  1391  //
  1392  // API parameter values that are decorated as "sensitive" in the API will not
  1393  // be included in the string output. The member name will be present, but the
  1394  // value will be replaced with "sensitive".
  1395  func (s MemoryInfo) GoString() string {
  1396  	return s.String()
  1397  }
  1398  
  1399  // SetSizeInMiB sets the SizeInMiB field's value.
  1400  func (s *MemoryInfo) SetSizeInMiB(v int64) *MemoryInfo {
  1401  	s.SizeInMiB = &v
  1402  	return s
  1403  }
  1404  
  1405  // Raised when the requested resource cannot be found.
  1406  type ResourceNotFoundException struct {
  1407  	_            struct{}                  `type:"structure"`
  1408  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1409  
  1410  	Message_ *string `locationName:"message" type:"string"`
  1411  }
  1412  
  1413  // String returns the string representation.
  1414  //
  1415  // API parameter values that are decorated as "sensitive" in the API will not
  1416  // be included in the string output. The member name will be present, but the
  1417  // value will be replaced with "sensitive".
  1418  func (s ResourceNotFoundException) String() string {
  1419  	return awsutil.Prettify(s)
  1420  }
  1421  
  1422  // GoString returns the string representation.
  1423  //
  1424  // API parameter values that are decorated as "sensitive" in the API will not
  1425  // be included in the string output. The member name will be present, but the
  1426  // value will be replaced with "sensitive".
  1427  func (s ResourceNotFoundException) GoString() string {
  1428  	return s.String()
  1429  }
  1430  
  1431  func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
  1432  	return &ResourceNotFoundException{
  1433  		RespMetadata: v,
  1434  	}
  1435  }
  1436  
  1437  // Code returns the exception type name.
  1438  func (s *ResourceNotFoundException) Code() string {
  1439  	return "ResourceNotFoundException"
  1440  }
  1441  
  1442  // Message returns the exception's message.
  1443  func (s *ResourceNotFoundException) Message() string {
  1444  	if s.Message_ != nil {
  1445  		return *s.Message_
  1446  	}
  1447  	return ""
  1448  }
  1449  
  1450  // OrigErr always returns nil, satisfies awserr.Error interface.
  1451  func (s *ResourceNotFoundException) OrigErr() error {
  1452  	return nil
  1453  }
  1454  
  1455  func (s *ResourceNotFoundException) Error() string {
  1456  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1457  }
  1458  
  1459  // Status code returns the HTTP status code for the request's response error.
  1460  func (s *ResourceNotFoundException) StatusCode() int {
  1461  	return s.RespMetadata.StatusCode
  1462  }
  1463  
  1464  // RequestID returns the service's response RequestID for request.
  1465  func (s *ResourceNotFoundException) RequestID() string {
  1466  	return s.RespMetadata.RequestID
  1467  }
  1468  
  1469  type TagResourceInput struct {
  1470  	_ struct{} `type:"structure"`
  1471  
  1472  	// The ARN of the Elastic Inference Accelerator to tag.
  1473  	//
  1474  	// ResourceArn is a required field
  1475  	ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"`
  1476  
  1477  	// The tags to add to the Elastic Inference Accelerator.
  1478  	//
  1479  	// Tags is a required field
  1480  	Tags map[string]*string `locationName:"tags" min:"1" type:"map" required:"true"`
  1481  }
  1482  
  1483  // String returns the string representation.
  1484  //
  1485  // API parameter values that are decorated as "sensitive" in the API will not
  1486  // be included in the string output. The member name will be present, but the
  1487  // value will be replaced with "sensitive".
  1488  func (s TagResourceInput) String() string {
  1489  	return awsutil.Prettify(s)
  1490  }
  1491  
  1492  // GoString returns the string representation.
  1493  //
  1494  // API parameter values that are decorated as "sensitive" in the API will not
  1495  // be included in the string output. The member name will be present, but the
  1496  // value will be replaced with "sensitive".
  1497  func (s TagResourceInput) GoString() string {
  1498  	return s.String()
  1499  }
  1500  
  1501  // Validate inspects the fields of the type to determine if they are valid.
  1502  func (s *TagResourceInput) Validate() error {
  1503  	invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
  1504  	if s.ResourceArn == nil {
  1505  		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  1506  	}
  1507  	if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  1508  		invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  1509  	}
  1510  	if s.Tags == nil {
  1511  		invalidParams.Add(request.NewErrParamRequired("Tags"))
  1512  	}
  1513  	if s.Tags != nil && len(s.Tags) < 1 {
  1514  		invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  1515  	}
  1516  
  1517  	if invalidParams.Len() > 0 {
  1518  		return invalidParams
  1519  	}
  1520  	return nil
  1521  }
  1522  
  1523  // SetResourceArn sets the ResourceArn field's value.
  1524  func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput {
  1525  	s.ResourceArn = &v
  1526  	return s
  1527  }
  1528  
  1529  // SetTags sets the Tags field's value.
  1530  func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput {
  1531  	s.Tags = v
  1532  	return s
  1533  }
  1534  
  1535  type TagResourceOutput struct {
  1536  	_ struct{} `type:"structure" nopayload:"true"`
  1537  }
  1538  
  1539  // String returns the string representation.
  1540  //
  1541  // API parameter values that are decorated as "sensitive" in the API will not
  1542  // be included in the string output. The member name will be present, but the
  1543  // value will be replaced with "sensitive".
  1544  func (s TagResourceOutput) String() string {
  1545  	return awsutil.Prettify(s)
  1546  }
  1547  
  1548  // GoString returns the string representation.
  1549  //
  1550  // API parameter values that are decorated as "sensitive" in the API will not
  1551  // be included in the string output. The member name will be present, but the
  1552  // value will be replaced with "sensitive".
  1553  func (s TagResourceOutput) GoString() string {
  1554  	return s.String()
  1555  }
  1556  
  1557  type UntagResourceInput struct {
  1558  	_ struct{} `type:"structure" nopayload:"true"`
  1559  
  1560  	// The ARN of the Elastic Inference Accelerator to untag.
  1561  	//
  1562  	// ResourceArn is a required field
  1563  	ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"`
  1564  
  1565  	// The list of tags to remove from the Elastic Inference Accelerator.
  1566  	//
  1567  	// TagKeys is a required field
  1568  	TagKeys []*string `location:"querystring" locationName:"tagKeys" min:"1" type:"list" required:"true"`
  1569  }
  1570  
  1571  // String returns the string representation.
  1572  //
  1573  // API parameter values that are decorated as "sensitive" in the API will not
  1574  // be included in the string output. The member name will be present, but the
  1575  // value will be replaced with "sensitive".
  1576  func (s UntagResourceInput) String() string {
  1577  	return awsutil.Prettify(s)
  1578  }
  1579  
  1580  // GoString returns the string representation.
  1581  //
  1582  // API parameter values that are decorated as "sensitive" in the API will not
  1583  // be included in the string output. The member name will be present, but the
  1584  // value will be replaced with "sensitive".
  1585  func (s UntagResourceInput) GoString() string {
  1586  	return s.String()
  1587  }
  1588  
  1589  // Validate inspects the fields of the type to determine if they are valid.
  1590  func (s *UntagResourceInput) Validate() error {
  1591  	invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
  1592  	if s.ResourceArn == nil {
  1593  		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  1594  	}
  1595  	if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  1596  		invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  1597  	}
  1598  	if s.TagKeys == nil {
  1599  		invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  1600  	}
  1601  	if s.TagKeys != nil && len(s.TagKeys) < 1 {
  1602  		invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1))
  1603  	}
  1604  
  1605  	if invalidParams.Len() > 0 {
  1606  		return invalidParams
  1607  	}
  1608  	return nil
  1609  }
  1610  
  1611  // SetResourceArn sets the ResourceArn field's value.
  1612  func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput {
  1613  	s.ResourceArn = &v
  1614  	return s
  1615  }
  1616  
  1617  // SetTagKeys sets the TagKeys field's value.
  1618  func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
  1619  	s.TagKeys = v
  1620  	return s
  1621  }
  1622  
  1623  type UntagResourceOutput struct {
  1624  	_ struct{} `type:"structure" nopayload:"true"`
  1625  }
  1626  
  1627  // String returns the string representation.
  1628  //
  1629  // API parameter values that are decorated as "sensitive" in the API will not
  1630  // be included in the string output. The member name will be present, but the
  1631  // value will be replaced with "sensitive".
  1632  func (s UntagResourceOutput) String() string {
  1633  	return awsutil.Prettify(s)
  1634  }
  1635  
  1636  // GoString returns the string representation.
  1637  //
  1638  // API parameter values that are decorated as "sensitive" in the API will not
  1639  // be included in the string output. The member name will be present, but the
  1640  // value will be replaced with "sensitive".
  1641  func (s UntagResourceOutput) GoString() string {
  1642  	return s.String()
  1643  }
  1644  
  1645  const (
  1646  	// LocationTypeRegion is a LocationType enum value
  1647  	LocationTypeRegion = "region"
  1648  
  1649  	// LocationTypeAvailabilityZone is a LocationType enum value
  1650  	LocationTypeAvailabilityZone = "availability-zone"
  1651  
  1652  	// LocationTypeAvailabilityZoneId is a LocationType enum value
  1653  	LocationTypeAvailabilityZoneId = "availability-zone-id"
  1654  )
  1655  
  1656  // LocationType_Values returns all elements of the LocationType enum
  1657  func LocationType_Values() []string {
  1658  	return []string{
  1659  		LocationTypeRegion,
  1660  		LocationTypeAvailabilityZone,
  1661  		LocationTypeAvailabilityZoneId,
  1662  	}
  1663  }