Skip to content

Commit e5e4f9b

Browse files
authored
docs(cdk-lib): fix typos (#33008)
### Issue # (if applicable) Closes #<issue number here>. None Fixed typos in code comments. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 531280f commit e5e4f9b

File tree

8 files changed

+21
-21
lines changed

8 files changed

+21
-21
lines changed

packages/@aws-cdk/aws-lambda-python-alpha/lib/function.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class PythonFunction extends Function {
6262
throw new Error(`Cannot find index file at ${resolvedIndex}`);
6363
}
6464

65-
const resolvedHandler =`${index.slice(0, -3)}.${handler}`.replace(/\//g, '.');
65+
const resolvedHandler = `${index.slice(0, -3)}.${handler}`.replace(/\//g, '.');
6666

6767
if (props.runtime && props.runtime.family !== RuntimeFamily.PYTHON) {
6868
throw new Error('Only `PYTHON` runtimes are supported.');

packages/aws-cdk-lib/aws-ec2/lib/security-group.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ export interface SecurityGroupProps {
280280
* Inlining rules is an optimization for producing smaller stack templates. Sometimes
281281
* this is not desirable, for example when security group access is managed via tags.
282282
*
283-
* The default value can be overriden globally by setting the context variable
283+
* The default value can be overridden globally by setting the context variable
284284
* '@aws-cdk/aws-ec2.securityGroupDisableInlineRules'.
285285
*
286286
* @default false

packages/aws-cdk-lib/aws-ecs/lib/external/external-service.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ export class ExternalService extends BaseService implements IExternalService {
123123
}
124124

125125
if (props.cluster.defaultCloudMapNamespace !== undefined) {
126-
throw new Error (`Cloud map integration is not supported for External service ${props.cluster.defaultCloudMapNamespace}`);
126+
throw new Error(`Cloud map integration is not supported for External service ${props.cluster.defaultCloudMapNamespace}`);
127127
}
128128

129129
if (props.cloudMapOptions !== undefined) {
130-
throw new Error ('Cloud map options are not supported for External service');
130+
throw new Error('Cloud map options are not supported for External service');
131131
}
132132

133133
if (props.capacityProviderStrategies !== undefined) {
134-
throw new Error ('Capacity Providers are not supported for External service');
134+
throw new Error('Capacity Providers are not supported for External service');
135135
}
136136

137137
const propagateTagsFromSource = props.propagateTags ?? PropagatedTagSource.NONE;
@@ -167,55 +167,55 @@ export class ExternalService extends BaseService implements IExternalService {
167167
}
168168

169169
/**
170-
* Overriden method to throw error as `attachToApplicationTargetGroup` is not supported for external service
170+
* Overridden method to throw error as `attachToApplicationTargetGroup` is not supported for external service
171171
*/
172172
@MethodMetadata()
173173
public attachToApplicationTargetGroup(_targetGroup: elbv2.IApplicationTargetGroup): elbv2.LoadBalancerTargetProps {
174174
throw new Error('Application load balancer cannot be attached to an external service');
175175
}
176176

177177
/**
178-
* Overriden method to throw error as `loadBalancerTarget` is not supported for external service
178+
* Overridden method to throw error as `loadBalancerTarget` is not supported for external service
179179
*/
180180
@MethodMetadata()
181181
public loadBalancerTarget(_options: LoadBalancerTargetOptions): IEcsLoadBalancerTarget {
182182
throw new Error('External service cannot be attached as load balancer targets');
183183
}
184184

185185
/**
186-
* Overriden method to throw error as `registerLoadBalancerTargets` is not supported for external service
186+
* Overridden method to throw error as `registerLoadBalancerTargets` is not supported for external service
187187
*/
188188
@MethodMetadata()
189189
public registerLoadBalancerTargets(..._targets: EcsTarget[]) {
190190
throw new Error('External service cannot be registered as load balancer targets');
191191
}
192192

193193
/**
194-
* Overriden method to throw error as `configureAwsVpcNetworkingWithSecurityGroups` is not supported for external service
194+
* Overridden method to throw error as `configureAwsVpcNetworkingWithSecurityGroups` is not supported for external service
195195
*/
196196
// eslint-disable-next-line max-len, no-unused-vars
197197
protected configureAwsVpcNetworkingWithSecurityGroups(_vpc: ec2.IVpc, _assignPublicIp?: boolean, _vpcSubnets?: ec2.SubnetSelection, _securityGroups?: ec2.ISecurityGroup[]) {
198-
throw new Error ('Only Bridge network mode is supported for external service');
198+
throw new Error('Only Bridge network mode is supported for external service');
199199
}
200200

201201
/**
202-
* Overriden method to throw error as `autoScaleTaskCount` is not supported for external service
202+
* Overridden method to throw error as `autoScaleTaskCount` is not supported for external service
203203
*/
204204
@MethodMetadata()
205205
public autoScaleTaskCount(_props: appscaling.EnableScalingProps): ScalableTaskCount {
206206
throw new Error('Autoscaling not supported for external service');
207207
}
208208

209209
/**
210-
* Overriden method to throw error as `enableCloudMap` is not supported for external service
210+
* Overridden method to throw error as `enableCloudMap` is not supported for external service
211211
*/
212212
@MethodMetadata()
213213
public enableCloudMap(_options: CloudMapOptions): cloudmap.Service {
214214
throw new Error('Cloud map integration not supported for an external service');
215215
}
216216

217217
/**
218-
* Overriden method to throw error as `associateCloudMapService` is not supported for external service
218+
* Overridden method to throw error as `associateCloudMapService` is not supported for external service
219219
*/
220220
@MethodMetadata()
221221
public associateCloudMapService(_options: AssociateCloudMapServiceOptions): void {

packages/aws-cdk-lib/aws-ecs/lib/external/external-task-definition.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class ExternalTaskDefinition extends TaskDefinition implements IExternalT
8585
}
8686

8787
/**
88-
* Overriden method to throw error as interface accelerators are not supported for external tasks
88+
* Overridden method to throw error as interface accelerators are not supported for external tasks
8989
*/
9090
@MethodMetadata()
9191
public addInferenceAccelerator(_inferenceAccelerator: InferenceAccelerator) {

packages/aws-cdk-lib/aws-s3/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ In a cross-account scenario, where the source and destination buckets are owned
10051005
For more information, please refer to https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication-walkthrough-2.html .
10061006
> **NOTE:** AWS managed keys don't allow cross-account use, and therefore can't be used to perform cross-account replication.
10071007
1008-
If you need to ovveride the bucket ownership to destination account pass the account value to the method to provide permissions to override bucket owner.
1008+
If you need to override the bucket ownership to destination account pass the account value to the method to provide permissions to override bucket owner.
10091009
`addReplicationPolicy(bucket.replicationRoleArn, true, '11111111111')`;
10101010

10111011

packages/aws-cdk-lib/aws-s3/lib/bucket.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ export interface IBucket extends IResource {
396396
* Function to add required permissions to the destination bucket for cross account
397397
* replication. These permissions will be added as a resource based policy on the bucket.
398398
* @see https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication-walkthrough-2.html
399-
* If owner of the bucket needs to be overriden, set accessControlTransition to true and provide
399+
* If owner of the bucket needs to be overridden, set accessControlTransition to true and provide
400400
* account ID in which destination bucket is hosted. For more information on accessControlTransition
401401
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-accesscontroltranslation.html
402402
*/
@@ -966,7 +966,7 @@ export abstract class BucketBase extends Resource implements IBucket {
966966
* Function to add required permissions to the destination bucket for cross account
967967
* replication. These permissions will be added as a resource based policy on the bucket
968968
* @see https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication-walkthrough-2.html
969-
* If owner of the bucket needs to be overriden, set accessControlTransition to true and provide
969+
* If owner of the bucket needs to be overridden, set accessControlTransition to true and provide
970970
* account ID in which destination bucket is hosted. For more information on accessControlTransition
971971
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-accesscontroltranslation.html
972972
*/

packages/aws-cdk-lib/aws-s3/test/notification.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ describe('notification', () => {
117117
}),
118118
});
119119

120-
// THEN - Following is warning throwen as a part of fix in : https://github.com/aws/aws-cdk/pull/31212
120+
// THEN - Following is warning thrown as a part of fix in : https://github.com/aws/aws-cdk/pull/31212
121121
const warningFromStack = Annotations.fromStack(stack).findWarning('*', {});
122122
expect(warningFromStack[0]?.entry?.data).toEqual(undefined);
123123
});
@@ -161,7 +161,7 @@ describe('notification', () => {
161161
}),
162162
});
163163

164-
// THEN - Following is warning throwen as a part of fix in : https://github.com/aws/aws-cdk/pull/31212
164+
// THEN - Following is warning thrown as a part of fix in : https://github.com/aws/aws-cdk/pull/31212
165165
const warningMessage = { 'Fn::Join': ['', ["Can't combine imported IManagedPolicy: arn:", { Ref: 'AWS::Partition' }, ':iam::aws:policy/service-role/AWSLambdaBasicExecutionRole to imported role IRole: DevsNotAllowedToTouch. Use ManagedPolicy directly. [ack: @aws-cdk/aws-iam:IRoleCantBeUsedWithIManagedPolicy]']] };
166166
const warningFromStack = Annotations.fromStack(stack).findWarning('*', {});
167167
expect(warningFromStack[0].entry.data).toEqual(warningMessage);
@@ -238,7 +238,7 @@ describe('notification', () => {
238238
}),
239239
});
240240

241-
// THEN - Following is warning throwen as a part of fix in : https://github.com/aws/aws-cdk/pull/31212
241+
// THEN - Following is warning thrown as a part of fix in : https://github.com/aws/aws-cdk/pull/31212
242242
const warningFromStack = Annotations.fromStack(stack).findWarning('*', {});
243243
expect(warningFromStack[0]?.entry?.data).toEqual(undefined);
244244
});

packages/aws-cdk-lib/cx-api/lib/features.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@ export const CURRENTLY_RECOMMENDED_FLAGS = Object.fromEntries(
14191419
/**
14201420
* The default values of each of these flags in the current major version.
14211421
*
1422-
* This is the effective value of the flag, unless it's overriden via
1422+
* This is the effective value of the flag, unless it's overridden via
14231423
* context.
14241424
*
14251425
* Adding new flags here is only allowed during the pre-release period of a new

0 commit comments

Comments
 (0)