Skip to content

Commit

Permalink
feat: add some fixes for operational preferences option
Browse files Browse the repository at this point in the history
Adding some fixes for operatinal preferences option
  • Loading branch information
allcloud-sahar-hagbi committed Sep 24, 2024
1 parent 90d014e commit 995a0a3
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
17 changes: 17 additions & 0 deletions source/packages/@aws-accelerator/config/lib/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,23 @@ export class Tag implements ITag {
readonly value: string = '';
}

export interface IOperationPreferences {
failureToleranceCount?: number;
failureTolerancePercentage?: number;
maxConcurrentCount?: number;
maxConcurrentPercentage?: number;
regionConcurrencyType?: string;
regionOrder?: string[];
}
export class OperationPreferences implements IOperationPreferences {
readonly failureToleranceCount: number | undefined = undefined;
readonly failureTolerancePercentage: number = 25;
readonly maxConcurrentCount: number | undefined = undefined;
readonly maxConcurrentPercentage: number = 35;
readonly regionConcurrencyType: string = 'PARALLEL';
readonly regionOrder: string[] | undefined = undefined;
}

export interface ICfnParameter {
name: string;
value: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export class CloudFormationStackSetConfig implements i.ICloudFormationStackSet {
readonly regions: t.Region[] = ['us-east-1'];
readonly template: string = '';
readonly parameters: t.CfnParameter[] | undefined = undefined;
readonly operationPreferences: t.OperationPreferences | undefined = undefined;
}

export class AlbListenerFixedResponseConfig implements i.IAlbListenerFixedResponseConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1553,6 +1553,10 @@ export interface ICloudFormationStackSet {
* The parameters to be passed to the stackset.
*/
readonly parameters?: t.ICfnParameter[];
/**
* The operational preferences of current stackset
*/
readonly operationPreferences?: t.IOperationPreferences;
}

export type PortfolioAssociationType = 'User' | 'Group' | 'Role' | 'PermissionSet';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,10 @@
"$ref": "#/definitions/NonEmptyString",
"description": "The friendly name that will be used as a base for the created CloudFormation StackSet Name. The name should not contain any spaces as this isn't supported by the Accelerator."
},
"operationPreferences": {
"$ref": "#/definitions/IOperationPreferences",
"description": "The operational preferences of current stackset"
},
"parameters": {
"description": "The parameters to be passed to the stackset.",
"items": {
Expand Down Expand Up @@ -1045,6 +1049,33 @@
],
"type": "object"
},
"IOperationPreferences": {
"additionalProperties": false,
"properties": {
"failureToleranceCount": {
"type": "number"
},
"failureTolerancePercentage": {
"type": "number"
},
"maxConcurrentCount": {
"type": "number"
},
"maxConcurrentPercentage": {
"type": "number"
},
"regionConcurrencyType": {
"type": "string"
},
"regionOrder": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"IPortfolioAssociatoinConfig": {
"additionalProperties": false,
"description": "Portfolio Associations configuration",
Expand Down

0 comments on commit 995a0a3

Please sign in to comment.