From db81a0d88620f9cf9ffd15bbc357ada2b3d97389 Mon Sep 17 00:00:00 2001 From: Paul Sun Date: Tue, 28 Nov 2023 15:54:07 -0500 Subject: [PATCH 1/2] docs(s3): Bad type definition for objectsKeyPattern parameter --- packages/aws-cdk-lib/aws-s3/lib/bucket.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/aws-cdk-lib/aws-s3/lib/bucket.ts b/packages/aws-cdk-lib/aws-s3/lib/bucket.ts index 9f4cd6b122163..510778a590e24 100644 --- a/packages/aws-cdk-lib/aws-s3/lib/bucket.ts +++ b/packages/aws-cdk-lib/aws-s3/lib/bucket.ts @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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, @@ -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, @@ -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, [], From 160ed39346887b0e96c0340978b4f846fa055eab Mon Sep 17 00:00:00 2001 From: Paul Sun Date: Wed, 29 Nov 2023 09:48:07 -0500 Subject: [PATCH 2/2] Add missing period --- packages/aws-cdk-lib/aws-s3/lib/bucket.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-s3/lib/bucket.ts b/packages/aws-cdk-lib/aws-s3/lib/bucket.ts index 510778a590e24..cb14f945fe69b 100644 --- a/packages/aws-cdk-lib/aws-s3/lib/bucket.ts +++ b/packages/aws-cdk-lib/aws-s3/lib/bucket.ts @@ -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 '*'). Parameter type is `any` but `string` should be passed in + * @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,