Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynamoDB example missing ·ExpressionAttributeNames: expr.Names(), #285

Closed
kaihendry opened this issue Apr 2, 2019 · 1 comment · Fixed by #306 or #312
Closed

DynamoDB example missing ·ExpressionAttributeNames: expr.Names(), #285

kaihendry opened this issue Apr 2, 2019 · 1 comment · Fixed by #306 or #312
Labels
documentation This is a problem with documentation. v1-sync

Comments

@kaihendry
Copy link

https://github.com/aws/aws-sdk-go-v2/blob/master/service/dynamodb/expression/examples_test.go#L107-L112

·ExpressionAttributeNames: expr.Names(), is needed, else you will get these odd:

ValidationException: Invalid KeyConditionExpression: An expression attribute name used in the document path is not defined; attribute name: #0
@jasdel jasdel added the documentation This is a problem with documentation. label May 17, 2019
@jasdel
Copy link
Contributor

jasdel commented May 17, 2019

Thanks for reporting this issue. We'll fix this in both the v1 and v2 SDK's examples.

@jasdel jasdel added the v1-sync label May 17, 2019
jasdel added a commit to jasdel/aws-sdk-go-v2 that referenced this issue May 23, 2019
Fixes the ExampleBuilder_WithKeyCondition example to include the
ExpressionAttributeNames member being set.

Fix aws#285
jasdel added a commit to jasdel/aws-sdk-go that referenced this issue May 23, 2019
Fixes the ExampleBuilder_WithKeyCondition example to include the
ExpressionAttributeNames member being set.

Related to aws/aws-sdk-go-v2#285
jasdel added a commit that referenced this issue May 23, 2019
)

Fixes the ExampleBuilder_WithKeyCondition example to include the
ExpressionAttributeNames member being set.

Fix #285
jasdel added a commit to aws/aws-sdk-go that referenced this issue May 23, 2019
…2618)

Fixes the ExampleBuilder_WithKeyCondition example to include the
ExpressionAttributeNames member being set.

