auto_scaling_configurations
Creates, updates, deletes or gets an auto_scaling_configuration resource or lists auto_scaling_configurations in a region
Overview
| Name | auto_scaling_configurations |
| Type | Resource |
| Description | Describes an AWS App Runner automatic configuration resource that enables automatic scaling of instances used to process web requests. You can share an auto scaling configuration across multiple services. |
| Id | awscc.apprunner.auto_scaling_configurations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
auto_scaling_configuration_arn | string | The Amazon Resource Name (ARN) of this auto scaling configuration. |
auto_scaling_configuration_name | string | The customer-provided auto scaling configuration name. When you use it for the first time in an AWS Region, App Runner creates revision number 1 of this name. When you use the same name in subsequent calls, App Runner creates incremental revisions of the configuration. The auto scaling configuration name can be used in multiple revisions of a configuration. |
auto_scaling_configuration_revision | integer | The revision of this auto scaling configuration. It's unique among all the active configurations ("Status": "ACTIVE") that share the same AutoScalingConfigurationName. |
max_concurrency | integer | The maximum number of concurrent requests that an instance processes. If the number of concurrent requests exceeds this limit, App Runner scales the service up to use more instances to process the requests. |
max_size | integer | The maximum number of instances that an App Runner service scales up to. At most MaxSize instances actively serve traffic for your service. |
min_size | integer | The minimum number of instances that App Runner provisions for a service. The service always has at least MinSize provisioned instances. Some of them actively serve traffic. The rest of them (provisioned and inactive instances) are a cost-effective compute capacity reserve and are ready to be quickly activated. You pay for memory usage of all the provisioned instances. You pay for CPU usage of only the active subset. |
latest | boolean | It's set to true for the configuration with the highest Revision among all configurations that share the same AutoScalingConfigurationName. It's set to false otherwise. App Runner temporarily doubles the number of provisioned instances during deployments, to maintain the same capacity for both old and new code. |
tags | array | A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a key-value pair. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
auto_scaling_configuration_arn | string | The Amazon Resource Name (ARN) of this auto scaling configuration. |
region | string | AWS region. |
For more information, see AWS::AppRunner::AutoScalingConfiguration.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | auto_scaling_configurations | INSERT | region |
delete_resource | auto_scaling_configurations | DELETE | Identifier, region |
list_resources | auto_scaling_configurations_list_only | SELECT | region |
get_resource | auto_scaling_configurations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual auto_scaling_configuration.
SELECT
region,
auto_scaling_configuration_arn,
auto_scaling_configuration_name,
auto_scaling_configuration_revision,
max_concurrency,
max_size,
min_size,
latest,
tags
FROM awscc.apprunner.auto_scaling_configurations
WHERE
region = '{{ region }}' AND
Identifier = '{{ auto_scaling_configuration_arn }}';
Lists all auto_scaling_configurations in a region.
SELECT
region,
auto_scaling_configuration_arn
FROM awscc.apprunner.auto_scaling_configurations_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new auto_scaling_configuration resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.apprunner.auto_scaling_configurations (
AutoScalingConfigurationName,
MaxConcurrency,
MaxSize,
MinSize,
Tags,
region
)
SELECT
'{{ auto_scaling_configuration_name }}',
'{{ max_concurrency }}',
'{{ max_size }}',
'{{ min_size }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.apprunner.auto_scaling_configurations (
AutoScalingConfigurationName,
MaxConcurrency,
MaxSize,
MinSize,
Tags,
region
)
SELECT
'{{ auto_scaling_configuration_name }}',
'{{ max_concurrency }}',
'{{ max_size }}',
'{{ min_size }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: auto_scaling_configuration
props:
- name: auto_scaling_configuration_name
value: '{{ auto_scaling_configuration_name }}'
- name: max_concurrency
value: '{{ max_concurrency }}'
- name: max_size
value: '{{ max_size }}'
- name: min_size
value: '{{ min_size }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
DELETE example
/*+ delete */
DELETE FROM awscc.apprunner.auto_scaling_configurations
WHERE
Identifier = '{{ auto_scaling_configuration_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the auto_scaling_configurations resource, the following permissions are required:
- Create
- Read
- Delete
- List
apprunner:CreateAutoScalingConfiguration,
apprunner:DescribeAutoScalingConfiguration,
apprunner:TagResource
apprunner:DescribeAutoScalingConfiguration
apprunner:DeleteAutoScalingConfiguration
apprunner:ListAutoScalingConfigurations