From 0c5a0f96c236bdcad4e52daeab4ae9174666b57b Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Sun, 6 Mar 2016 08:47:30 +0000 Subject: [PATCH 1/6] vendor: Update github.com/aws/aws-sdk-go/service/apigateway --- Godeps/Godeps.json | 5 + .../aws/aws-sdk-go/service/apigateway/api.go | 497 +++++++++++++++++- .../apigateway/apigatewayiface/interface.go | 298 ----------- 3 files changed, 476 insertions(+), 324 deletions(-) delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/apigateway/apigatewayiface/interface.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 63e7fb5de..42d88c119 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -296,6 +296,11 @@ "Comment": "v1.1.2", "Rev": "8041be5461786460d86b4358305fbdf32d37cfb2" }, + { + "ImportPath": "github.com/aws/aws-sdk-go/service/apigateway", + "Comment": "v1.1.2", + "Rev": "8041be5461786460d86b4358305fbdf32d37cfb2" + }, { "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling", "Comment": "v1.1.2", diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go index 2728c27a5..05dc4bfb8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go @@ -38,6 +38,32 @@ func (c *APIGateway) CreateApiKey(input *CreateApiKeyInput) (*ApiKey, error) { return out, err } +const opCreateAuthorizer = "CreateAuthorizer" + +// CreateAuthorizerRequest generates a request for the CreateAuthorizer operation. +func (c *APIGateway) CreateAuthorizerRequest(input *CreateAuthorizerInput) (req *request.Request, output *Authorizer) { + op := &request.Operation{ + Name: opCreateAuthorizer, + HTTPMethod: "POST", + HTTPPath: "/restapis/{restapi_id}/authorizers", + } + + if input == nil { + input = &CreateAuthorizerInput{} + } + + req = c.newRequest(op, input, output) + output = &Authorizer{} + req.Data = output + return +} + +func (c *APIGateway) CreateAuthorizer(input *CreateAuthorizerInput) (*Authorizer, error) { + req, out := c.CreateAuthorizerRequest(input) + err := req.Send() + return out, err +} + const opCreateBasePathMapping = "CreateBasePathMapping" // CreateBasePathMappingRequest generates a request for the CreateBasePathMapping operation. @@ -221,7 +247,8 @@ func (c *APIGateway) CreateStageRequest(input *CreateStageInput) (req *request.R return } -// Creates a Stage resource. +// Creates a new Stage resource that references a pre-existing Deployment for +// the API. func (c *APIGateway) CreateStage(input *CreateStageInput) (*Stage, error) { req, out := c.CreateStageRequest(input) err := req.Send() @@ -257,6 +284,35 @@ func (c *APIGateway) DeleteApiKey(input *DeleteApiKeyInput) (*DeleteApiKeyOutput return out, err } +const opDeleteAuthorizer = "DeleteAuthorizer" + +// DeleteAuthorizerRequest generates a request for the DeleteAuthorizer operation. +func (c *APIGateway) DeleteAuthorizerRequest(input *DeleteAuthorizerInput) (req *request.Request, output *DeleteAuthorizerOutput) { + op := &request.Operation{ + Name: opDeleteAuthorizer, + HTTPMethod: "DELETE", + HTTPPath: "/restapis/{restapi_id}/authorizers/{authorizer_id}", + } + + if input == nil { + input = &DeleteAuthorizerInput{} + } + + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + output = &DeleteAuthorizerOutput{} + req.Data = output + return +} + +// Deletes an existing Authorizer resource. +func (c *APIGateway) DeleteAuthorizer(input *DeleteAuthorizerInput) (*DeleteAuthorizerOutput, error) { + req, out := c.DeleteAuthorizerRequest(input) + err := req.Send() + return out, err +} + const opDeleteBasePathMapping = "DeleteBasePathMapping" // DeleteBasePathMappingRequest generates a request for the DeleteBasePathMapping operation. @@ -755,6 +811,60 @@ func (c *APIGateway) GetApiKeysPages(input *GetApiKeysInput, fn func(p *GetApiKe }) } +const opGetAuthorizer = "GetAuthorizer" + +// GetAuthorizerRequest generates a request for the GetAuthorizer operation. +func (c *APIGateway) GetAuthorizerRequest(input *GetAuthorizerInput) (req *request.Request, output *Authorizer) { + op := &request.Operation{ + Name: opGetAuthorizer, + HTTPMethod: "GET", + HTTPPath: "/restapis/{restapi_id}/authorizers/{authorizer_id}", + } + + if input == nil { + input = &GetAuthorizerInput{} + } + + req = c.newRequest(op, input, output) + output = &Authorizer{} + req.Data = output + return +} + +// Describe an existing Authorizer resource. +func (c *APIGateway) GetAuthorizer(input *GetAuthorizerInput) (*Authorizer, error) { + req, out := c.GetAuthorizerRequest(input) + err := req.Send() + return out, err +} + +const opGetAuthorizers = "GetAuthorizers" + +// GetAuthorizersRequest generates a request for the GetAuthorizers operation. +func (c *APIGateway) GetAuthorizersRequest(input *GetAuthorizersInput) (req *request.Request, output *GetAuthorizersOutput) { + op := &request.Operation{ + Name: opGetAuthorizers, + HTTPMethod: "GET", + HTTPPath: "/restapis/{restapi_id}/authorizers", + } + + if input == nil { + input = &GetAuthorizersInput{} + } + + req = c.newRequest(op, input, output) + output = &GetAuthorizersOutput{} + req.Data = output + return +} + +// Describe an existing Authorizers resource. +func (c *APIGateway) GetAuthorizers(input *GetAuthorizersInput) (*GetAuthorizersOutput, error) { + req, out := c.GetAuthorizersRequest(input) + err := req.Send() + return out, err +} + const opGetBasePathMapping = "GetBasePathMapping" // GetBasePathMappingRequest generates a request for the GetBasePathMapping operation. @@ -1026,6 +1136,32 @@ func (c *APIGateway) GetDomainNamesPages(input *GetDomainNamesInput, fn func(p * }) } +const opGetExport = "GetExport" + +// GetExportRequest generates a request for the GetExport operation. +func (c *APIGateway) GetExportRequest(input *GetExportInput) (req *request.Request, output *GetExportOutput) { + op := &request.Operation{ + Name: opGetExport, + HTTPMethod: "GET", + HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}/exports/{export_type}", + } + + if input == nil { + input = &GetExportInput{} + } + + req = c.newRequest(op, input, output) + output = &GetExportOutput{} + req.Data = output + return +} + +func (c *APIGateway) GetExport(input *GetExportInput) (*GetExportOutput, error) { + req, out := c.GetExportRequest(input) + err := req.Send() + return out, err +} + const opGetIntegration = "GetIntegration" // GetIntegrationRequest generates a request for the GetIntegration operation. @@ -1634,6 +1770,33 @@ func (c *APIGateway) UpdateApiKey(input *UpdateApiKeyInput) (*ApiKey, error) { return out, err } +const opUpdateAuthorizer = "UpdateAuthorizer" + +// UpdateAuthorizerRequest generates a request for the UpdateAuthorizer operation. +func (c *APIGateway) UpdateAuthorizerRequest(input *UpdateAuthorizerInput) (req *request.Request, output *Authorizer) { + op := &request.Operation{ + Name: opUpdateAuthorizer, + HTTPMethod: "PATCH", + HTTPPath: "/restapis/{restapi_id}/authorizers/{authorizer_id}", + } + + if input == nil { + input = &UpdateAuthorizerInput{} + } + + req = c.newRequest(op, input, output) + output = &Authorizer{} + req.Data = output + return +} + +// Updates an existing Authorizer resource. +func (c *APIGateway) UpdateAuthorizer(input *UpdateAuthorizerInput) (*Authorizer, error) { + req, out := c.UpdateAuthorizerRequest(input) + err := req.Send() + return out, err +} + const opUpdateBasePathMapping = "UpdateBasePathMapping" // UpdateBasePathMappingRequest generates a request for the UpdateBasePathMapping operation. @@ -1987,7 +2150,8 @@ func (s Account) GoString() string { type ApiKey struct { _ struct{} `type:"structure"` - // The date when the API Key was created, in ISO 8601 format. + // The date when the API Key was created, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm" + // target="_blank). CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` // The description of the API Key. @@ -2019,6 +2183,65 @@ func (s ApiKey) GoString() string { return s.String() } +// Represents an authorization layer for methods. If enabled on a method, API +// Gateway will activate the authorizer when a client calls the method. +type Authorizer struct { + _ struct{} `type:"structure"` + + // Specifies the credentials required for the authorizer, if any. Two options + // are available. To specify an IAM Role for Amazon API Gateway to assume, use + // the role's Amazon Resource Name (ARN). To use resource-based permissions + // on the Lambda function, specify null. + AuthorizerCredentials *string `locationName:"authorizerCredentials" type:"string"` + + // The TTL in seconds of cached authorizer results. If greater than 0, API Gateway + // will cache authorizer responses. If this field is not set, the default value + // is 300. The maximum value is 3600, or 1 hour. + AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` + + // [Required] Specifies the authorizer's Uniform Resource Identifier (URI). + // For TOKEN authorizers, this must be a well-formed Lambda function URI. The + // URI should be of the form arn:aws:apigateway:{region}:lambda:path/{service_api}. + // Region is used to determine the right endpoint. In this case, path is used + // to indicate that the remaining substring in the URI should be treated as + // the path to the resource, including the initial /. For Lambda functions, + // this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations + AuthorizerUri *string `locationName:"authorizerUri" type:"string"` + + // The identifier for the authorizer resource. + Id *string `locationName:"id" type:"string"` + + // [Required] The source of the identity in an incoming request. For TOKEN authorizers, + // this value is a mapping expression with the same syntax as integration parameter + // mappings. The only valid source for tokens is 'header', so the expression + // should match 'method.request.header.[headerName]'. The value of the header + // '[headerName]' will be interpreted as the incoming token. + IdentitySource *string `locationName:"identitySource" type:"string"` + + // A validation expression for the incoming identity. For TOKEN authorizers, + // this value should be a regular expression. The incoming token from the client + // is matched against this expression, and will proceed if the token matches. + // If the token doesn't match, the client receives a 401 Unauthorized response. + IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` + + // [Required] The name of the authorizer. + Name *string `locationName:"name" type:"string"` + + // [Required] The type of the authorizer. Currently, the only valid type is + // TOKEN. + Type *string `locationName:"type" type:"string" enum:"AuthorizerType"` +} + +// String returns the string representation +func (s Authorizer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Authorizer) GoString() string { + return s.String() +} + // Represents the base path that callers of the API that must provide as part // of the URL after the domain name. type BasePathMapping struct { @@ -2095,6 +2318,43 @@ func (s CreateApiKeyInput) GoString() string { return s.String() } +type CreateAuthorizerInput struct { + _ struct{} `type:"structure"` + + // Specifies the credentials required for the authorizer, if any. + AuthorizerCredentials *string `locationName:"authorizerCredentials" type:"string"` + + // The TTL of cached authorizer results. + AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` + + // [Required] Specifies the authorizer's Uniform Resource Identifier (URI). + AuthorizerUri *string `locationName:"authorizerUri" type:"string" required:"true"` + + // [Required] The source of the identity in an incoming request. + IdentitySource *string `locationName:"identitySource" type:"string" required:"true"` + + // A validation expression for the incoming identity. + IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` + + // [Required] The name of the authorizer. + Name *string `locationName:"name" type:"string" required:"true"` + + RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` + + // [Required] The type of the authorizer. + Type *string `locationName:"type" type:"string" required:"true" enum:"AuthorizerType"` +} + +// String returns the string representation +func (s CreateAuthorizerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateAuthorizerInput) GoString() string { + return s.String() +} + // Requests Amazon API Gateway to create a new BasePathMapping resource. type CreateBasePathMappingInput struct { _ struct{} `type:"structure"` @@ -2151,8 +2411,8 @@ type CreateDeploymentInput struct { StageName *string `locationName:"stageName" type:"string" required:"true"` // A map that defines the stage variables for the Stage resource that is associated - // with the new deployment. Variable names can have alphabetic characters, and - // the values must match [A-Za-z0-9-._~:/?#&=,]+ + // with the new deployment. Variable names can have alphanumeric characters, + // and the values must match [A-Za-z0-9-._~:/?#&=,]+. Variables map[string]*string `locationName:"variables" type:"map"` } @@ -2218,7 +2478,7 @@ type CreateModelInput struct { RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` // The schema for the model. For application/json models, this should be JSON-schema - // draft v4 model. + // draft v4 (http://json-schema.org/documentation.html" target="_blank) model. Schema *string `locationName:"schema" type:"string"` } @@ -2260,7 +2520,7 @@ func (s CreateResourceInput) GoString() string { type CreateRestApiInput struct { _ struct{} `type:"structure"` - // The name of the RestApi that you want to clone from. + // The Id of the RestApi that you want to clone from. CloneFrom *string `locationName:"cloneFrom" type:"string"` // The description of the RestApi. @@ -2303,7 +2563,7 @@ type CreateStageInput struct { StageName *string `locationName:"stageName" type:"string" required:"true"` // A map that defines the stage variables for the new Stage resource. Variable - // names can have alphabetic characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+ + // names can have alphanumeric characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. Variables map[string]*string `locationName:"variables" type:"map"` } @@ -2349,6 +2609,41 @@ func (s DeleteApiKeyOutput) GoString() string { return s.String() } +// Request to delete an existing Authorizer resource. +type DeleteAuthorizerInput struct { + _ struct{} `type:"structure"` + + // The identifier of the Authorizer resource. + AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"` + + // The RestApi identifier for the Authorizer resource. + RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteAuthorizerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAuthorizerInput) GoString() string { + return s.String() +} + +type DeleteAuthorizerOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteAuthorizerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAuthorizerOutput) GoString() string { + return s.String() +} + // A request to delete the BasePathMapping resource. type DeleteBasePathMappingInput struct { _ struct{} `type:"structure"` @@ -2814,11 +3109,13 @@ type DomainName struct { // The name of the certificate. CertificateName *string `locationName:"certificateName" type:"string"` - // The date when the certificate was uploaded, in ISO 8601 format. + // The date when the certificate was uploaded, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm" + // target="_blank). CertificateUploadDate *time.Time `locationName:"certificateUploadDate" type:"timestamp" timestampFormat:"unix"` // The domain name of the Amazon CloudFront distribution. For more information, - // see the Amazon CloudFront documentation. + // see the Amazon CloudFront documentation (http://aws.amazon.com/documentation/cloudfront/" + // target="_blank). DistributionDomainName *string `locationName:"distributionDomainName" type:"string"` // The name of the DomainName resource. @@ -2961,6 +3258,69 @@ func (s GetApiKeysOutput) GoString() string { return s.String() } +// Request to describe an existing Authorizer resource. +type GetAuthorizerInput struct { + _ struct{} `type:"structure"` + + // The identifier of the Authorizer resource. + AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"` + + // The RestApi identifier for the Authorizer resource. + RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetAuthorizerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAuthorizerInput) GoString() string { + return s.String() +} + +// Request to describe an existing Authorizers resource. +type GetAuthorizersInput struct { + _ struct{} `type:"structure"` + + Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` + + Position *string `location:"querystring" locationName:"position" type:"string"` + + // The RestApi identifier for the Authorizers resource. + RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetAuthorizersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAuthorizersInput) GoString() string { + return s.String() +} + +// Represents a collection of Authorizer resources. +type GetAuthorizersOutput struct { + _ struct{} `type:"structure"` + + // Gets the current list of Authorizer resources in the collection. + Items []*Authorizer `locationName:"item" type:"list"` + + Position *string `locationName:"position" type:"string"` +} + +// String returns the string representation +func (s GetAuthorizersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAuthorizersOutput) GoString() string { + return s.String() +} + // Request to describe a BasePathMapping resource. type GetBasePathMappingInput struct { _ struct{} `type:"structure"` @@ -3219,6 +3579,50 @@ func (s GetDomainNamesOutput) GoString() string { return s.String() } +type GetExportInput struct { + _ struct{} `type:"structure"` + + Accepts *string `location:"header" locationName:"Accept" type:"string"` + + ExportType *string `location:"uri" locationName:"export_type" type:"string" required:"true"` + + Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"` + + RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` + + StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetExportInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetExportInput) GoString() string { + return s.String() +} + +type GetExportOutput struct { + _ struct{} `type:"structure" payload:"Body"` + + Body []byte `locationName:"body" type:"blob"` + + ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"` + + ContentType *string `location:"header" locationName:"Content-Type" type:"string"` +} + +// String returns the string representation +func (s GetExportOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetExportOutput) GoString() string { + return s.String() +} + // Represents a get integration request. type GetIntegrationInput struct { _ struct{} `type:"structure"` @@ -3370,8 +3774,8 @@ func (s GetModelTemplateInput) GoString() string { type GetModelTemplateOutput struct { _ struct{} `type:"structure"` - // The Apache Velocity Template Language (VTL) template content used for the - // template resource. + // The Apache Velocity Template Language (VTL) (http://velocity.apache.org/engine/devel/vtl-reference-guide.html" + // target="_blank) template content used for the template resource. Value *string `locationName:"value" type:"string"` } @@ -3705,12 +4109,13 @@ type Integration struct { // Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, // the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 - // specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}. - // Region and service are used to determine the right endpoint. For AWS services - // that use the Action= query string parameter, service_api should be a valid - // action for the desired service. For RESTful AWS service APIs, path is used - // to indicate that the remaining substring in the URI should be treated as - // the path to the resource, including the initial /. + // specification (https://www.ietf.org/rfc/rfc3986.txt" target="_blank). For + // AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. + // Region, subdomain and service are used to determine the right endpoint. For + // AWS services that use the Action= query string parameter, service_api should + // be a valid action for the desired service. For RESTful AWS service APIs, + // path is used to indicate that the remaining substring in the URI should be + // treated as the path to the resource, including the initial /. Uri *string `locationName:"uri" type:"string"` } @@ -3733,10 +4138,10 @@ type IntegrationResponse struct { // Represents response parameters that can be read from the backend response. // Response parameters are represented as a key/value map, with a destination // as the key and a source as the value. A destination must match an existing - // response parameter in the Method. The source can be a header from the backend - // response, or a static value. Static values are specified using enclosing - // single quotes, and backend response headers can be read using the pattern - // integration.response.header.{name}. + // response parameter in the MethodResponse. The source can be a header from + // the backend response, or a static value. Static values are specified using + // enclosing single quotes, and backend response headers can be read using the + // pattern integration.response.header.{name}. ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` // Specifies the templates used to transform the integration response body. @@ -3775,6 +4180,10 @@ type Method struct { // The method's authorization type. AuthorizationType *string `locationName:"authorizationType" type:"string"` + // Specifies the identifier of an Authorizer to use on this Method. The authorizationType + // must be CUSTOM. + AuthorizerId *string `locationName:"authorizerId" type:"string"` + // The HTTP method. HttpMethod *string `locationName:"httpMethod" type:"string"` @@ -3940,7 +4349,7 @@ type Model struct { Name *string `locationName:"name" type:"string"` // The schema for the model. For application/json models, this should be JSON-schema - // draft v4 model. + // draft v4 (http://json-schema.org/documentation.html" target="_blank) model. Schema *string `locationName:"schema" type:"string"` } @@ -4100,6 +4509,10 @@ type PutMethodInput struct { // Specifies the type of authorization used for the method. AuthorizationType *string `locationName:"authorizationType" type:"string" required:"true"` + // Specifies the identifier of an Authorizer to use on this Method, if the type + // is CUSTOM. + AuthorizerId *string `locationName:"authorizerId" type:"string"` + // Specifies the put method request's HTTP method type. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` @@ -4211,7 +4624,8 @@ func (s Resource) GoString() string { type RestApi struct { _ struct{} `type:"structure"` - // The date when the API was created, in ISO 8601 format. + // The date when the API was created, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm" + // target="_blank). CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` // The API's description. @@ -4251,7 +4665,8 @@ type Stage struct { ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` - // The date and time that the stage was created, in ISO 8601 format. + // The date and time that the stage was created, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm" + // target="_blank). CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` // The identifier of the Deployment that the stage points to. @@ -4261,7 +4676,7 @@ type Stage struct { Description *string `locationName:"description" type:"string"` // The date and time that information about the stage was last updated, in ISO - // 8601 format. + // 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm" target="_blank). LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` // A map that defines the method settings for a Stage resource. Keys are defined @@ -4274,7 +4689,7 @@ type Stage struct { StageName *string `locationName:"stageName" type:"string"` // A map that defines the stage variables for a Stage resource. Variable names - // can have alphabetic characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+ + // can have alphanumeric characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. Variables map[string]*string `locationName:"variables" type:"map"` } @@ -4432,6 +4847,31 @@ func (s UpdateApiKeyInput) GoString() string { return s.String() } +// Request to update an existing Authorizer resource. +type UpdateAuthorizerInput struct { + _ struct{} `type:"structure"` + + // The identifier of the Authorizer resource. + AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"` + + // A list of operations describing the updates to apply to the specified resource. + // The patches are applied in the order specified in the list. + PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` + + // The RestApi identifier for the Authorizer resource. + RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateAuthorizerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAuthorizerInput) GoString() string { + return s.String() +} + // A request to change information about the BasePathMapping resource. type UpdateBasePathMappingInput struct { _ struct{} `type:"structure"` @@ -4742,6 +5182,11 @@ func (s UpdateStageInput) GoString() string { return s.String() } +const ( + // @enum AuthorizerType + AuthorizerTypeToken = "TOKEN" +) + // Returns the size of the CacheCluster. const ( // @enum CacheClusterSize diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/apigatewayiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/apigatewayiface/interface.go deleted file mode 100644 index 8dd193968..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/apigatewayiface/interface.go +++ /dev/null @@ -1,298 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. - -// Package apigatewayiface provides an interface for the Amazon API Gateway. -package apigatewayiface - -import ( - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/service/apigateway" -) - -// APIGatewayAPI is the interface type for apigateway.APIGateway. -type APIGatewayAPI interface { - CreateApiKeyRequest(*apigateway.CreateApiKeyInput) (*request.Request, *apigateway.ApiKey) - - CreateApiKey(*apigateway.CreateApiKeyInput) (*apigateway.ApiKey, error) - - CreateBasePathMappingRequest(*apigateway.CreateBasePathMappingInput) (*request.Request, *apigateway.BasePathMapping) - - CreateBasePathMapping(*apigateway.CreateBasePathMappingInput) (*apigateway.BasePathMapping, error) - - CreateDeploymentRequest(*apigateway.CreateDeploymentInput) (*request.Request, *apigateway.Deployment) - - CreateDeployment(*apigateway.CreateDeploymentInput) (*apigateway.Deployment, error) - - CreateDomainNameRequest(*apigateway.CreateDomainNameInput) (*request.Request, *apigateway.DomainName) - - CreateDomainName(*apigateway.CreateDomainNameInput) (*apigateway.DomainName, error) - - CreateModelRequest(*apigateway.CreateModelInput) (*request.Request, *apigateway.Model) - - CreateModel(*apigateway.CreateModelInput) (*apigateway.Model, error) - - CreateResourceRequest(*apigateway.CreateResourceInput) (*request.Request, *apigateway.Resource) - - CreateResource(*apigateway.CreateResourceInput) (*apigateway.Resource, error) - - CreateRestApiRequest(*apigateway.CreateRestApiInput) (*request.Request, *apigateway.RestApi) - - CreateRestApi(*apigateway.CreateRestApiInput) (*apigateway.RestApi, error) - - CreateStageRequest(*apigateway.CreateStageInput) (*request.Request, *apigateway.Stage) - - CreateStage(*apigateway.CreateStageInput) (*apigateway.Stage, error) - - DeleteApiKeyRequest(*apigateway.DeleteApiKeyInput) (*request.Request, *apigateway.DeleteApiKeyOutput) - - DeleteApiKey(*apigateway.DeleteApiKeyInput) (*apigateway.DeleteApiKeyOutput, error) - - DeleteBasePathMappingRequest(*apigateway.DeleteBasePathMappingInput) (*request.Request, *apigateway.DeleteBasePathMappingOutput) - - DeleteBasePathMapping(*apigateway.DeleteBasePathMappingInput) (*apigateway.DeleteBasePathMappingOutput, error) - - DeleteClientCertificateRequest(*apigateway.DeleteClientCertificateInput) (*request.Request, *apigateway.DeleteClientCertificateOutput) - - DeleteClientCertificate(*apigateway.DeleteClientCertificateInput) (*apigateway.DeleteClientCertificateOutput, error) - - DeleteDeploymentRequest(*apigateway.DeleteDeploymentInput) (*request.Request, *apigateway.DeleteDeploymentOutput) - - DeleteDeployment(*apigateway.DeleteDeploymentInput) (*apigateway.DeleteDeploymentOutput, error) - - DeleteDomainNameRequest(*apigateway.DeleteDomainNameInput) (*request.Request, *apigateway.DeleteDomainNameOutput) - - DeleteDomainName(*apigateway.DeleteDomainNameInput) (*apigateway.DeleteDomainNameOutput, error) - - DeleteIntegrationRequest(*apigateway.DeleteIntegrationInput) (*request.Request, *apigateway.DeleteIntegrationOutput) - - DeleteIntegration(*apigateway.DeleteIntegrationInput) (*apigateway.DeleteIntegrationOutput, error) - - DeleteIntegrationResponseRequest(*apigateway.DeleteIntegrationResponseInput) (*request.Request, *apigateway.DeleteIntegrationResponseOutput) - - DeleteIntegrationResponse(*apigateway.DeleteIntegrationResponseInput) (*apigateway.DeleteIntegrationResponseOutput, error) - - DeleteMethodRequest(*apigateway.DeleteMethodInput) (*request.Request, *apigateway.DeleteMethodOutput) - - DeleteMethod(*apigateway.DeleteMethodInput) (*apigateway.DeleteMethodOutput, error) - - DeleteMethodResponseRequest(*apigateway.DeleteMethodResponseInput) (*request.Request, *apigateway.DeleteMethodResponseOutput) - - DeleteMethodResponse(*apigateway.DeleteMethodResponseInput) (*apigateway.DeleteMethodResponseOutput, error) - - DeleteModelRequest(*apigateway.DeleteModelInput) (*request.Request, *apigateway.DeleteModelOutput) - - DeleteModel(*apigateway.DeleteModelInput) (*apigateway.DeleteModelOutput, error) - - DeleteResourceRequest(*apigateway.DeleteResourceInput) (*request.Request, *apigateway.DeleteResourceOutput) - - DeleteResource(*apigateway.DeleteResourceInput) (*apigateway.DeleteResourceOutput, error) - - DeleteRestApiRequest(*apigateway.DeleteRestApiInput) (*request.Request, *apigateway.DeleteRestApiOutput) - - DeleteRestApi(*apigateway.DeleteRestApiInput) (*apigateway.DeleteRestApiOutput, error) - - DeleteStageRequest(*apigateway.DeleteStageInput) (*request.Request, *apigateway.DeleteStageOutput) - - DeleteStage(*apigateway.DeleteStageInput) (*apigateway.DeleteStageOutput, error) - - FlushStageCacheRequest(*apigateway.FlushStageCacheInput) (*request.Request, *apigateway.FlushStageCacheOutput) - - FlushStageCache(*apigateway.FlushStageCacheInput) (*apigateway.FlushStageCacheOutput, error) - - GenerateClientCertificateRequest(*apigateway.GenerateClientCertificateInput) (*request.Request, *apigateway.ClientCertificate) - - GenerateClientCertificate(*apigateway.GenerateClientCertificateInput) (*apigateway.ClientCertificate, error) - - GetAccountRequest(*apigateway.GetAccountInput) (*request.Request, *apigateway.Account) - - GetAccount(*apigateway.GetAccountInput) (*apigateway.Account, error) - - GetApiKeyRequest(*apigateway.GetApiKeyInput) (*request.Request, *apigateway.ApiKey) - - GetApiKey(*apigateway.GetApiKeyInput) (*apigateway.ApiKey, error) - - GetApiKeysRequest(*apigateway.GetApiKeysInput) (*request.Request, *apigateway.GetApiKeysOutput) - - GetApiKeys(*apigateway.GetApiKeysInput) (*apigateway.GetApiKeysOutput, error) - - GetApiKeysPages(*apigateway.GetApiKeysInput, func(*apigateway.GetApiKeysOutput, bool) bool) error - - GetBasePathMappingRequest(*apigateway.GetBasePathMappingInput) (*request.Request, *apigateway.BasePathMapping) - - GetBasePathMapping(*apigateway.GetBasePathMappingInput) (*apigateway.BasePathMapping, error) - - GetBasePathMappingsRequest(*apigateway.GetBasePathMappingsInput) (*request.Request, *apigateway.GetBasePathMappingsOutput) - - GetBasePathMappings(*apigateway.GetBasePathMappingsInput) (*apigateway.GetBasePathMappingsOutput, error) - - GetBasePathMappingsPages(*apigateway.GetBasePathMappingsInput, func(*apigateway.GetBasePathMappingsOutput, bool) bool) error - - GetClientCertificateRequest(*apigateway.GetClientCertificateInput) (*request.Request, *apigateway.ClientCertificate) - - GetClientCertificate(*apigateway.GetClientCertificateInput) (*apigateway.ClientCertificate, error) - - GetClientCertificatesRequest(*apigateway.GetClientCertificatesInput) (*request.Request, *apigateway.GetClientCertificatesOutput) - - GetClientCertificates(*apigateway.GetClientCertificatesInput) (*apigateway.GetClientCertificatesOutput, error) - - GetClientCertificatesPages(*apigateway.GetClientCertificatesInput, func(*apigateway.GetClientCertificatesOutput, bool) bool) error - - GetDeploymentRequest(*apigateway.GetDeploymentInput) (*request.Request, *apigateway.Deployment) - - GetDeployment(*apigateway.GetDeploymentInput) (*apigateway.Deployment, error) - - GetDeploymentsRequest(*apigateway.GetDeploymentsInput) (*request.Request, *apigateway.GetDeploymentsOutput) - - GetDeployments(*apigateway.GetDeploymentsInput) (*apigateway.GetDeploymentsOutput, error) - - GetDeploymentsPages(*apigateway.GetDeploymentsInput, func(*apigateway.GetDeploymentsOutput, bool) bool) error - - GetDomainNameRequest(*apigateway.GetDomainNameInput) (*request.Request, *apigateway.DomainName) - - GetDomainName(*apigateway.GetDomainNameInput) (*apigateway.DomainName, error) - - GetDomainNamesRequest(*apigateway.GetDomainNamesInput) (*request.Request, *apigateway.GetDomainNamesOutput) - - GetDomainNames(*apigateway.GetDomainNamesInput) (*apigateway.GetDomainNamesOutput, error) - - GetDomainNamesPages(*apigateway.GetDomainNamesInput, func(*apigateway.GetDomainNamesOutput, bool) bool) error - - GetIntegrationRequest(*apigateway.GetIntegrationInput) (*request.Request, *apigateway.Integration) - - GetIntegration(*apigateway.GetIntegrationInput) (*apigateway.Integration, error) - - GetIntegrationResponseRequest(*apigateway.GetIntegrationResponseInput) (*request.Request, *apigateway.IntegrationResponse) - - GetIntegrationResponse(*apigateway.GetIntegrationResponseInput) (*apigateway.IntegrationResponse, error) - - GetMethodRequest(*apigateway.GetMethodInput) (*request.Request, *apigateway.Method) - - GetMethod(*apigateway.GetMethodInput) (*apigateway.Method, error) - - GetMethodResponseRequest(*apigateway.GetMethodResponseInput) (*request.Request, *apigateway.MethodResponse) - - GetMethodResponse(*apigateway.GetMethodResponseInput) (*apigateway.MethodResponse, error) - - GetModelRequest(*apigateway.GetModelInput) (*request.Request, *apigateway.Model) - - GetModel(*apigateway.GetModelInput) (*apigateway.Model, error) - - GetModelTemplateRequest(*apigateway.GetModelTemplateInput) (*request.Request, *apigateway.GetModelTemplateOutput) - - GetModelTemplate(*apigateway.GetModelTemplateInput) (*apigateway.GetModelTemplateOutput, error) - - GetModelsRequest(*apigateway.GetModelsInput) (*request.Request, *apigateway.GetModelsOutput) - - GetModels(*apigateway.GetModelsInput) (*apigateway.GetModelsOutput, error) - - GetModelsPages(*apigateway.GetModelsInput, func(*apigateway.GetModelsOutput, bool) bool) error - - GetResourceRequest(*apigateway.GetResourceInput) (*request.Request, *apigateway.Resource) - - GetResource(*apigateway.GetResourceInput) (*apigateway.Resource, error) - - GetResourcesRequest(*apigateway.GetResourcesInput) (*request.Request, *apigateway.GetResourcesOutput) - - GetResources(*apigateway.GetResourcesInput) (*apigateway.GetResourcesOutput, error) - - GetResourcesPages(*apigateway.GetResourcesInput, func(*apigateway.GetResourcesOutput, bool) bool) error - - GetRestApiRequest(*apigateway.GetRestApiInput) (*request.Request, *apigateway.RestApi) - - GetRestApi(*apigateway.GetRestApiInput) (*apigateway.RestApi, error) - - GetRestApisRequest(*apigateway.GetRestApisInput) (*request.Request, *apigateway.GetRestApisOutput) - - GetRestApis(*apigateway.GetRestApisInput) (*apigateway.GetRestApisOutput, error) - - GetRestApisPages(*apigateway.GetRestApisInput, func(*apigateway.GetRestApisOutput, bool) bool) error - - GetSdkRequest(*apigateway.GetSdkInput) (*request.Request, *apigateway.GetSdkOutput) - - GetSdk(*apigateway.GetSdkInput) (*apigateway.GetSdkOutput, error) - - GetStageRequest(*apigateway.GetStageInput) (*request.Request, *apigateway.Stage) - - GetStage(*apigateway.GetStageInput) (*apigateway.Stage, error) - - GetStagesRequest(*apigateway.GetStagesInput) (*request.Request, *apigateway.GetStagesOutput) - - GetStages(*apigateway.GetStagesInput) (*apigateway.GetStagesOutput, error) - - PutIntegrationRequest(*apigateway.PutIntegrationInput) (*request.Request, *apigateway.Integration) - - PutIntegration(*apigateway.PutIntegrationInput) (*apigateway.Integration, error) - - PutIntegrationResponseRequest(*apigateway.PutIntegrationResponseInput) (*request.Request, *apigateway.IntegrationResponse) - - PutIntegrationResponse(*apigateway.PutIntegrationResponseInput) (*apigateway.IntegrationResponse, error) - - PutMethodRequest(*apigateway.PutMethodInput) (*request.Request, *apigateway.Method) - - PutMethod(*apigateway.PutMethodInput) (*apigateway.Method, error) - - PutMethodResponseRequest(*apigateway.PutMethodResponseInput) (*request.Request, *apigateway.MethodResponse) - - PutMethodResponse(*apigateway.PutMethodResponseInput) (*apigateway.MethodResponse, error) - - TestInvokeMethodRequest(*apigateway.TestInvokeMethodInput) (*request.Request, *apigateway.TestInvokeMethodOutput) - - TestInvokeMethod(*apigateway.TestInvokeMethodInput) (*apigateway.TestInvokeMethodOutput, error) - - UpdateAccountRequest(*apigateway.UpdateAccountInput) (*request.Request, *apigateway.Account) - - UpdateAccount(*apigateway.UpdateAccountInput) (*apigateway.Account, error) - - UpdateApiKeyRequest(*apigateway.UpdateApiKeyInput) (*request.Request, *apigateway.ApiKey) - - UpdateApiKey(*apigateway.UpdateApiKeyInput) (*apigateway.ApiKey, error) - - UpdateBasePathMappingRequest(*apigateway.UpdateBasePathMappingInput) (*request.Request, *apigateway.BasePathMapping) - - UpdateBasePathMapping(*apigateway.UpdateBasePathMappingInput) (*apigateway.BasePathMapping, error) - - UpdateClientCertificateRequest(*apigateway.UpdateClientCertificateInput) (*request.Request, *apigateway.ClientCertificate) - - UpdateClientCertificate(*apigateway.UpdateClientCertificateInput) (*apigateway.ClientCertificate, error) - - UpdateDeploymentRequest(*apigateway.UpdateDeploymentInput) (*request.Request, *apigateway.Deployment) - - UpdateDeployment(*apigateway.UpdateDeploymentInput) (*apigateway.Deployment, error) - - UpdateDomainNameRequest(*apigateway.UpdateDomainNameInput) (*request.Request, *apigateway.DomainName) - - UpdateDomainName(*apigateway.UpdateDomainNameInput) (*apigateway.DomainName, error) - - UpdateIntegrationRequest(*apigateway.UpdateIntegrationInput) (*request.Request, *apigateway.Integration) - - UpdateIntegration(*apigateway.UpdateIntegrationInput) (*apigateway.Integration, error) - - UpdateIntegrationResponseRequest(*apigateway.UpdateIntegrationResponseInput) (*request.Request, *apigateway.IntegrationResponse) - - UpdateIntegrationResponse(*apigateway.UpdateIntegrationResponseInput) (*apigateway.IntegrationResponse, error) - - UpdateMethodRequest(*apigateway.UpdateMethodInput) (*request.Request, *apigateway.Method) - - UpdateMethod(*apigateway.UpdateMethodInput) (*apigateway.Method, error) - - UpdateMethodResponseRequest(*apigateway.UpdateMethodResponseInput) (*request.Request, *apigateway.MethodResponse) - - UpdateMethodResponse(*apigateway.UpdateMethodResponseInput) (*apigateway.MethodResponse, error) - - UpdateModelRequest(*apigateway.UpdateModelInput) (*request.Request, *apigateway.Model) - - UpdateModel(*apigateway.UpdateModelInput) (*apigateway.Model, error) - - UpdateResourceRequest(*apigateway.UpdateResourceInput) (*request.Request, *apigateway.Resource) - - UpdateResource(*apigateway.UpdateResourceInput) (*apigateway.Resource, error) - - UpdateRestApiRequest(*apigateway.UpdateRestApiInput) (*request.Request, *apigateway.RestApi) - - UpdateRestApi(*apigateway.UpdateRestApiInput) (*apigateway.RestApi, error) - - UpdateStageRequest(*apigateway.UpdateStageInput) (*request.Request, *apigateway.Stage) - - UpdateStage(*apigateway.UpdateStageInput) (*apigateway.Stage, error) -} - -var _ APIGatewayAPI = (*apigateway.APIGateway)(nil) From a338eae72a70c990749013c4fc9583b0b3f54004 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Sun, 6 Mar 2016 09:13:06 +0000 Subject: [PATCH 2/6] provider/aws: Guard APIGateway resource & REST API against deletion --- builtin/providers/aws/resource_aws_api_gateway_resource.go | 4 ++++ builtin/providers/aws/resource_aws_api_gateway_rest_api.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/builtin/providers/aws/resource_aws_api_gateway_resource.go b/builtin/providers/aws/resource_aws_api_gateway_resource.go index 6fa9f26fc..a0f138c13 100644 --- a/builtin/providers/aws/resource_aws_api_gateway_resource.go +++ b/builtin/providers/aws/resource_aws_api_gateway_resource.go @@ -75,6 +75,10 @@ func resourceAwsApiGatewayResourceRead(d *schema.ResourceData, meta interface{}) }) if err != nil { + if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { + d.SetId("") + return nil + } return err } diff --git a/builtin/providers/aws/resource_aws_api_gateway_rest_api.go b/builtin/providers/aws/resource_aws_api_gateway_rest_api.go index 9254c285c..65d3afdc5 100644 --- a/builtin/providers/aws/resource_aws_api_gateway_rest_api.go +++ b/builtin/providers/aws/resource_aws_api_gateway_rest_api.go @@ -87,6 +87,10 @@ func resourceAwsApiGatewayRestApiRead(d *schema.ResourceData, meta interface{}) RestApiId: aws.String(d.Id()), }) if err != nil { + if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { + d.SetId("") + return nil + } return err } From b12d9062587b778c70e43811c9fcfce8e95fa70d Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Sun, 6 Mar 2016 09:14:46 +0000 Subject: [PATCH 3/6] aws/docs: Fix wrong field name (parent_resource_id -> parent_id) --- .../providers/aws/r/api_gateway_integration.html.markdown | 2 +- .../aws/r/api_gateway_integration_response.html.markdown | 2 +- .../docs/providers/aws/r/api_gateway_method.html.markdown | 2 +- .../providers/aws/r/api_gateway_method_response.html.markdown | 2 +- .../docs/providers/aws/r/api_gateway_resource.html.markdown | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/website/source/docs/providers/aws/r/api_gateway_integration.html.markdown b/website/source/docs/providers/aws/r/api_gateway_integration.html.markdown index 0e201852e..2225cf445 100644 --- a/website/source/docs/providers/aws/r/api_gateway_integration.html.markdown +++ b/website/source/docs/providers/aws/r/api_gateway_integration.html.markdown @@ -20,7 +20,7 @@ resource "aws_api_gateway_rest_api" "MyDemoAPI" { resource "aws_api_gateway_resource" "MyDemoResource" { rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}" - parent_resource_id = "${aws_api_gateway_rest_api.MyDemoAPI.root_resource_id}" + parent_id = "${aws_api_gateway_rest_api.MyDemoAPI.root_resource_id}" path_part = "mydemoresource" } diff --git a/website/source/docs/providers/aws/r/api_gateway_integration_response.html.markdown b/website/source/docs/providers/aws/r/api_gateway_integration_response.html.markdown index 1d9ae55e2..98515fa9f 100644 --- a/website/source/docs/providers/aws/r/api_gateway_integration_response.html.markdown +++ b/website/source/docs/providers/aws/r/api_gateway_integration_response.html.markdown @@ -20,7 +20,7 @@ resource "aws_api_gateway_rest_api" "MyDemoAPI" { resource "aws_api_gateway_resource" "MyDemoResource" { rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}" - parent_resource_id = "${aws_api_gateway_rest_api.MyDemoAPI.root_resource_id}" + parent_id = "${aws_api_gateway_rest_api.MyDemoAPI.root_resource_id}" path_part = "mydemoresource" } diff --git a/website/source/docs/providers/aws/r/api_gateway_method.html.markdown b/website/source/docs/providers/aws/r/api_gateway_method.html.markdown index 705cba4bf..8df4f5603 100644 --- a/website/source/docs/providers/aws/r/api_gateway_method.html.markdown +++ b/website/source/docs/providers/aws/r/api_gateway_method.html.markdown @@ -20,7 +20,7 @@ resource "aws_api_gateway_rest_api" "MyDemoAPI" { resource "aws_api_gateway_resource" "MyDemoResource" { rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}" - parent_resource_id = "${aws_api_gateway_rest_api.MyDemoAPI.root_resource_id}" + parent_id = "${aws_api_gateway_rest_api.MyDemoAPI.root_resource_id}" path_part = "mydemoresource" } diff --git a/website/source/docs/providers/aws/r/api_gateway_method_response.html.markdown b/website/source/docs/providers/aws/r/api_gateway_method_response.html.markdown index bc71c9ac1..d3716c72a 100644 --- a/website/source/docs/providers/aws/r/api_gateway_method_response.html.markdown +++ b/website/source/docs/providers/aws/r/api_gateway_method_response.html.markdown @@ -20,7 +20,7 @@ resource "aws_api_gateway_rest_api" "MyDemoAPI" { resource "aws_api_gateway_resource" "MyDemoResource" { rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}" - parent_resource_id = "${aws_api_gateway_rest_api.MyDemoAPI.root_resource_id}" + parent_id = "${aws_api_gateway_rest_api.MyDemoAPI.root_resource_id}" path_part = "mydemoresource" } diff --git a/website/source/docs/providers/aws/r/api_gateway_resource.html.markdown b/website/source/docs/providers/aws/r/api_gateway_resource.html.markdown index 8bca20b82..73f56a765 100644 --- a/website/source/docs/providers/aws/r/api_gateway_resource.html.markdown +++ b/website/source/docs/providers/aws/r/api_gateway_resource.html.markdown @@ -20,7 +20,7 @@ resource "aws_api_gateway_rest_api" "MyDemoAPI" { resource "aws_api_gateway_resource" "MyDemoResource" { rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}" - parent_resource_id = "${aws_api_gateway_rest_api.MyDemoAPI.root_resource_id}" + parent_id = "${aws_api_gateway_rest_api.MyDemoAPI.root_resource_id}" path_part = "mydemoresource" } ``` @@ -30,7 +30,7 @@ resource "aws_api_gateway_resource" "MyDemoResource" { The following arguments are supported: * `rest_api_id` - (Required) API Gateway ID -* `parent_resource_id` - (Required) Parent resource ID +* `parent_id` - (Required) Parent resource ID * `path_part` - (Required) The resource path ## Attributes Reference From fa0d6af524dcaf3aa01874a09d048d303e43945f Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Sun, 6 Mar 2016 09:20:13 +0000 Subject: [PATCH 4/6] provider/aws: Remove unnecessary GetChange in Delete funcs --- .../resource_aws_api_gateway_integration.go | 20 +++----------- ...ce_aws_api_gateway_integration_response.go | 26 +++---------------- .../aws/resource_aws_api_gateway_method.go | 20 +++----------- ...esource_aws_api_gateway_method_response.go | 26 +++---------------- 4 files changed, 14 insertions(+), 78 deletions(-) diff --git a/builtin/providers/aws/resource_aws_api_gateway_integration.go b/builtin/providers/aws/resource_aws_api_gateway_integration.go index b9bbae20d..01e90968f 100644 --- a/builtin/providers/aws/resource_aws_api_gateway_integration.go +++ b/builtin/providers/aws/resource_aws_api_gateway_integration.go @@ -161,25 +161,11 @@ func resourceAwsApiGatewayIntegrationDelete(d *schema.ResourceData, meta interfa conn := meta.(*AWSClient).apigateway log.Printf("[DEBUG] Deleting API Gateway Integration: %s", d.Id()) - resourceId := d.Get("resource_id").(string) - if o, n := d.GetChange("resource_id"); o.(string) != n.(string) { - resourceId = o.(string) - } - httpMethod := d.Get("http_method").(string) - if o, n := d.GetChange("http_method"); o.(string) != n.(string) { - httpMethod = o.(string) - } - restApiID := d.Get("rest_api_id").(string) - if o, n := d.GetChange("rest_api_id"); o.(string) != n.(string) { - restApiID = o.(string) - } - return resource.Retry(5*time.Minute, func() error { - log.Printf("[DEBUG] schema is %#v", d) _, err := conn.DeleteIntegration(&apigateway.DeleteIntegrationInput{ - HttpMethod: aws.String(httpMethod), - ResourceId: aws.String(resourceId), - RestApiId: aws.String(restApiID), + HttpMethod: aws.String(d.Get("http_method").(string)), + ResourceId: aws.String(d.Get("resource_id").(string)), + RestApiId: aws.String(d.Get("rest_api_id").(string)), }) if err == nil { return nil diff --git a/builtin/providers/aws/resource_aws_api_gateway_integration_response.go b/builtin/providers/aws/resource_aws_api_gateway_integration_response.go index 48500ab44..c8b629a69 100644 --- a/builtin/providers/aws/resource_aws_api_gateway_integration_response.go +++ b/builtin/providers/aws/resource_aws_api_gateway_integration_response.go @@ -116,30 +116,12 @@ func resourceAwsApiGatewayIntegrationResponseDelete(d *schema.ResourceData, meta conn := meta.(*AWSClient).apigateway log.Printf("[DEBUG] Deleting API Gateway Integration Response: %s", d.Id()) - resourceId := d.Get("resource_id").(string) - if o, n := d.GetChange("resource_id"); o.(string) != n.(string) { - resourceId = o.(string) - } - httpMethod := d.Get("http_method").(string) - if o, n := d.GetChange("http_method"); o.(string) != n.(string) { - httpMethod = o.(string) - } - restApiID := d.Get("rest_api_id").(string) - if o, n := d.GetChange("rest_api_id"); o.(string) != n.(string) { - restApiID = o.(string) - } - statusCode := d.Get("status_code").(string) - if o, n := d.GetChange("status_code"); o.(string) != n.(string) { - statusCode = o.(string) - } - return resource.Retry(5*time.Minute, func() error { - log.Printf("[DEBUG] schema is %#v", d) _, err := conn.DeleteIntegrationResponse(&apigateway.DeleteIntegrationResponseInput{ - HttpMethod: aws.String(httpMethod), - ResourceId: aws.String(resourceId), - RestApiId: aws.String(restApiID), - StatusCode: aws.String(statusCode), + HttpMethod: aws.String(d.Get("http_method").(string)), + ResourceId: aws.String(d.Get("resource_id").(string)), + RestApiId: aws.String(d.Get("rest_api_id").(string)), + StatusCode: aws.String(d.Get("status_code").(string)), }) if err == nil { return nil diff --git a/builtin/providers/aws/resource_aws_api_gateway_method.go b/builtin/providers/aws/resource_aws_api_gateway_method.go index 36e123657..c5c1da391 100644 --- a/builtin/providers/aws/resource_aws_api_gateway_method.go +++ b/builtin/providers/aws/resource_aws_api_gateway_method.go @@ -154,25 +154,11 @@ func resourceAwsApiGatewayMethodDelete(d *schema.ResourceData, meta interface{}) conn := meta.(*AWSClient).apigateway log.Printf("[DEBUG] Deleting API Gateway Method: %s", d.Id()) - resourceId := d.Get("resource_id").(string) - if o, n := d.GetChange("resource_id"); o.(string) != n.(string) { - resourceId = o.(string) - } - httpMethod := d.Get("http_method").(string) - if o, n := d.GetChange("http_method"); o.(string) != n.(string) { - httpMethod = o.(string) - } - restApiID := d.Get("rest_api_id").(string) - if o, n := d.GetChange("rest_api_id"); o.(string) != n.(string) { - restApiID = o.(string) - } - return resource.Retry(5*time.Minute, func() error { - log.Printf("[DEBUG] schema is %#v", d) _, err := conn.DeleteMethod(&apigateway.DeleteMethodInput{ - HttpMethod: aws.String(httpMethod), - ResourceId: aws.String(resourceId), - RestApiId: aws.String(restApiID), + HttpMethod: aws.String(d.Get("http_method").(string)), + ResourceId: aws.String(d.Get("resource_id").(string)), + RestApiId: aws.String(d.Get("rest_api_id").(string)), }) if err == nil { return nil diff --git a/builtin/providers/aws/resource_aws_api_gateway_method_response.go b/builtin/providers/aws/resource_aws_api_gateway_method_response.go index 41b35159a..3d77b2ea7 100644 --- a/builtin/providers/aws/resource_aws_api_gateway_method_response.go +++ b/builtin/providers/aws/resource_aws_api_gateway_method_response.go @@ -136,30 +136,12 @@ func resourceAwsApiGatewayMethodResponseDelete(d *schema.ResourceData, meta inte conn := meta.(*AWSClient).apigateway log.Printf("[DEBUG] Deleting API Gateway Method Response: %s", d.Id()) - resourceId := d.Get("resource_id").(string) - if o, n := d.GetChange("resource_id"); o.(string) != n.(string) { - resourceId = o.(string) - } - httpMethod := d.Get("http_method").(string) - if o, n := d.GetChange("http_method"); o.(string) != n.(string) { - httpMethod = o.(string) - } - restApiID := d.Get("rest_api_id").(string) - if o, n := d.GetChange("rest_api_id"); o.(string) != n.(string) { - restApiID = o.(string) - } - statusCode := d.Get("status_code").(string) - if o, n := d.GetChange("status_code"); o.(string) != n.(string) { - statusCode = o.(string) - } - return resource.Retry(5*time.Minute, func() error { - log.Printf("[DEBUG] schema is %#v", d) _, err := conn.DeleteMethodResponse(&apigateway.DeleteMethodResponseInput{ - HttpMethod: aws.String(httpMethod), - ResourceId: aws.String(resourceId), - RestApiId: aws.String(restApiID), - StatusCode: aws.String(statusCode), + HttpMethod: aws.String(d.Get("http_method").(string)), + ResourceId: aws.String(d.Get("resource_id").(string)), + RestApiId: aws.String(d.Get("rest_api_id").(string)), + StatusCode: aws.String(d.Get("status_code").(string)), }) if err == nil { return nil From c6c275221190ab42fdef812a66ac83444d10d759 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Sun, 6 Mar 2016 09:22:27 +0000 Subject: [PATCH 5/6] provider/aws: Sort API Gateway resources alphabetically --- builtin/providers/aws/provider.go | 12 ++++++------ website/source/layouts/aws.erb | 26 +++++++++++++------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/builtin/providers/aws/provider.go b/builtin/providers/aws/provider.go index d561ad9ae..936be6cbc 100644 --- a/builtin/providers/aws/provider.go +++ b/builtin/providers/aws/provider.go @@ -114,15 +114,15 @@ func Provider() terraform.ResourceProvider { "aws_ami": resourceAwsAmi(), "aws_ami_copy": resourceAwsAmiCopy(), "aws_ami_from_instance": resourceAwsAmiFromInstance(), - "aws_api_gateway_rest_api": resourceAwsApiGatewayRestApi(), "aws_api_gateway_api_key": resourceAwsApiGatewayApiKey(), - "aws_api_gateway_model": resourceAwsApiGatewayModel(), - "aws_api_gateway_resource": resourceAwsApiGatewayResource(), - "aws_api_gateway_method": resourceAwsApiGatewayMethod(), - "aws_api_gateway_method_response": resourceAwsApiGatewayMethodResponse(), + "aws_api_gateway_deployment": resourceAwsApiGatewayDeployment(), "aws_api_gateway_integration": resourceAwsApiGatewayIntegration(), "aws_api_gateway_integration_response": resourceAwsApiGatewayIntegrationResponse(), - "aws_api_gateway_deployment": resourceAwsApiGatewayDeployment(), + "aws_api_gateway_method": resourceAwsApiGatewayMethod(), + "aws_api_gateway_method_response": resourceAwsApiGatewayMethodResponse(), + "aws_api_gateway_model": resourceAwsApiGatewayModel(), + "aws_api_gateway_resource": resourceAwsApiGatewayResource(), + "aws_api_gateway_rest_api": resourceAwsApiGatewayRestApi(), "aws_app_cookie_stickiness_policy": resourceAwsAppCookieStickinessPolicy(), "aws_autoscaling_group": resourceAwsAutoscalingGroup(), "aws_autoscaling_notification": resourceAwsAutoscalingNotification(), diff --git a/website/source/layouts/aws.erb b/website/source/layouts/aws.erb index 7b7bae621..56739d0ea 100644 --- a/website/source/layouts/aws.erb +++ b/website/source/layouts/aws.erb @@ -13,20 +13,17 @@ > APIGateway Resources From 61d0d19ae3215c1fa325c853f2a6ca76507f3f9f Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Sun, 6 Mar 2016 09:24:17 +0000 Subject: [PATCH 6/6] Fix typo (APIGateway -> API Gateway) --- .../docs/providers/aws/r/api_gateway_api_key.html.markdown | 4 ++-- website/source/layouts/aws.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/website/source/docs/providers/aws/r/api_gateway_api_key.html.markdown b/website/source/docs/providers/aws/r/api_gateway_api_key.html.markdown index e18ae5d03..f033da625 100644 --- a/website/source/docs/providers/aws/r/api_gateway_api_key.html.markdown +++ b/website/source/docs/providers/aws/r/api_gateway_api_key.html.markdown @@ -43,5 +43,5 @@ The following arguments are supported: Stage keys support the following: -* `rest_api_id` - (Required) The ID of the associated APIGateway Rest API. -* `stage_name` - (Required) The name of the APIGateway stage. +* `rest_api_id` - (Required) The ID of the associated API Gateway Rest API. +* `stage_name` - (Required) The name of the API Gateway stage. diff --git a/website/source/layouts/aws.erb b/website/source/layouts/aws.erb index 56739d0ea..276ec2f3f 100644 --- a/website/source/layouts/aws.erb +++ b/website/source/layouts/aws.erb @@ -11,7 +11,7 @@ > - APIGateway Resources + API Gateway Resources