From d4ae43cb8f006cfad89edac7b9a9e8bec56ad17d Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Sun, 23 May 2021 22:31:23 +0000 Subject: [PATCH] Action Update 2021-20 --- awacs/application_cost_profiler.py | 30 ++++++++++++++++++ awacs/apprunner.py | 47 ++++++++++++++++++++++++++++ awacs/autoscaling.py | 3 ++ awacs/elasticfilesystem.py | 2 ++ awacs/es.py | 6 ++++ awacs/forecast.py | 1 + awacs/helpers/trust.py | 14 ++++----- awacs/iotdeviceadvisor.py | 1 + awacs/license_manager.py | 5 +++ awacs/secretsmanager.py | 3 ++ awacs/ssm_contacts.py | 50 ++++++++++++++++++++++++++++++ awacs/ssm_incidents.py | 28 +++++++++++++++++ awacs/workmail.py | 5 +++ 13 files changed, 188 insertions(+), 7 deletions(-) create mode 100644 awacs/application_cost_profiler.py create mode 100644 awacs/apprunner.py create mode 100644 awacs/ssm_contacts.py diff --git a/awacs/application_cost_profiler.py b/awacs/application_cost_profiler.py new file mode 100644 index 00000000..b3ee3be3 --- /dev/null +++ b/awacs/application_cost_profiler.py @@ -0,0 +1,30 @@ +# Copyright (c) 2012-2021, Mark Peek +# All rights reserved. +# +# See LICENSE file for full license. + +from .aws import Action as BaseAction +from .aws import BaseARN + +service_name = "AWS Application Cost Profiler Service" +prefix = "application-cost-profiler" + + +class Action(BaseAction): + def __init__(self, action: str = None) -> None: + super().__init__(prefix, action) + + +class ARN(BaseARN): + def __init__(self, resource: str = "", region: str = "", account: str = "") -> None: + super().__init__( + service=prefix, resource=resource, region=region, account=account + ) + + +DeleteReportDefinition = Action("DeleteReportDefinition") +GetReportDefinition = Action("GetReportDefinition") +ImportApplicationUsage = Action("ImportApplicationUsage") +ListReportDefinitions = Action("ListReportDefinitions") +PutReportDefinition = Action("PutReportDefinition") +UpdateReportDefinition = Action("UpdateReportDefinition") diff --git a/awacs/apprunner.py b/awacs/apprunner.py new file mode 100644 index 00000000..d4350e2d --- /dev/null +++ b/awacs/apprunner.py @@ -0,0 +1,47 @@ +# Copyright (c) 2012-2021, Mark Peek +# All rights reserved. +# +# See LICENSE file for full license. + +from .aws import Action as BaseAction +from .aws import BaseARN + +service_name = "AWS App Runner" +prefix = "apprunner" + + +class Action(BaseAction): + def __init__(self, action: str = None) -> None: + super().__init__(prefix, action) + + +class ARN(BaseARN): + def __init__(self, resource: str = "", region: str = "", account: str = "") -> None: + super().__init__( + service=prefix, resource=resource, region=region, account=account + ) + + +AssociateCustomDomain = Action("AssociateCustomDomain") +CreateAutoScalingConfiguration = Action("CreateAutoScalingConfiguration") +CreateConnection = Action("CreateConnection") +CreateService = Action("CreateService") +DeleteAutoScalingConfiguration = Action("DeleteAutoScalingConfiguration") +DeleteConnection = Action("DeleteConnection") +DeleteService = Action("DeleteService") +DescribeAutoScalingConfiguration = Action("DescribeAutoScalingConfiguration") +DescribeCustomDomains = Action("DescribeCustomDomains") +DescribeOperation = Action("DescribeOperation") +DescribeService = Action("DescribeService") +DisassociateCustomDomain = Action("DisassociateCustomDomain") +ListAutoScalingConfigurations = Action("ListAutoScalingConfigurations") +ListConnections = Action("ListConnections") +ListOperations = Action("ListOperations") +ListServices = Action("ListServices") +ListTagsForResource = Action("ListTagsForResource") +PauseService = Action("PauseService") +ResumeService = Action("ResumeService") +StartDeployment = Action("StartDeployment") +TagResource = Action("TagResource") +UntagResource = Action("UntagResource") +UpdateService = Action("UpdateService") diff --git a/awacs/autoscaling.py b/awacs/autoscaling.py index 37cd5a12..f6c4b780 100644 --- a/awacs/autoscaling.py +++ b/awacs/autoscaling.py @@ -39,6 +39,7 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N DeletePolicy = Action("DeletePolicy") DeleteScheduledAction = Action("DeleteScheduledAction") DeleteTags = Action("DeleteTags") +DeleteWarmPool = Action("DeleteWarmPool") DescribeAccountLimits = Action("DescribeAccountLimits") DescribeAdjustmentTypes = Action("DescribeAdjustmentTypes") DescribeAutoScalingGroups = Action("DescribeAutoScalingGroups") @@ -58,6 +59,7 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N DescribeScheduledActions = Action("DescribeScheduledActions") DescribeTags = Action("DescribeTags") DescribeTerminationPolicyTypes = Action("DescribeTerminationPolicyTypes") +DescribeWarmPool = Action("DescribeWarmPool") DetachInstances = Action("DetachInstances") DetachLoadBalancerTargetGroups = Action("DetachLoadBalancerTargetGroups") DetachLoadBalancers = Action("DetachLoadBalancers") @@ -70,6 +72,7 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N PutNotificationConfiguration = Action("PutNotificationConfiguration") PutScalingPolicy = Action("PutScalingPolicy") PutScheduledUpdateGroupAction = Action("PutScheduledUpdateGroupAction") +PutWarmPool = Action("PutWarmPool") RecordLifecycleActionHeartbeat = Action("RecordLifecycleActionHeartbeat") ResumeProcesses = Action("ResumeProcesses") SetDesiredCapacity = Action("SetDesiredCapacity") diff --git a/awacs/elasticfilesystem.py b/awacs/elasticfilesystem.py index df2c1b59..fb34abf6 100644 --- a/awacs/elasticfilesystem.py +++ b/awacs/elasticfilesystem.py @@ -36,6 +36,7 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N DeleteMountTarget = Action("DeleteMountTarget") DeleteTags = Action("DeleteTags") DescribeAccessPoints = Action("DescribeAccessPoints") +DescribeAccountPreferences = Action("DescribeAccountPreferences") DescribeBackupPolicy = Action("DescribeBackupPolicy") DescribeFileSystemPolicy = Action("DescribeFileSystemPolicy") DescribeFileSystems = Action("DescribeFileSystems") @@ -45,6 +46,7 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N DescribeTags = Action("DescribeTags") ListTagsForResource = Action("ListTagsForResource") ModifyMountTargetSecurityGroups = Action("ModifyMountTargetSecurityGroups") +PutAccountPreferences = Action("PutAccountPreferences") PutBackupPolicy = Action("PutBackupPolicy") PutFileSystemPolicy = Action("PutFileSystemPolicy") PutLifecycleConfiguration = Action("PutLifecycleConfiguration") diff --git a/awacs/es.py b/awacs/es.py index 24ab3340..bcbdd05c 100644 --- a/awacs/es.py +++ b/awacs/es.py @@ -27,6 +27,9 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N ) AddTags = Action("AddTags") AssociatePackage = Action("AssociatePackage") +CancelElasticsearchServiceSoftwareUpdate = Action( + "CancelElasticsearchServiceSoftwareUpdate" +) CreateElasticsearchDomain = Action("CreateElasticsearchDomain") CreateElasticsearchServiceRole = Action("CreateElasticsearchServiceRole") CreateOutboundCrossClusterSearchConnection = Action( @@ -88,6 +91,9 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N "RejectInboundCrossClusterSearchConnection" ) RemoveTags = Action("RemoveTags") +StartElasticsearchServiceSoftwareUpdate = Action( + "StartElasticsearchServiceSoftwareUpdate" +) UpdateElasticsearchDomainConfig = Action("UpdateElasticsearchDomainConfig") UpdatePackage = Action("UpdatePackage") UpgradeElasticsearchDomain = Action("UpgradeElasticsearchDomain") diff --git a/awacs/forecast.py b/awacs/forecast.py index eea637c2..ef448c43 100644 --- a/awacs/forecast.py +++ b/awacs/forecast.py @@ -36,6 +36,7 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N DeleteForecastExportJob = Action("DeleteForecastExportJob") DeletePredictor = Action("DeletePredictor") DeletePredictorBacktestExportJob = Action("DeletePredictorBacktestExportJob") +DeleteResourceTree = Action("DeleteResourceTree") DescribeDataset = Action("DescribeDataset") DescribeDatasetGroup = Action("DescribeDatasetGroup") DescribeDatasetImportJob = Action("DescribeDatasetImportJob") diff --git a/awacs/helpers/trust.py b/awacs/helpers/trust.py index a3083051..d6d3742f 100644 --- a/awacs/helpers/trust.py +++ b/awacs/helpers/trust.py @@ -19,13 +19,13 @@ def make_simple_assume_policy(*principals: Any) -> Policy: def make_service_domain_name(service: str, region: str = "") -> str: - """ Helper function for creating proper service domain names. """ + """Helper function for creating proper service domain names.""" tld = ".com.cn" if region == "cn-north-1" else ".com" return "{}.amazonaws{}".format(service, tld) def get_codedeploy_assumerole_policy(region: str = "") -> Policy: - """ Helper function for building the AWS CodeDeploy AssumeRole Policy. """ + """Helper function for building the AWS CodeDeploy AssumeRole Policy.""" service = make_service_domain_name("codedeploy", region) return make_simple_assume_policy(service) @@ -42,25 +42,25 @@ def get_default_assumerole_policy(region: str = "") -> Policy: def get_ecs_assumerole_policy(region: str = "") -> Policy: - """ Helper function for building the ECS AssumeRole Policy. """ + """Helper function for building the ECS AssumeRole Policy.""" service = make_service_domain_name("ecs", region) return make_simple_assume_policy(service) def get_ecs_task_assumerole_policy(region: str = "") -> Policy: - """ Helper function for building the AssumeRole Policy for ECS Tasks. """ + """Helper function for building the AssumeRole Policy for ECS Tasks.""" service = make_service_domain_name("ecs-tasks", region) return make_simple_assume_policy(service) def get_lambda_assumerole_policy(region: str = "") -> Policy: - """ Helper function for building the AWS Lambda AssumeRole Policy. """ + """Helper function for building the AWS Lambda AssumeRole Policy.""" service = make_service_domain_name("lambda", region) return make_simple_assume_policy(service) def get_lambda_edge_assumerole_policy(region: str = "") -> Policy: - """ Helper function for building the AWS Lambda@Edge AssumeRole Policy. """ + """Helper function for building the AWS Lambda@Edge AssumeRole Policy.""" return make_simple_assume_policy( *[ make_service_domain_name(service, region) @@ -70,6 +70,6 @@ def get_lambda_edge_assumerole_policy(region: str = "") -> Policy: def get_application_autoscaling_assumerole_policy(region: str = "") -> Policy: - """ Helper function for building the AWS Lambda AssumeRole Policy. """ + """Helper function for building the AWS Lambda AssumeRole Policy.""" service = make_service_domain_name("application-autoscaling", region) return make_simple_assume_policy(service) diff --git a/awacs/iotdeviceadvisor.py b/awacs/iotdeviceadvisor.py index 7c848f8f..bff40b88 100644 --- a/awacs/iotdeviceadvisor.py +++ b/awacs/iotdeviceadvisor.py @@ -32,6 +32,7 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N ListTagsForResource = Action("ListTagsForResource") ListTestCases = Action("ListTestCases") StartSuiteRun = Action("StartSuiteRun") +StopSuiteRun = Action("StopSuiteRun") TagResource = Action("TagResource") UntagResource = Action("UntagResource") UpdateSuiteDefinition = Action("UpdateSuiteDefinition") diff --git a/awacs/license_manager.py b/awacs/license_manager.py index 115150aa..a2dd5f32 100644 --- a/awacs/license_manager.py +++ b/awacs/license_manager.py @@ -30,17 +30,20 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N CreateGrantVersion = Action("CreateGrantVersion") CreateLicense = Action("CreateLicense") CreateLicenseConfiguration = Action("CreateLicenseConfiguration") +CreateLicenseManagerReportGenerator = Action("CreateLicenseManagerReportGenerator") CreateLicenseVersion = Action("CreateLicenseVersion") CreateToken = Action("CreateToken") DeleteGrant = Action("DeleteGrant") DeleteLicense = Action("DeleteLicense") DeleteLicenseConfiguration = Action("DeleteLicenseConfiguration") +DeleteLicenseManagerReportGenerator = Action("DeleteLicenseManagerReportGenerator") DeleteToken = Action("DeleteToken") ExtendLicenseConsumption = Action("ExtendLicenseConsumption") GetAccessToken = Action("GetAccessToken") GetGrant = Action("GetGrant") GetLicense = Action("GetLicense") GetLicenseConfiguration = Action("GetLicenseConfiguration") +GetLicenseManagerReportGenerator = Action("GetLicenseManagerReportGenerator") GetLicenseUsage = Action("GetLicenseUsage") GetServiceSettings = Action("GetServiceSettings") ListAssociationsForLicenseConfiguration = Action( @@ -51,6 +54,7 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N "ListFailuresForLicenseConfigurationOperations" ) ListLicenseConfigurations = Action("ListLicenseConfigurations") +ListLicenseManagerReportGenerators = Action("ListLicenseManagerReportGenerators") ListLicenseSpecificationsForResource = Action("ListLicenseSpecificationsForResource") ListLicenseVersions = Action("ListLicenseVersions") ListLicenses = Action("ListLicenses") @@ -64,6 +68,7 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N TagResource = Action("TagResource") UntagResource = Action("UntagResource") UpdateLicenseConfiguration = Action("UpdateLicenseConfiguration") +UpdateLicenseManagerReportGenerator = Action("UpdateLicenseManagerReportGenerator") UpdateLicenseSpecificationsForResource = Action( "UpdateLicenseSpecificationsForResource" ) diff --git a/awacs/secretsmanager.py b/awacs/secretsmanager.py index c304a5b5..a7f700c3 100644 --- a/awacs/secretsmanager.py +++ b/awacs/secretsmanager.py @@ -34,8 +34,11 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N ListSecrets = Action("ListSecrets") PutResourcePolicy = Action("PutResourcePolicy") PutSecretValue = Action("PutSecretValue") +RemoveRegionsFromReplication = Action("RemoveRegionsFromReplication") +ReplicateSecretToRegions = Action("ReplicateSecretToRegions") RestoreSecret = Action("RestoreSecret") RotateSecret = Action("RotateSecret") +StopReplicationToReplica = Action("StopReplicationToReplica") TagResource = Action("TagResource") UntagResource = Action("UntagResource") UpdateSecret = Action("UpdateSecret") diff --git a/awacs/ssm_contacts.py b/awacs/ssm_contacts.py new file mode 100644 index 00000000..e0642acd --- /dev/null +++ b/awacs/ssm_contacts.py @@ -0,0 +1,50 @@ +# Copyright (c) 2012-2021, Mark Peek +# All rights reserved. +# +# See LICENSE file for full license. + +from .aws import Action as BaseAction +from .aws import BaseARN + +service_name = "AWS Systems Manager Incident Manager Contacts" +prefix = "ssm-contacts" + + +class Action(BaseAction): + def __init__(self, action: str = None) -> None: + super().__init__(prefix, action) + + +class ARN(BaseARN): + def __init__(self, resource: str = "", region: str = "", account: str = "") -> None: + super().__init__( + service=prefix, resource=resource, region=region, account=account + ) + + +AcceptPage = Action("AcceptPage") +ActivateContactChannel = Action("ActivateContactChannel") +AssociateContact = Action("AssociateContact") +CreateContact = Action("CreateContact") +CreateContactChannel = Action("CreateContactChannel") +DeactivateContactChannel = Action("DeactivateContactChannel") +DeleteContact = Action("DeleteContact") +DeleteContactChannel = Action("DeleteContactChannel") +DeleteContactPolicy = Action("DeleteContactPolicy") +DescribeEngagement = Action("DescribeEngagement") +DescribePage = Action("DescribePage") +GetContact = Action("GetContact") +GetContactChannel = Action("GetContactChannel") +ListContactChannels = Action("ListContactChannels") +ListContacts = Action("ListContacts") +ListEngagements = Action("ListEngagements") +ListPageReceipts = Action("ListPageReceipts") +ListPagesByContact = Action("ListPagesByContact") +ListPagesByEngagement = Action("ListPagesByEngagement") +PutContactPolicy = Action("PutContactPolicy") +SendActivationCode = Action("SendActivationCode") +StartEngagement = Action("StartEngagement") +StopEngagement = Action("StopEngagement") +UpdateContact = Action("UpdateContact") +UpdateContactChannel = Action("UpdateContactChannel") +UpdateContactPolicy = Action("UpdateContactPolicy") diff --git a/awacs/ssm_incidents.py b/awacs/ssm_incidents.py index cee11e59..213502ef 100644 --- a/awacs/ssm_incidents.py +++ b/awacs/ssm_incidents.py @@ -22,4 +22,32 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N ) +CreateReplicationSet = Action("CreateReplicationSet") +CreateResponsePlan = Action("CreateResponsePlan") +CreateTimelineEvent = Action("CreateTimelineEvent") +DeleteIncidentRecord = Action("DeleteIncidentRecord") +DeleteReplicationSet = Action("DeleteReplicationSet") +DeleteResourcePolicy = Action("DeleteResourcePolicy") +DeleteResponsePlan = Action("DeleteResponsePlan") +DeleteTimelineEvent = Action("DeleteTimelineEvent") +GetIncidentRecord = Action("GetIncidentRecord") +GetReplicationSet = Action("GetReplicationSet") +GetResourcePolicies = Action("GetResourcePolicies") +GetResponsePlan = Action("GetResponsePlan") +GetTimelineEvent = Action("GetTimelineEvent") +ListIncidentRecords = Action("ListIncidentRecords") +ListRelatedItems = Action("ListRelatedItems") +ListReplicationSets = Action("ListReplicationSets") +ListResponsePlans = Action("ListResponsePlans") +ListTagsForResource = Action("ListTagsForResource") +ListTimelineEvents = Action("ListTimelineEvents") +PutResourcePolicy = Action("PutResourcePolicy") StartIncident = Action("StartIncident") +TagResource = Action("TagResource") +UntagResource = Action("UntagResource") +UpdateDeletionProtection = Action("UpdateDeletionProtection") +UpdateIncidentRecord = Action("UpdateIncidentRecord") +UpdateRelatedItems = Action("UpdateRelatedItems") +UpdateReplicationSet = Action("UpdateReplicationSet") +UpdateResponsePlan = Action("UpdateResponsePlan") +UpdateTimelineEvent = Action("UpdateTimelineEvent") diff --git a/awacs/workmail.py b/awacs/workmail.py index 1748fb9c..6dbee18d 100644 --- a/awacs/workmail.py +++ b/awacs/workmail.py @@ -31,6 +31,7 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N CreateInboundMailFlowRule = Action("CreateInboundMailFlowRule") CreateMailDomain = Action("CreateMailDomain") CreateMailUser = Action("CreateMailUser") +CreateMobileDeviceAccessRule = Action("CreateMobileDeviceAccessRule") CreateOrganization = Action("CreateOrganization") CreateOutboundMailFlowRule = Action("CreateOutboundMailFlowRule") CreateResource = Action("CreateResource") @@ -43,6 +44,7 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N DeleteMailDomain = Action("DeleteMailDomain") DeleteMailboxPermissions = Action("DeleteMailboxPermissions") DeleteMobileDevice = Action("DeleteMobileDevice") +DeleteMobileDeviceAccessRule = Action("DeleteMobileDeviceAccessRule") DeleteOrganization = Action("DeleteOrganization") DeleteOutboundMailFlowRule = Action("DeleteOutboundMailFlowRule") DeleteResource = Action("DeleteResource") @@ -78,6 +80,7 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N GetMailGroupDetails = Action("GetMailGroupDetails") GetMailUserDetails = Action("GetMailUserDetails") GetMailboxDetails = Action("GetMailboxDetails") +GetMobileDeviceAccessEffect = Action("GetMobileDeviceAccessEffect") GetMobileDeviceDetails = Action("GetMobileDeviceDetails") GetMobileDevicesForUser = Action("GetMobileDevicesForUser") GetMobilePolicyDetails = Action("GetMobilePolicyDetails") @@ -89,6 +92,7 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N ListMailboxExportJobs = Action("ListMailboxExportJobs") ListMailboxPermissions = Action("ListMailboxPermissions") ListMembersInMailGroup = Action("ListMembersInMailGroup") +ListMobileDeviceAccessRules = Action("ListMobileDeviceAccessRules") ListOrganizations = Action("ListOrganizations") ListOutboundMailFlowRules = Action("ListOutboundMailFlowRules") ListResourceDelegates = Action("ListResourceDelegates") @@ -117,6 +121,7 @@ def __init__(self, resource: str = "", region: str = "", account: str = "") -> N UntagResource = Action("UntagResource") UpdateInboundMailFlowRule = Action("UpdateInboundMailFlowRule") UpdateMailboxQuota = Action("UpdateMailboxQuota") +UpdateMobileDeviceAccessRule = Action("UpdateMobileDeviceAccessRule") UpdateOutboundMailFlowRule = Action("UpdateOutboundMailFlowRule") UpdatePrimaryEmailAddress = Action("UpdatePrimaryEmailAddress") UpdateResource = Action("UpdateResource")