add kafka broker-storage VolumeSize to application autoscaling dimensions (#5173)
This commit is contained in:
parent
6b14d01f5d
commit
76a094b6fb
@ -11,6 +11,8 @@ import uuid
|
|||||||
@unique
|
@unique
|
||||||
class ResourceTypeExceptionValueSet(Enum):
|
class ResourceTypeExceptionValueSet(Enum):
|
||||||
RESOURCE_TYPE = "ResourceType"
|
RESOURCE_TYPE = "ResourceType"
|
||||||
|
# MSK currently only has the "broker-storage" resource type which is not part of the resource_id
|
||||||
|
KAFKA_BROKER_STORAGE = "broker-storage"
|
||||||
|
|
||||||
|
|
||||||
@unique
|
@unique
|
||||||
@ -26,6 +28,7 @@ class ServiceNamespaceValueSet(Enum):
|
|||||||
COMPREHEND = "comprehend"
|
COMPREHEND = "comprehend"
|
||||||
ECS = "ecs"
|
ECS = "ecs"
|
||||||
SAGEMAKER = "sagemaker"
|
SAGEMAKER = "sagemaker"
|
||||||
|
KAFKA = "kafka"
|
||||||
|
|
||||||
|
|
||||||
@unique
|
@unique
|
||||||
@ -56,6 +59,7 @@ class ScalableDimensionValueSet(Enum):
|
|||||||
SAGEMAKER_VARIANT_DESIRED_INSTANCE_COUNT = "sagemaker:variant:DesiredInstanceCount"
|
SAGEMAKER_VARIANT_DESIRED_INSTANCE_COUNT = "sagemaker:variant:DesiredInstanceCount"
|
||||||
EC2_SPOT_FLEET_REQUEST_TARGET_CAPACITY = "ec2:spot-fleet-request:TargetCapacity"
|
EC2_SPOT_FLEET_REQUEST_TARGET_CAPACITY = "ec2:spot-fleet-request:TargetCapacity"
|
||||||
ECS_SERVICE_DESIRED_COUNT = "ecs:service:DesiredCount"
|
ECS_SERVICE_DESIRED_COUNT = "ecs:service:DesiredCount"
|
||||||
|
KAFKA_BROKER_STORAGE_VOLUME_SIZE = "kafka:broker-storage:VolumeSize"
|
||||||
|
|
||||||
|
|
||||||
class ApplicationAutoscalingBackend(BaseBackend):
|
class ApplicationAutoscalingBackend(BaseBackend):
|
||||||
@ -424,8 +428,12 @@ class FakeApplicationAutoscalingPolicy(BaseModel):
|
|||||||
self.policy_name = policy_name
|
self.policy_name = policy_name
|
||||||
self.policy_type = policy_type
|
self.policy_type = policy_type
|
||||||
self._guid = uuid.uuid4()
|
self._guid = uuid.uuid4()
|
||||||
self.policy_arn = "arn:aws:autoscaling:{}:scalingPolicy:{}:resource/sagemaker/{}:policyName/{}".format(
|
self.policy_arn = "arn:aws:autoscaling:{}:scalingPolicy:{}:resource/{}/{}:policyName/{}".format(
|
||||||
region_name, self._guid, self.resource_id, self.policy_name
|
region_name,
|
||||||
|
self._guid,
|
||||||
|
self.service_namespace,
|
||||||
|
self.resource_id,
|
||||||
|
self.policy_name,
|
||||||
)
|
)
|
||||||
self.creation_time = time.time()
|
self.creation_time = time.time()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user