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

Feat/aws actions #171

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions libs/aws-cdk-stack/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './lib/stacks';
export * from './lib/types';
export * from './lib/actions'
111 changes: 111 additions & 0 deletions libs/aws-cdk-stack/src/lib/actions/athena-actions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
export class AthenaActions {
// list actions
static readonly ListApplicationDPUSizes = 'athena:ListApplicationDPUSizes';
static readonly ListCalculationExecutions =
'athena:ListCalculationExecutions';
static readonly ListCapacityReservations = 'athena:ListCapacityReservations';
static readonly ListDatabases = 'athena:ListDatabases';
static readonly ListDataCatalogs = 'athena:ListDataCatalogs';
static readonly ListExecutors = 'athena:ListExecutors';
static readonly ListNamedQueries = 'athena:ListNamedQueries';
static readonly ListNotebookMetadata = 'athena:ListNotebookMetadata';
static readonly ListNotebookSessions = 'athena:ListNotebookSessions';
static readonly ListPreparedStatements = 'athena:ListPreparedStatements';
static readonly ListSessions = 'athena:ListSessions';
static readonly ListWorkGroups = 'athena:ListWorkGroups';

// read actions
static readonly BatchGetNamedQuery = 'athena:BatchGetNamedQuery';
static readonly BatchGetPreparedStatement =
'athena:BatchGetPreparedStatement';
static readonly BatchGetQueryExecution = 'athena:BatchGetQueryExecution';
static readonly GetCalculationExecution = 'athena:GetCalculationExecution';
static readonly GetCalculationExecutionCode =
'athena:GetCalculationExecutionCode';
static readonly GetCalculationExecutionStatus =
'athena:GetCalculationExecutionStatus';
static readonly GetCapacityAssignmentConfiguration =
'athena:GetCapacityAssignmentConfiguration';
static readonly GetCapacityReservation = 'athena:GetCapacityReservation';
static readonly GetCatalogs = 'athena:GetCatalogs';
static readonly GetDatabase = 'athena:GetDatabase';
static readonly GetDataCatalog = 'athena:GetDataCatalog';
static readonly GetExecutionEngine = 'athena:GetExecutionEngine';
static readonly GetExecutionEngines = 'athena:GetExecutionEngines';
static readonly GetNamedQuery = 'athena:GetNamedQuery';
static readonly GetNamespace = 'athena:GetNamespace';
static readonly GetNamespaces = 'athena:GetNamespaces';
static readonly GetNotebookMetadata = 'athena:GetNotebookMetadata';
static readonly GetPreparedStatement = 'athena:GetPreparedStatement';
static readonly GetQueryExecution = 'athena:GetQueryExecution';
static readonly GetQueryExecutions = 'athena:GetQueryExecutions';
static readonly GetQueryResults = 'athena:GetQueryResults';
static readonly GetQueryResultsStream = 'athena:GetQueryResultsStream';
static readonly GetQueryRuntimeStatistics =
'athena:GetQueryRuntimeStatistics';
static readonly GetSession = 'athena:GetSession';
static readonly GetSessionStatus = 'athena:GetSessionStatus';
static readonly GetTable = 'athena:GetTable';
static readonly GetTables = 'athena:GetTables';
static readonly GetTableMetadata = 'athena:GetTableMetadata';
static readonly GetWorkGroup = 'athena:GetWorkGroup';
static readonly ListEngineVersions = 'athena:ListEngineVersions';
static readonly ListQueryExecutions = 'athena:ListQueryExecutions';
static readonly ListTableMetadata = 'athena:ListTableMetadata';
static readonly ListTagsForResource = 'athena:ListTagsForResource';

// write actions
static readonly CancelCapacityReservation =
'athena:CancelCapacityReservation';
static readonly CancelQueryExecution = 'athena:CancelQueryExecution';
static readonly CreateCapacityReservation =
'athena:CreateCapacityReservation';
static readonly CreateDataCatalog = 'athena:CreateDataCatalog';
static readonly CreateNamedQuery = 'athena:CreateNamedQuery';
static readonly CreateNotebook = 'athena:CreateNotebook';
static readonly CreatePreparedStatement = 'athena:CreatePreparedStatement';
static readonly CreatePresignedNotebookUrl =
'athena:CreatePresignedNotebookUrl';
static readonly CreateWorkGroup = 'athena:CreateWorkGroup';
static readonly DeleteCapacityReservation =
'athena:DeleteCapacityReservation';
static readonly DeleteDataCatalog = 'athena:DeleteDataCatalog';
static readonly DeleteNamedQuery = 'athena:DeleteNamedQuery';
static readonly DeleteNotebook = 'athena:DeleteNotebook';
static readonly DeletePreparedStatement = 'athena:DeletePreparedStatement';
static readonly DeleteWorkGroup = 'athena:DeleteWorkGroup';
static readonly ExportNotebook = 'athena:ExportNotebook';
static readonly ImportNotebook = 'athena:ImportNotebook';
static readonly PutCapacityAssignmentConfiguration =
'athena:PutCapacityAssignmentConfiguration';
static readonly RunQuery = 'athena:RunQuery';
static readonly StartCalculationExecution =
'athena:StartCalculationExecution';
static readonly StartQueryExecution = 'athena:StartQueryExecution';
static readonly StartSession = 'athena:StartSession';
static readonly StopCalculationExecution = 'athena:StopCalculationExecution';
static readonly StopQueryExecution = 'athena:StopQueryExecution';
static readonly TerminateSession = 'athena:TerminateSession';
static readonly UpdateCapacityReservation =
'athena:UpdateCapacityReservation';
static readonly UpdateDataCatalog = 'athena:UpdateDataCatalog';
static readonly UpdateNamedQuery = 'athena:UpdateNamedQuery';
static readonly UpdateNotebook = 'athena:UpdateNotebook';
static readonly UpdateNotebookMetadata = 'athena:UpdateNotebookMetadata';
static readonly UpdatePreparedStatement = 'athena:UpdatePreparedStatement';
static readonly UpdateWorkGroup = 'athena:UpdateWorkGroup';

// tag actions
static readonly TagResource = 'athena:TagResource';
static readonly UntagResource = 'athena:UntagResource';

// start actions
static readonly ListAll = 'athena:List*';
static readonly GetAll = 'athena:Get*';
static readonly CancelAll = 'athena:Cancel*';
static readonly CreateAll = 'athena:Create*';
static readonly DeleteAll = 'athena:Delete*';
static readonly StartAll = 'athena:Start*';
static readonly StopAll = 'athena:Stop*';
static readonly UpdateAll = 'athena:Update*';
}
28 changes: 28 additions & 0 deletions libs/aws-cdk-stack/src/lib/actions/certificate-manager-actions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export class CertificateManagerActions {
// list actions
static readonly ListCertificates = 'acm:ListCertificates';

// read actions
static readonly DescribeCertificate = 'acm:DescribeCertificate';
static readonly ExportCertificate = 'acm:ExportCertificate';
static readonly GetAccountConfiguration = 'acm:GetAccountConfiguration';
static readonly GetCertificate = 'acm:GetCertificate';
static readonly ListTagsForCertificate = 'acm:ListTagsForCertificate';

// write actions
static readonly DeleteCertificate = 'acm:DeleteCertificate';
static readonly ImportCertificate = 'acm:ImportCertificate';
static readonly PutAccountConfiguration = 'acm:PutAccountConfiguration';
static readonly RenewCertificate = 'acm:RenewCertificate';
static readonly RequestCertificate = 'acm:RequestCertificate';
static readonly ResendValidationEmail = 'acm:ResendValidationEmail';
static readonly UpdateCertificateOptions = 'acm:UpdateCertificateOptions';

// tag actions
static readonly AddTagsToCertificate = 'acm:AddTagsToCertificate';
static readonly RemoveTagsFromCertificate = 'acm:RemoveTagsFromCertificate';

// star actions
static readonly GetAll = 'acm:Get*';
static readonly ListAll = 'acm:List*';
}
3 changes: 3 additions & 0 deletions libs/aws-cdk-stack/src/lib/actions/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './lambda-actions'
export * from './certificate-manager-actions'
export * from './athena-actions'
131 changes: 131 additions & 0 deletions libs/aws-cdk-stack/src/lib/actions/lambda-actions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
export class LambdaActions {
// list actions
static readonly ListAliases = 'lambda:ListAliases';
static readonly ListCodeSigningConfigs = 'lambda:ListCodeSigningConfigs';
static readonly ListEventSourceMappings = 'lambda:ListEventSourceMappings';
static readonly ListFunctionEventInvokeConfigs = 'lambda:ListFunctionEventInvokeConfigs';
static readonly ListFunctions = 'lambda:ListFunctions';
static readonly ListFunctionsByCodeSigningConfig = 'lambda:ListFunctionsByCodeSigningConfig';
static readonly ListFunctionUrlConfigs = 'lambda:ListFunctionUrlConfigs';
static readonly ListLayers = 'lambda:ListLayers';
static readonly ListLayerVersions = 'lambda:ListLayerVersions';
static readonly ListProvisionedConcurrencyConfigs = 'lambda:ListProvisionedConcurrencyConfigs';
static readonly ListVersionsByFunction = 'lambda:ListVersionsByFunction';

// read actions
static readonly ListTags = 'lambda:ListTags';
static readonly GetAccountSettings = 'lambda:GetAccountSettings';
static readonly GetAlias = 'lambda:GetAlias';
static readonly GetCodeSigningConfig = 'lambda:GetCodeSigningConfig';
static readonly GetEventSourceMapping = 'lambda:GetEventSourceMapping';
static readonly GetFunction = 'lambda:GetFunction';
static readonly GetFunctionCodeSigningConfig = 'lambda:GetFunctionCodeSigningConfig';
static readonly GetFunctionConcurrency = 'lambda:GetFunctionConcurrency';
static readonly GetFunctionConfiguration = 'lambda:GetFunctionConfiguration';
static readonly GetFunctionEventInvokeConfig = 'lambda:GetFunctionEventInvokeConfig';
static readonly GetFunctionRecursionConfig = 'lambda:GetFunctionRecursionConfig';
static readonly GetFunctionUrlConfig = 'lambda:GetFunctionUrlConfig';
static readonly GetLayerVersion = 'lambda:GetLayerVersion';
static readonly GetLayerVersionByArn = 'lambda:GetLayerVersionByArn';
static readonly GetLayerVersionPolicy = 'lambda:GetLayerVersionPolicy';
static readonly GetPolicy = 'lambda:GetPolicy';
static readonly GetProvisionedConcurrencyConfig = 'lambda:GetProvisionedConcurrencyConfig';
static readonly GetRuntimeManagementConfig = 'lambda:GetRuntimeManagementConfig';

// write actions
static readonly CreateAlias = 'lambda:CreateAlias';
static readonly CreateCodeSigningConfig = 'lambda:CreateCodeSigningConfig';
static readonly CreateEventSourceMapping = 'lambda:CreateEventSourceMapping';
static readonly CreateFunction = 'lambda:CreateFunction';
static readonly CreateFunctionUrlConfig = 'lambda:CreateFunctionUrlConfig';
static readonly DeleteAlias = 'lambda:DeleteAlias';
static readonly DeleteCodeSigningConfig = 'lambda:DeleteCodeSigningConfig';
static readonly DeleteEventSourceMapping = 'lambda:DeleteEventSourceMapping';
static readonly DeleteFunction = 'lambda:DeleteFunction';
static readonly DeleteFunctionCodeSigningConfig = 'lambda:DeleteFunctionCodeSigningConfig';
static readonly DeleteFunctionConcurrency = 'lambda:DeleteFunctionConcurrency';
static readonly DeleteFunctionEventInvokeConfig = 'lambda:DeleteFunctionEventInvokeConfig';
static readonly DeleteFunctionUrlConfig = 'lambda:DeleteFunctionUrlConfig';
static readonly DeleteLayerVersion = 'lambda:DeleteLayerVersion';
static readonly DeleteProvisionedConcurrencyConfig = 'lambda:DeleteProvisionedConcurrencyConfig';
static readonly Invoke = 'lambda:Invoke';
static readonly InvokeAsync = 'lambda:InvokeAsync';
static readonly InvokeFuction = 'lambda:InvokeFuction';
static readonly InvokeFuctionUrl = 'lambda:InvokeFuctionUrl';
static readonly InvokeWithResponseStream = 'lambda:InvokeWithResponseStream';
static readonly PublishLayerVersion = 'lambda:PublishLayerVersion';
static readonly PublishVersion = 'lambda:PublishVersion';
static readonly PutFunctionCodeSigningConfig = 'lambda:PutFunctionCodeSigningConfig';
static readonly PutFunctionConcurrency = 'lambda:PutFunctionConcurrency';
static readonly PutFunctionEventInvokeConfig = 'lambda:PutFunctionEventInvokeConfig';
static readonly PutFunctionRecursionConfig = 'lambda:PutFunctionRecursionConfig';
static readonly PutProvisionedConcurrencyConfig = 'lambda:PutProvisionedConcurrencyConfig';
static readonly PutRuntimeManagementConfig = 'lambda:PutRuntimeManagementConfig';
static readonly UpdateAlias = 'lambda:UpdateAlias';
static readonly UpdateCodeSigningConfig = 'lambda:UpdateCodeSigningConfig';
static readonly UpdateEventSourceMapping = 'lambda:UpdateEventSourceMapping';
static readonly UpdateFunctionCode = 'lambda:UpdateFunctionCode';
static readonly UpdateFunctionCodeSigningConfig = 'lambda:UpdateFunctionCodeSigningConfig';
static readonly UpdateFunctionConfiguration = 'lambda:UpdateFunctionConfiguration';
static readonly UpdateFunctionEventInvokeConfig = 'lambda:UpdateFunctionEventInvokeConfig';
static readonly UpdateFunctionUrlConfig = 'lambda:UpdateFunctionUrlConfig';

// permissions
static readonly AddLayerVersionPermission = 'lambda:AddLayerVersionPermission';
static readonly AddPermission = 'lambda:AddPermission';
static readonly DisableReplication = 'lambda:DisableReplication';
static readonly EnableReplication = 'lambda:EnableReplication';
static readonly RemoveLayerVersionPermission = 'lambda:RemoveLayerVersionPermission';
static readonly RemovePermission = 'lambda:RemovePermission';

// tag actions
static readonly TagResource = 'lambda:TagResource';
static readonly UntagResource = 'lambda:UntagResource';

// star actions
static readonly AddAll = 'lambda:Add*';
static readonly CreateAll = 'lambda:Create*';
static readonly DeleteAll = 'lambda:Delete*';
static readonly GetAll = 'lambda:Get*';
static readonly InvokeAll = 'lambda:Invoke*';
static readonly PublishAll = 'lambda:Publish*';
static readonly ListAll = 'lambda:List*';
static readonly PutAll = 'lambda:Put*';
static readonly RemoveAll = 'lambda:Remove*';
static readonly UpdateAll = 'lambda:Update*';
static readonly All = 'lambda:*';

static get ViewActions() {
return [
this.ListAll,
this.GetAll,
];
}

static get WriteActions() {
return [
this.CreateAll,
this.DeleteAll,
this.InvokeAll,
this.PublishAll,
this.PutAll,
this.UpdateAll
];
}

static get PermissionsActions() {
return [
this.AddAll,
this.DisableReplication,
this.EnableReplication,
this.RemoveAll
]
}

static get TagActions() {
return [
this.TagResource,
this.UntagResource
]
}
}
Loading