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

docs(s3): bad type definition for objectsKeyPattern parameter #28175

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions packages/aws-cdk-lib/aws-s3/lib/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export interface IBucket extends IResource {
* of the bucket will also be granted to the same principal.
*
* @param identity The principal
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*')
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*'). Parameter type is `any` but `string` should be passed in.
*/
grantRead(identity: iam.IGrantable, objectsKeyPattern?: any): iam.Grant;

Expand All @@ -203,7 +203,7 @@ export interface IBucket extends IResource {
* use the `grantPutAcl` method.
*
* @param identity The principal
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*')
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*'). Parameter type is `any` but `string` should be passed in.
* @param allowedActionPatterns Restrict the permissions to certain list of action patterns
*/
grantWrite(identity: iam.IGrantable, objectsKeyPattern?: any, allowedActionPatterns?: string[]): iam.Grant;
Expand All @@ -214,7 +214,7 @@ export interface IBucket extends IResource {
* If encryption is used, permission to use the key to encrypt the contents
* of written files will also be granted to the same principal.
* @param identity The principal
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*')
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*'). Parameter type is `any` but `string` should be passed in.
*/
grantPut(identity: iam.IGrantable, objectsKeyPattern?: any): iam.Grant;

Expand All @@ -235,7 +235,7 @@ export interface IBucket extends IResource {
* in this bucket.
*
* @param identity The principal
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*')
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*'). Parameter type is `any` but `string` should be passed in.
*/
grantDelete(identity: iam.IGrantable, objectsKeyPattern?: any): iam.Grant;

Expand All @@ -255,7 +255,7 @@ export interface IBucket extends IResource {
* use the `grantPutAcl` method.
*
* @param identity The principal
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*')
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*'). Parameter type is `any` but `string` should be passed in.
*/
grantReadWrite(identity: iam.IGrantable, objectsKeyPattern?: any): iam.Grant;

Expand Down Expand Up @@ -765,7 +765,7 @@ export abstract class BucketBase extends Resource implements IBucket {
* of the bucket will also be granted to the same principal.
*
* @param identity The principal
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*')
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*'). Parameter type is `any` but `string` should be passed in.
*/
public grantRead(identity: iam.IGrantable, objectsKeyPattern: any = '*') {
return this.grant(identity, perms.BUCKET_READ_ACTIONS, perms.KEY_READ_ACTIONS,
Expand All @@ -786,7 +786,7 @@ export abstract class BucketBase extends Resource implements IBucket {
* If encryption is used, permission to use the key to encrypt the contents
* of written files will also be granted to the same principal.
* @param identity The principal
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*')
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*'). Parameter type is `any` but `string` should be passed in
*/
public grantPut(identity: iam.IGrantable, objectsKeyPattern: any = '*') {
return this.grant(identity, this.putActions, perms.KEY_WRITE_ACTIONS,
Expand All @@ -803,7 +803,7 @@ export abstract class BucketBase extends Resource implements IBucket {
* in this bucket.
*
* @param identity The principal
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*')
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*'). Parameter type is `any` but `string` should be passed in.
*/
public grantDelete(identity: iam.IGrantable, objectsKeyPattern: any = '*') {
return this.grant(identity, perms.BUCKET_DELETE_ACTIONS, [],
Expand Down
Loading