Related to aws/aws-sdk-go-v2#285
jasdel added a commit to jasdel/aws-sdk-go-v2 that referenced this issue May 28, 2019
Services
---
* Synced the V2 SDK with latests AWS service API definitions.
* Fixes [aws#304](aws#304)
* Fixes [aws#295](aws#295)

SDK Breaking changes
---
This update includes multiple breaking changes to the SDK. These updates improve the SDK's usability, consistency.

Client type name
---
The API client type is renamed to `Client` for consistency, and remove stutter between package and client type name. Using Amazon S3 API client as an example, the `s3.S3` type is renamed to `s3.Client`.

New API operation response type
---
API operations' `Request.Send` method now returns a Response type for the specific operation. The Response type wraps the operation's Output parameter, and includes a method for the response's metadata such as RequestID. The Output type is an annonymous embedded field within the Output type. If your application was passing the Output value around you'll need to extract it directly, or pass the Response type instead.

New API operation paginator utility
---
This change removes the `Paginate` method from API operation Request types, (e.g. ListObjectsRequest). A new Paginator constructor is added that can be used to page these operations. To update your application to use the new pattern, where `Paginate` was being called, replace this with the Paginator type's constructor. The usage of the returned Paginator type is unchanged.

```go
req := svc.ListObjectsRequest(params)
p := req.Paginate()
```

Is updated to to use the Paginator constructor instead of Paginate method.

```go
req := svc.ListObjectsRequest(params)
p := s3.NewListObjectsPaginator(req)
```

Other changes
---
  * Standardizes API client package name to be based on the API model's `ServiceID`.
  * Standardizes API client operation input and output type names.
  * Removes `endpoints` package's service identifier constants. These values were unstable. Each API client package contains an `EndpointsID` constant that can be used for service specific endpoint lookup.
  * Fix API endpoint lookups to use the API's modeled `EndpointsID` (aka `enpdointPrefix`). Searching for API endpoints in the `endpoints` package should use the API client package's, `EndpointsID`.

SDK Enhancements
---
*  Update CI tests to ensure all codegen changes are accounted for in PR ([aws#183](aws#183))
  * Updates the CI tests to ensure that any code generation changes are accounted for in the PR, and that there were no mistaken changes made without also running code generation. This change should also help ensure that code generation order is stable, and there are no ordering issues with the SDK's codegen.
  * Related [aws/aws-sdk-go#1966](aws/aws-sdk-go#1966)

* `service/dynamodb/expression`: Fix Builder with KeyCondition example ([aws#306](aws#306))
  * Fixes the ExampleBuilder_WithKeyCondition example to include the ExpressionAttributeNames member being set.
  * Fixes [aws#285](aws#285)
* `aws/defaults`: Fix UserAgent execution environment key ([aws#307](aws#307))
  * Fixes the SDK's UserAgent key for the execution environment.
  * Fixes [aws#276](aws#276)
* `private/model/api`: Improve SDK API reference doc generation ([aws#309](aws#309))
  * Improves the SDK's generated documentation for API client, operation, and types. This fixes several bugs in the doc generation causing poor formatting, an difficult to read reference documentation.
  * Fix [aws#308](aws#308)
  * Related [aws/aws-sdk-go#2617](aws/aws-sdk-go#2617)
jasdel added a commit to jasdel/aws-sdk-go-v2 that referenced this issue May 28, 2019
Services
---
* Synced the V2 SDK with latests AWS service API definitions.
* Fixes aws#304
* Fixes aws#295

SDK Breaking changes
---
This update includes multiple breaking changes to the SDK. These updates improve the SDK's usability, consistency.

Client type name
---
The API client type is renamed to `Client` for consistency, and remove stutter between package and client type name. Using Amazon S3 API client as an example, the `s3.S3` type is renamed to `s3.Client`.

New API operation response type
---
API operations' `Request.Send` method now returns a Response type for the specific operation. The Response type wraps the operation's Output parameter, and includes a method for the response's metadata such as RequestID. The Output type is an annonymous embedded field within the Output type. If your application was passing the Output value around you'll need to extract it directly, or pass the Response type instead.

New API operation paginator utility
---
This change removes the `Paginate` method from API operation Request types, (e.g. ListObjectsRequest). A new Paginator constructor is added that can be used to page these operations. To update your application to use the new pattern, where `Paginate` was being called, replace this with the Paginator type's constructor. The usage of the returned Paginator type is unchanged.

```go
req := svc.ListObjectsRequest(params)
p := req.Paginate()
```

Is updated to to use the Paginator constructor instead of Paginate method.

```go
req := svc.ListObjectsRequest(params)
p := s3.NewListObjectsPaginator(req)
```

Other changes
---
  * Standardizes API client package name to be based on the API model's `ServiceID`.
  * Standardizes API client operation input and output type names.
  * Removes `endpoints` package's service identifier constants. These values were unstable. Each API client package contains an `EndpointsID` constant that can be used for service specific endpoint lookup.
  * Fix API endpoint lookups to use the API's modeled `EndpointsID` (aka `enpdointPrefix`). Searching for API endpoints in the `endpoints` package should use the API client package's, `EndpointsID`.

SDK Enhancements
---
*  Update CI tests to ensure all codegen changes are accounted for in PR (aws#183)
  * Updates the CI tests to ensure that any code generation changes are accounted for in the PR, and that there were no mistaken changes made without also running code generation. This change should also help ensure that code generation order is stable, and there are no ordering issues with the SDK's codegen.
  * Related aws/aws-sdk-go#1966

* `service/dynamodb/expression`: Fix Builder with KeyCondition example (aws#306)
  * Fixes the ExampleBuilder_WithKeyCondition example to include the ExpressionAttributeNames member being set.
  * Fixes aws#285
* `aws/defaults`: Fix UserAgent execution environment key (aws#307)
  * Fixes the SDK's UserAgent key for the execution environment.
  * Fixes aws#276
* `private/model/api`: Improve SDK API reference doc generation (aws#309)
  * Improves the SDK's generated documentation for API client, operation, and types. This fixes several bugs in the doc generation causing poor formatting, an difficult to read reference documentation.
  * Fix aws#308
  * Related aws/aws-sdk-go#2617
jasdel added a commit to jasdel/aws-sdk-go-v2 that referenced this issue May 28, 2019
Services
---
* Synced the V2 SDK with latest AWS service API definitions.
* Fixes aws#304
* Fixes aws#295

SDK Breaking changes
---
This update includes multiple breaking changes to the SDK. These updates improve the SDK's usability, consistency.

Client type name
---
The API client type is renamed to `Client` for consistency, and remove stutter between package and client type name. Using Amazon S3 API client as an example, the `s3.S3` type is renamed to `s3.Client`.

New API operation response type
---
API operations' `Request.Send` method now returns a Response type for the specific operation. The Response type wraps the operation's Output parameter, and includes a method for the response's metadata such as RequestID. The Output type is an anonymous embedded field within the Output type. If your application was passing the Output value around you'll need to extract it directly, or pass the Response type instead.

New API operation paginator utility
---
This change removes the `Paginate` method from API operation Request types, (e.g. ListObjectsRequest). A new Paginator constructor is added that can be used to page these operations. To update your application to use the new pattern, where `Paginate` was being called, replace this with the Paginator type's constructor. The usage of the returned Paginator type is unchanged.

```go
req := svc.ListObjectsRequest(params)
p := req.Paginate()
```

Is updated to to use the Paginator constructor instead of Paginate method.

```go
req := svc.ListObjectsRequest(params)
p := s3.NewListObjectsPaginator(req)
```

Other changes
---
  * Standardizes API client package name to be based on the API model's `ServiceID`.
  * Standardizes API client operation input and output type names.
  * Removes `endpoints` package's service identifier constants. These values were unstable. Each API client package contains an `EndpointsID` constant that can be used for service specific endpoint lookup.
  * Fix API endpoint lookups to use the API's modeled `EndpointsID` (aka `enpdointPrefix`). Searching for API endpoints in the `endpoints` package should use the API client package's, `EndpointsID`.

SDK Enhancements
---
*  Update CI tests to ensure all codegen changes are accounted for in PR (aws#183)
  * Updates the CI tests to ensure that any code generation changes are accounted for in the PR, and that there were no mistaken changes made without also running code generation. This change should also help ensure that code generation order is stable, and there are no ordering issues with the SDK's codegen.
  * Related aws/aws-sdk-go#1966

* `service/dynamodb/expression`: Fix Builder with KeyCondition example (aws#306)
  * Fixes the ExampleBuilder_WithKeyCondition example to include the ExpressionAttributeNames member being set.
  * Fixes aws#285
* `aws/defaults`: Fix UserAgent execution environment key (aws#307)
  * Fixes the SDK's UserAgent key for the execution environment.
  * Fixes aws#276
* `private/model/api`: Improve SDK API reference doc generation (aws#309)
  * Improves the SDK's generated documentation for API client, operation, and types. This fixes several bugs in the doc generation causing poor formatting, an difficult to read reference documentation.
  * Fix aws#308
  * Related aws/aws-sdk-go#2617
jasdel added a commit that referenced this issue May 28, 2019
Services
---
* Synced the V2 SDK with latest AWS service API definitions.
* Fixes #304
* Fixes #295

SDK Breaking changes
---
This update includes multiple breaking changes to the SDK. These updates improve the SDK's usability, consistency.

Client type name
---
The API client type is renamed to `Client` for consistency, and remove stutter between package and client type name. Using Amazon S3 API client as an example, the `s3.S3` type is renamed to `s3.Client`.

New API operation response type
---
API operations' `Request.Send` method now returns a Response type for the specific operation. The Response type wraps the operation's Output parameter, and includes a method for the response's metadata such as RequestID. The Output type is an anonymous embedded field within the Output type. If your application was passing the Output value around you'll need to extract it directly, or pass the Response type instead.

New API operation paginator utility
---
This change removes the `Paginate` method from API operation Request types, (e.g. ListObjectsRequest). A new Paginator constructor is added that can be used to page these operations. To update your application to use the new pattern, where `Paginate` was being called, replace this with the Paginator type's constructor. The usage of the returned Paginator type is unchanged.

```go
req := svc.ListObjectsRequest(params)
p := req.Paginate()
```

Is updated to to use the Paginator constructor instead of Paginate method.

```go
req := svc.ListObjectsRequest(params)
p := s3.NewListObjectsPaginator(req)
```

Other changes
---
  * Standardizes API client package name to be based on the API model's `ServiceID`.
  * Standardizes API client operation input and output type names.
  * Removes `endpoints` package's service identifier constants. These values were unstable. Each API client package contains an `EndpointsID` constant that can be used for service specific endpoint lookup.
  * Fix API endpoint lookups to use the API's modeled `EndpointsID` (aka `enpdointPrefix`). Searching for API endpoints in the `endpoints` package should use the API client package's, `EndpointsID`.

SDK Enhancements
---
*  Update CI tests to ensure all codegen changes are accounted for in PR (#183)
  * Updates the CI tests to ensure that any code generation changes are accounted for in the PR, and that there were no mistaken changes made without also running code generation. This change should also help ensure that code generation order is stable, and there are no ordering issues with the SDK's codegen.
  * Related aws/aws-sdk-go#1966

* `service/dynamodb/expression`: Fix Builder with KeyCondition example (#306)
  * Fixes the ExampleBuilder_WithKeyCondition example to include the ExpressionAttributeNames member being set.
  * Fixes #285
* `aws/defaults`: Fix UserAgent execution environment key (#307)
  * Fixes the SDK's UserAgent key for the execution environment.
  * Fixes #276
* `private/model/api`: Improve SDK API reference doc generation (#309)
  * Improves the SDK's generated documentation for API client, operation, and types. This fixes several bugs in the doc generation causing poor formatting, an difficult to read reference documentation.
  * Fix #308
  * Related aws/aws-sdk-go#2617
diehlaws pushed a commit to diehlaws/aws-sdk-go that referenced this issue Jul 2, 2019
…ws#2618)

Fixes the ExampleBuilder_WithKeyCondition example to include the
ExpressionAttributeNames member being set.

Related to aws/aws-sdk-go-v2#285
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. v1-sync
Projects
None yet
2 participants