Skip to content

Commit

Permalink
Action Update 2021-20
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Workflow committed May 23, 2021
1 parent 4beaf8b commit d4ae43c
Show file tree
Hide file tree
Showing 13 changed files with 188 additions and 7 deletions.
30 changes: 30 additions & 0 deletions awacs/application_cost_profiler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright (c) 2012-2021, Mark Peek <mark@peek.org>
# 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")
47 changes: 47 additions & 0 deletions awacs/apprunner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright (c) 2012-2021, Mark Peek <mark@peek.org>
# 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")
3 changes: 3 additions & 0 deletions awacs/autoscaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand Down
2 changes: 2 additions & 0 deletions awacs/elasticfilesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand Down
6 changes: 6 additions & 0 deletions awacs/es.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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")
1 change: 1 addition & 0 deletions awacs/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
14 changes: 7 additions & 7 deletions awacs/helpers/trust.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)
Expand All @@ -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)
1 change: 1 addition & 0 deletions awacs/iotdeviceadvisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
5 changes: 5 additions & 0 deletions awacs/license_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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")
Expand All @@ -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"
)
Expand Down
3 changes: 3 additions & 0 deletions awacs/secretsmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
50 changes: 50 additions & 0 deletions awacs/ssm_contacts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright (c) 2012-2021, Mark Peek <mark@peek.org>
# 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")
28 changes: 28 additions & 0 deletions awacs/ssm_incidents.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
5 changes: 5 additions & 0 deletions awacs/workmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand Down Expand Up @@ -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")
Expand All @@ -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")
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit d4ae43c

Please sign in to comment.