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

fix(ecs): fix typo from fromServiceAtrributes to fromServiceAttributes #20456

Merged
merged 7 commits into from
May 28, 2022
Merged
Show file tree
Hide file tree
Changes from 6 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
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface ServiceAttributes {
readonly serviceName?: string;
}

export function fromServiceAtrributes(scope: Construct, id: string, attrs: ServiceAttributes): IBaseService {
export function fromServiceAttributes(scope: Construct, id: string, attrs: ServiceAttributes): IBaseService {
if ((attrs.serviceArn && attrs.serviceName) || (!attrs.serviceArn && !attrs.serviceName)) {
throw new Error('You can only specify either serviceArn or serviceName.');
}
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as ec2 from '@aws-cdk/aws-ec2';
import { ArnFormat, Lazy, Resource, Stack } from '@aws-cdk/core';
import { Construct } from 'constructs';
import { BaseService, BaseServiceOptions, DeploymentControllerType, IBaseService, IService, LaunchType } from '../base/base-service';
import { fromServiceAtrributes } from '../base/from-service-attributes';
import { fromServiceAttributes } from '../base/from-service-attributes';
import { NetworkMode, TaskDefinition } from '../base/task-definition';
import { ICluster } from '../cluster';
import { CfnService } from '../ecs.generated';
Expand Down Expand Up @@ -134,10 +134,10 @@ export class Ec2Service extends BaseService implements IEc2Service {
}

/**
* Imports from the specified service attrributes.
* Imports from the specified service attributes.
*/
public static fromEc2ServiceAttributes(scope: Construct, id: string, attrs: Ec2ServiceAttributes): IBaseService {
return fromServiceAtrributes(scope, id, attrs);
return fromServiceAttributes(scope, id, attrs);
}

private readonly constraints: CfnService.PlacementConstraintProperty[];
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-ecs/lib/external/external-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as cloudmap from '@aws-cdk/aws-servicediscovery';
import { ArnFormat, Resource, Stack } from '@aws-cdk/core';
import { Construct } from 'constructs';
import { AssociateCloudMapServiceOptions, BaseService, BaseServiceOptions, CloudMapOptions, DeploymentControllerType, EcsTarget, IBaseService, IEcsLoadBalancerTarget, IService, LaunchType, PropagatedTagSource } from '../base/base-service';
import { fromServiceAtrributes } from '../base/from-service-attributes';
import { fromServiceAttributes } from '../base/from-service-attributes';
import { ScalableTaskCount } from '../base/scalable-task-count';
import { Compatibility, LoadBalancerTargetOptions, TaskDefinition } from '../base/task-definition';
import { ICluster } from '../cluster';
Expand Down Expand Up @@ -79,10 +79,10 @@ export class ExternalService extends BaseService implements IExternalService {
}

/**
* Imports from the specified service attrributes.
* Imports from the specified service attributes.
*/
public static fromExternalServiceAttributes(scope: Construct, id: string, attrs: ExternalServiceAttributes): IBaseService {
return fromServiceAtrributes(scope, id, attrs);
return fromServiceAttributes(scope, id, attrs);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as cdk from '@aws-cdk/core';
import { ArnFormat } from '@aws-cdk/core';
import { Construct } from 'constructs';
import { BaseService, BaseServiceOptions, DeploymentControllerType, IBaseService, IService, LaunchType } from '../base/base-service';
import { fromServiceAtrributes } from '../base/from-service-attributes';
import { fromServiceAttributes } from '../base/from-service-attributes';
import { TaskDefinition } from '../base/task-definition';
import { ICluster } from '../cluster';

Expand Down Expand Up @@ -111,10 +111,10 @@ export class FargateService extends BaseService implements IFargateService {
}

/**
* Imports from the specified service attrributes.
* Imports from the specified service attributes.
*/
public static fromFargateServiceAttributes(scope: Construct, id: string, attrs: FargateServiceAttributes): IBaseService {
return fromServiceAtrributes(scope, id, attrs);
return fromServiceAttributes(scope, id, attrs);
}

/**
Expand Down