services
Creates, updates, deletes or gets a service
resource or lists services
in a region
Overview
Name | services |
Type | Resource |
Description | The AWS::AppRunner::Service resource specifies an AppRunner Service. |
Id | aws.apprunner.services |
Fields
Name | Datatype | Description |
---|---|---|
service_name | string | The AppRunner Service Name. |
service_id | string | The AppRunner Service Id |
service_arn | string | The Amazon Resource Name (ARN) of the AppRunner Service. |
service_url | string | The Service Url of the AppRunner Service. |
status | string | AppRunner Service status. |
source_configuration | object | Source Code configuration |
instance_configuration | object | Instance Configuration |
tags | array | |
encryption_configuration | object | Encryption configuration (KMS key) |
health_check_configuration | object | Health check configuration |
observability_configuration | object | Service observability configuration |
auto_scaling_configuration_arn | string | Autoscaling configuration ARN |
network_configuration | object | Network configuration |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | SourceConfiguration, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all services
in a region.
SELECT
region,
service_name,
service_id,
service_arn,
service_url,
status,
source_configuration,
instance_configuration,
tags,
encryption_configuration,
health_check_configuration,
observability_configuration,
auto_scaling_configuration_arn,
network_configuration
FROM aws.apprunner.services
WHERE region = 'us-east-1';
Gets all properties from an individual service
.
SELECT
region,
service_name,
service_id,
service_arn,
service_url,
status,
source_configuration,
instance_configuration,
tags,
encryption_configuration,
health_check_configuration,
observability_configuration,
auto_scaling_configuration_arn,
network_configuration
FROM aws.apprunner.services
WHERE region = 'us-east-1' AND data__Identifier = '<ServiceArn>';
INSERT
example
Use the following StackQL query and manifest file to create a new service
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.apprunner.services (
SourceConfiguration,
region
)
SELECT
'{{ SourceConfiguration }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.apprunner.services (
ServiceName,
SourceConfiguration,
InstanceConfiguration,
Tags,
EncryptionConfiguration,
HealthCheckConfiguration,
ObservabilityConfiguration,
AutoScalingConfigurationArn,
NetworkConfiguration,
region
)
SELECT
'{{ ServiceName }}',
'{{ SourceConfiguration }}',
'{{ InstanceConfiguration }}',
'{{ Tags }}',
'{{ EncryptionConfiguration }}',
'{{ HealthCheckConfiguration }}',
'{{ ObservabilityConfiguration }}',
'{{ AutoScalingConfigurationArn }}',
'{{ NetworkConfiguration }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: service
props:
- name: ServiceName
value: '{{ ServiceName }}'
- name: SourceConfiguration
value:
CodeRepository:
RepositoryUrl: '{{ RepositoryUrl }}'
SourceCodeVersion:
Type: '{{ Type }}'
Value: '{{ Value }}'
CodeConfiguration:
ConfigurationSource: '{{ ConfigurationSource }}'
CodeConfigurationValues:
Runtime: '{{ Runtime }}'
BuildCommand: '{{ BuildCommand }}'
StartCommand: '{{ StartCommand }}'
Port: '{{ Port }}'
RuntimeEnvironmentVariables:
- Name: '{{ Name }}'
Value: '{{ Value }}'
RuntimeEnvironmentSecrets:
- null
SourceDirectory: '{{ SourceDirectory }}'
ImageRepository:
ImageIdentifier: '{{ ImageIdentifier }}'
ImageConfiguration:
StartCommand: '{{ StartCommand }}'
Port: '{{ Port }}'
RuntimeEnvironmentVariables:
- null
RuntimeEnvironmentSecrets:
- null
ImageRepositoryType: '{{ ImageRepositoryType }}'
AutoDeploymentsEnabled: '{{ AutoDeploymentsEnabled }}'
AuthenticationConfiguration:
ConnectionArn: '{{ ConnectionArn }}'
AccessRoleArn: '{{ AccessRoleArn }}'
- name: InstanceConfiguration
value:
Cpu: '{{ Cpu }}'
Memory: '{{ Memory }}'
InstanceRoleArn: null
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: EncryptionConfiguration
value:
KmsKey: '{{ KmsKey }}'
- name: HealthCheckConfiguration
value:
Protocol: '{{ Protocol }}'
Path: '{{ Path }}'
Interval: '{{ Interval }}'
Timeout: '{{ Timeout }}'
HealthyThreshold: '{{ HealthyThreshold }}'
UnhealthyThreshold: '{{ UnhealthyThreshold }}'
- name: ObservabilityConfiguration
value:
ObservabilityEnabled: '{{ ObservabilityEnabled }}'
ObservabilityConfigurationArn: '{{ ObservabilityConfigurationArn }}'
- name: AutoScalingConfigurationArn
value: '{{ AutoScalingConfigurationArn }}'
- name: NetworkConfiguration
value:
EgressConfiguration:
EgressType: '{{ EgressType }}'
VpcConnectorArn: '{{ VpcConnectorArn }}'
IngressConfiguration:
IsPubliclyAccessible: '{{ IsPubliclyAccessible }}'
IpAddressType: '{{ IpAddressType }}'
DELETE
example
/*+ delete */
DELETE FROM aws.apprunner.services
WHERE data__Identifier = '<ServiceArn>'
AND region = 'us-east-1';
Permissions
To operate on the services
resource, the following permissions are required:
Create
apprunner:CreateService,
apprunner:TagResource,
iam:PassRole,
iam:CreateServiceLinkedRole,
logs:CreateLogGroup,
logs:PutRetentionPolicy,
logs:CreateLogStream,
logs:PutLogEvents,
logs:DescribeLogStreams,
events:PutRule,
events:PutTargets
Read
apprunner:DescribeService
Update
apprunner:UpdateService,
iam:PassRole
Delete
apprunner:DeleteService
List
apprunner:ListServices,
iam:PassRole