Skip to content

Commit

Permalink
chore(docs): fix typos across the board (#13435)
Browse files Browse the repository at this point in the history
Fix bunch of docstring, docs and param typos. 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
robertd committed Mar 12, 2021
1 parent 46114bb commit 81cf548
Show file tree
Hide file tree
Showing 28 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-apigateway/lib/cors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export interface CorsOptions {
* Access-Control-Allow-Methods and Access-Control-Allow-Headers headers)
* can be cached.
*
* To disable caching altogther use `disableCache: true`.
* To disable caching altogether use `disableCache: true`.
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Max-Age
* @default - browser-specific (see reference)
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-apigateway/lib/gateway-response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export class ResponseType {
*/
public static readonly WAF_FILTERED = new ResponseType('WAF_FILTERED');

/** A custom response type to suppport future cases. */
/** A custom response type to support future cases. */
public static of(type: string): ResponseType {
return new ResponseType(type.toUpperCase());
}
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-apigateway/lib/resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,12 @@ export abstract class ResourceBase extends ResourceConstruct implements IResourc
// prepare responseParams

const integrationResponseParams: { [p: string]: string } = { };
const methodReponseParams: { [p: string]: boolean } = { };
const methodResponseParams: { [p: string]: boolean } = { };

for (const [name, value] of Object.entries(headers)) {
const key = `method.response.header.${name}`;
integrationResponseParams[key] = value;
methodReponseParams[key] = true;
methodResponseParams[key] = true;
}

return this.addMethod('OPTIONS', new MockIntegration({
Expand All @@ -297,7 +297,7 @@ export abstract class ResourceBase extends ResourceConstruct implements IResourc
],
}), {
methodResponses: [
{ statusCode: `${statusCode}`, responseParameters: methodReponseParams },
{ statusCode: `${statusCode}`, responseParameters: methodResponseParams },
],
});

Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-apigateway/lib/restapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export interface RestApiBaseProps {

/**
* Represents the props that all Rest APIs share.
* @deprecated - superceded by `RestApiBaseProps`
* @deprecated - superseded by `RestApiBaseProps`
*/
export interface RestApiOptions extends RestApiBaseProps, ResourceOptions {
}
Expand Down Expand Up @@ -441,7 +441,7 @@ export abstract class RestApiBase extends Resource implements IRestApi {
/**
* Metric for the total number API requests in a given period.
*
* Default: samplecount over 5 minutes
* Default: sample count over 5 minutes
*/
public metricCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric {
return this.cannedMetric(ApiGatewayMetrics.countSum, {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-apigateway/lib/usage-plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export class UsagePlan extends Resource {
public addApiKey(apiKey: IApiKey): void {
const prefix = 'UsagePlanKeyResource';

// Postfixing apikey id only from the 2nd child, to keep physicalIds of UsagePlanKey for existing CDK apps unmodifed.
// Postfixing apikey id only from the 2nd child, to keep physicalIds of UsagePlanKey for existing CDK apps unmodified.
const id = this.node.tryFindChild(prefix) ? `${prefix}:${Names.nodeUniqueId(apiKey.node)}` : prefix;

new CfnUsagePlanKey(this, id, {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-apigatewayv2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const api = new HttpApi(stack, 'HttpProxyProdApi', {
});
```

To associate a specifc `Stage` to a custom domain mapping -
To associate a specific `Stage` to a custom domain mapping -

```ts
api.addStage('beta', {
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-batch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const computeEnv = batch.ComputeEnvironment.fromComputeEnvironmentArn(this, 'imp

### Change the baseline AMI of the compute resources

Ocassionally, you will need to deviate from the default processing AMI.
Occasionally, you will need to deviate from the default processing AMI.

ECS Optimized Amazon Linux 2 example:

Expand Down Expand Up @@ -186,7 +186,7 @@ const jobQueue = new batch.JobQueue(stack, 'JobQueue', {
{
// Defines a collection of compute resources to handle assigned batch jobs
computeEnvironment,
// Order determines the allocation order for jobs (i.e. Lower means higher preferance for job assignment)
// Order determines the allocation order for jobs (i.e. Lower means higher preference for job assignment)
order: 1,
},
],
Expand Down
12 changes: 6 additions & 6 deletions packages/@aws-cdk/aws-batch/lib/exposed-secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ import * as ssm from '@aws-cdk/aws-ssm';
export class ExposedSecret {
/**
* Use Secrets Manager Secret
* @param optionaName - The name of the option
* @param optionName - The name of the option
* @param secret - A secret from secrets manager
*/
public static fromSecretsManager(optionaName: string, secret: secretsmanager.ISecret): ExposedSecret {
return new ExposedSecret(optionaName, secret.secretArn);
public static fromSecretsManager(optionName: string, secret: secretsmanager.ISecret): ExposedSecret {
return new ExposedSecret(optionName, secret.secretArn);
}

/**
* User Parameters Store Parameter
* @param optionaName - The name of the option
* @param optionName - The name of the option
* @param parameter - A parameter from parameters store
*/
public static fromParametersStore(optionaName: string, parameter: ssm.IParameter): ExposedSecret {
return new ExposedSecret(optionaName, parameter.parameterArn);
public static fromParametersStore(optionName: string, parameter: ssm.IParameter): ExposedSecret {
return new ExposedSecret(optionName, parameter.parameterArn);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class TaskDefinition {
}

/**
* Internal function to allow the Batch Job task defintion
* Internal function to allow the Batch Job task definition
* to match the CDK requirements of an EC2 task definition.
*
* @internal
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-certificatemanager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ new acm.Certificate(this, 'Certificate', {
## Cross-region Certificates

ACM certificates that are used with CloudFront -- or higher-level constructs which rely on CloudFront -- must be in the `us-east-1` region.
The `DnsValidatedCertificate` construct exists to faciliate creating these certificates cross-region. This resource can only be used with
The `DnsValidatedCertificate` construct exists to facilitate creating these certificates cross-region. This resource can only be used with
Route53-based DNS validation.

```ts
Expand Down
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-certificatemanager/lib/certificate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface CertificateProps {
readonly validationMethod?: ValidationMethod;

/**
* How to validate this certifcate
* How to validate this certificate
*
* @default CertificateValidation.fromEmail()
*/
Expand Down Expand Up @@ -100,7 +100,7 @@ export interface CertificationValidationProps {
*/
export class CertificateValidation {
/**
* Validate the certifcate with DNS
* Validate the certificate with DNS
*
* IMPORTANT: If `hostedZone` is not specified, DNS records must be added
* manually and the stack will not complete creating until the records are
Expand All @@ -116,7 +116,7 @@ export class CertificateValidation {
}

/**
* Validate the certifcate with automatically created DNS records in multiple
* Validate the certificate with automatically created DNS records in multiple
* Amazon Route 53 hosted zones.
*
* @param hostedZones a map of hosted zones where DNS records must be created
Expand All @@ -130,7 +130,7 @@ export class CertificateValidation {
}

/**
* Validate the certifcate with Email
* Validate the certificate with Email
*
* IMPORTANT: if you are creating a certificate as part of your stack, the stack
* will not complete creating until you read and follow the instructions in the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface DnsValidatedCertificateProps extends CertificateProps {
* aws-cn partition, the default endpoint is not working now, hence the right endpoint
* need to be specified through this prop.
*
* Route53 is not been offically launched in China, it is only available for AWS
* Route53 is not been officially launched in China, it is only available for AWS
* internal accounts now. To make DnsValidatedCertificate work for internal accounts
* now, a special endpoint needs to be provided.
*
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-dynamodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.Read

You can have DynamoDB automatically raise and lower the read and write capacities
of your table by setting up autoscaling. You can use this to either keep your
tables at a desired utilization level, or by scaling up and down at preconfigured
tables at a desired utilization level, or by scaling up and down at pre-configured
times of the day:

Auto-scaling is only relevant for tables with the billing mode, PROVISIONED.
Expand Down Expand Up @@ -125,7 +125,7 @@ const globalTable = new dynamodb.Table(this, 'Table', {
All user data stored in Amazon DynamoDB is fully encrypted at rest. When creating a new table, you can choose to encrypt using the following customer master keys (CMK) to encrypt your table:

* AWS owned CMK - By default, all tables are encrypted under an AWS owned customer master key (CMK) in the DynamoDB service account (no additional charges apply).
* AWS managed CMK - AWS KMS keys (one per region) are created in your account, managed, and used on your behalf by AWS DynamoDB (AWS KMS chages apply).
* AWS managed CMK - AWS KMS keys (one per region) are created in your account, managed, and used on your behalf by AWS DynamoDB (AWS KMS charges apply).
* Customer managed CMK - You have full control over the KMS key used to encrypt the DynamoDB Table (AWS KMS charges apply).

Creating a Table encrypted with a customer managed CMK:
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-dynamodb/lib/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,7 @@ export class Table extends TableBase {

if (encryptionType === undefined) {
encryptionType = props.encryptionKey != null
// If there is a configured encyptionKey, the encryption is implicitly CUSTOMER_MANAGED
// If there is a configured encryptionKey, the encryption is implicitly CUSTOMER_MANAGED
? TableEncryption.CUSTOMER_MANAGED
// Otherwise, if severSideEncryption is enabled, it's AWS_MANAGED; else undefined (do not set anything)
: props.serverSideEncryption ? TableEncryption.AWS_MANAGED : undefined;
Expand Down Expand Up @@ -1613,7 +1613,7 @@ export enum AttributeType {
}

/**
* DyanmoDB's Read/Write capacity modes.
* DynamoDB's Read/Write capacity modes.
*/
export enum BillingMode {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ec2/lib/launch-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ export class LaunchTemplate extends Resource implements ILaunchTemplate, iam.IGr
*/
public get connections(): Connections {
if (!this._connections) {
throw new Error('LaunchTemplate can only be used as IConnectable if a securityGroup is provided when contructing it.');
throw new Error('LaunchTemplate can only be used as IConnectable if a securityGroup is provided when constructing it.');
}
return this._connections;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-ec2/lib/network-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,15 @@ export class CidrBlock {
}

/*
* The maximum IP in the CIDR Blcok e.g. '10.0.8.255'
* The maximum IP in the CIDR Block e.g. '10.0.8.255'
*/
public maxIp(): string {
// min + (2^(32-mask)) - 1 [zero needs to count]
return NetworkUtils.numToIp(this.maxAddress());
}

/*
* The minimum IP in the CIDR Blcok e.g. '10.0.0.0'
* The minimum IP in the CIDR Block e.g. '10.0.0.0'
*/
public minIp(): string {
return NetworkUtils.numToIp(this.minAddress());
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ec2/lib/vpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,7 @@ export class Subnet extends Resource implements ISubnet {
}

/**
* Adds an entry to this subnets route table that points to the passed NATGatwayId
* Adds an entry to this subnets route table that points to the passed NATGatewayId
* @param natGatewayId The ID of the NAT gateway
*/
public addDefaultNatRoute(natGatewayId: string) {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda/lib/alias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export class Alias extends QualifiedFunctionBase implements IAlias {
}

public metric(metricName: string, props: cloudwatch.MetricOptions = {}): cloudwatch.Metric {
// Metrics on Aliases need the "bare" function name, and the alias' ARN, this differes from the base behavior.
// Metrics on Aliases need the "bare" function name, and the alias' ARN, this differs from the base behavior.
return super.metric(metricName, {
dimensions: {
FunctionName: this.lambda.functionName,
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda/lib/code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export abstract class Code {
/**
* Loads the function code from an asset created by a Docker build.
*
* By defaut, the asset is expected to be located at `/asset` in the
* By default, the asset is expected to be located at `/asset` in the
* image.
*
* @param path The path to the directory containing the Docker file
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-lambda/lib/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export interface FunctionOptions extends EventInvokeConfigOptions {
/**
* A list of layers to add to the function's execution environment. You can configure your Lambda function to pull in
* additional code during initialization in the form of layers. Layers are packages of libraries or other dependencies
* that can be used by mulitple functions.
* that can be used by multiple functions.
*
* @default - No layers.
*/
Expand Down Expand Up @@ -563,7 +563,7 @@ export class Function extends FunctionBase {
});
this.grantPrincipal = this.role;

// add additonal managed policies when necessary
// add additional managed policies when necessary
if (props.filesystem) {
const config = props.filesystem.config;
if (config.policies) {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda/lib/lambda-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class Version extends QualifiedFunctionBase implements IVersion {
}

public metric(metricName: string, props: cloudwatch.MetricOptions = {}): cloudwatch.Metric {
// Metrics on Aliases need the "bare" function name, and the alias' ARN, this differes from the base behavior.
// Metrics on Aliases need the "bare" function name, and the alias' ARN, this differs from the base behavior.
return super.metric(metricName, {
dimensions: {
FunctionName: this.lambda.functionName,
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-route53/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ This DNS name can also be guaranteed to match up with the backend certificate.

Before consumers can use the private DNS name, you must verify that you have control of the domain/subdomain.

Assuming your account has ownership of the particlar domain/subdomain,
Assuming your account has ownership of the particular domain/subdomain,
this construct sets up the private DNS configuration on the endpoint service,
creates all the necessary Route53 entries, and verifies domain ownership.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export class VpcEndpointServiceDomainName extends CoreConstruct {

// Create the custom resource to look up the name/value pair generated by AWS
// after the previous API call
const retriveNameValuePairAction = {
const retrieveNameValuePairAction = {
service: 'EC2',
action: 'describeVpcEndpointServiceConfigurations',
parameters: {
Expand All @@ -147,8 +147,8 @@ export class VpcEndpointServiceDomainName extends CoreConstruct {
physicalResourceId: PhysicalResourceId.of(lookup),
};
const getNames = new AwsCustomResource(this, 'GetNames', {
onCreate: retriveNameValuePairAction,
onUpdate: retriveNameValuePairAction,
onCreate: retrieveNameValuePairAction,
onUpdate: retrieveNameValuePairAction,
// describeVpcEndpointServiceConfigurations can't take an ARN for granular permissions
policy: AwsCustomResourcePolicy.fromSdkCalls({
resources: AwsCustomResourcePolicy.ANY_RESOURCE,
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-s3-assets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const asset = new assets.Asset(this, 'BundledAsset', {
```

Use `BundlingOutput.ARCHIVED` if the bundling output contains a single archive file and
you don't want it to be zippped.
you don't want it to be zipped.

## CloudFormation Resource Metadata

Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-s3/lib/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export interface IBucket extends IResource {
grantPutAcl(identity: iam.IGrantable, objectsKeyPattern?: string): iam.Grant;

/**
* Grants s3:DeleteObject* permission to an IAM pricipal for objects
* Grants s3:DeleteObject* permission to an IAM principal for objects
* in this bucket.
*
* @param identity The principal
Expand Down Expand Up @@ -628,7 +628,7 @@ abstract class BucketBase extends Resource implements IBucket {
}

/**
* Grants s3:DeleteObject* permission to an IAM pricipal for objects
* Grants s3:DeleteObject* permission to an IAM principal for objects
* in this bucket.
*
* @param identity The principal
Expand Down Expand Up @@ -1620,7 +1620,7 @@ export class Bucket extends BucketBase {
}

/**
* Parse the lifecycle configuration out of the uucket props
* Parse the lifecycle configuration out of the bucket props
* @param props Par
*/
private parseLifecycleConfiguration(): CfnBucket.LifecycleConfigurationProperty | undefined {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-stepfunctions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ parallel.next(closeOrder);
### Succeed

Reaching a `Succeed` state terminates the state machine execution with a
succesful status.
successful status.

```ts
const success = new sfn.Succeed(this, 'We did it!');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export interface StepFunctionsTaskConfig {
* Three ways to call an integrated service: Request Response, Run a Job and Wait for a Callback with Task Token.
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html
*
* Here, they are named as FIRE_AND_FORGET, SYNC and WAIT_FOR_TASK_TOKEN respectly.
* Here, they are named as FIRE_AND_FORGET, SYNC and WAIT_FOR_TASK_TOKEN respectfully.
*
* @default FIRE_AND_FORGET
*/
Expand All @@ -100,7 +100,7 @@ export enum ServiceIntegrationPattern {
SYNC = 'SYNC',

/**
* Call a service with a task token and wait until that token is returned by SendTaskSuccess/SendTaskFailure with paylaod
* Call a service with a task token and wait until that token is returned by SendTaskSuccess/SendTaskFailure with payload.
*/
WAIT_FOR_TASK_TOKEN = 'WAIT_FOR_TASK_TOKEN'
}
Loading

0 comments on commit 81cf548

Please sign in to comment.