fleets
Creates, updates, deletes or gets a fleet resource or lists fleets in a region
Overview
| Name | fleets |
| Type | Resource |
| Description | Resource Type definition for AWS::CodeBuild::Fleet |
| Id | awscc.codebuild.fleets |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
name | string | |
base_capacity | integer | |
environment_type | string | |
compute_type | string | |
overflow_behavior | string | |
fleet_service_role | string | |
fleet_vpc_config | object | |
fleet_proxy_configuration | object | |
tags | array | |
arn | string | |
image_id | string | |
scaling_configuration | object | |
compute_configuration | object | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | |
region | string | AWS region. |
For more information, see AWS::CodeBuild::Fleet.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | fleets | INSERT | region |
delete_resource | fleets | DELETE | Identifier, region |
update_resource | fleets | UPDATE | Identifier, PatchDocument, region |
list_resources | fleets_list_only | SELECT | region |
get_resource | fleets | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual fleet.
SELECT
region,
name,
base_capacity,
environment_type,
compute_type,
overflow_behavior,
fleet_service_role,
fleet_vpc_config,
fleet_proxy_configuration,
tags,
arn,
image_id,
scaling_configuration,
compute_configuration
FROM awscc.codebuild.fleets
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all fleets in a region.
SELECT
region,
arn
FROM awscc.codebuild.fleets_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new fleet resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.codebuild.fleets (
Name,
BaseCapacity,
EnvironmentType,
ComputeType,
OverflowBehavior,
FleetServiceRole,
FleetVpcConfig,
FleetProxyConfiguration,
Tags,
ImageId,
ScalingConfiguration,
ComputeConfiguration,
region
)
SELECT
'{{ name }}',
'{{ base_capacity }}',
'{{ environment_type }}',
'{{ compute_type }}',
'{{ overflow_behavior }}',
'{{ fleet_service_role }}',
'{{ fleet_vpc_config }}',
'{{ fleet_proxy_configuration }}',
'{{ tags }}',
'{{ image_id }}',
'{{ scaling_configuration }}',
'{{ compute_configuration }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.codebuild.fleets (
Name,
BaseCapacity,
EnvironmentType,
ComputeType,
OverflowBehavior,
FleetServiceRole,
FleetVpcConfig,
FleetProxyConfiguration,
Tags,
ImageId,
ScalingConfiguration,
ComputeConfiguration,
region
)
SELECT
'{{ name }}',
'{{ base_capacity }}',
'{{ environment_type }}',
'{{ compute_type }}',
'{{ overflow_behavior }}',
'{{ fleet_service_role }}',
'{{ fleet_vpc_config }}',
'{{ fleet_proxy_configuration }}',
'{{ tags }}',
'{{ image_id }}',
'{{ scaling_configuration }}',
'{{ compute_configuration }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: fleet
props:
- name: name
value: '{{ name }}'
- name: base_capacity
value: '{{ base_capacity }}'
- name: environment_type
value: '{{ environment_type }}'
- name: compute_type
value: '{{ compute_type }}'
- name: overflow_behavior
value: '{{ overflow_behavior }}'
- name: fleet_service_role
value: '{{ fleet_service_role }}'
- name: fleet_vpc_config
value:
vpc_id: '{{ vpc_id }}'
subnets:
- '{{ subnets[0] }}'
security_group_ids:
- '{{ security_group_ids[0] }}'
- name: fleet_proxy_configuration
value:
default_behavior: '{{ default_behavior }}'
ordered_proxy_rules:
- type: '{{ type }}'
effect: '{{ effect }}'
entities:
- '{{ entities[0] }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: image_id
value: '{{ image_id }}'
- name: scaling_configuration
value:
max_capacity: '{{ max_capacity }}'
scaling_type: '{{ scaling_type }}'
target_tracking_scaling_configs:
- metric_type: '{{ metric_type }}'
target_value: null
- name: compute_configuration
value:
v_cpu: '{{ v_cpu }}'
memory: '{{ memory }}'
disk: '{{ disk }}'
machine_type: '{{ machine_type }}'
instance_type: '{{ instance_type }}'
UPDATE example
Use the following StackQL query and manifest file to update a fleet resource, using stack-deploy.
/*+ update */
UPDATE awscc.codebuild.fleets
SET PatchDocument = string('{{ {
"Name": name,
"BaseCapacity": base_capacity,
"EnvironmentType": environment_type,
"ComputeType": compute_type,
"OverflowBehavior": overflow_behavior,
"FleetServiceRole": fleet_service_role,
"FleetVpcConfig": fleet_vpc_config,
"FleetProxyConfiguration": fleet_proxy_configuration,
"Tags": tags,
"ImageId": image_id,
"ScalingConfiguration": scaling_configuration,
"ComputeConfiguration": compute_configuration
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.codebuild.fleets
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the fleets resource, the following permissions are required:
- Create
- Delete
- Read
- List
- Update
codebuild:BatchGetFleets,
codebuild:CreateFleet,
iam:PassRole
codebuild:BatchGetFleets,
codebuild:DeleteFleet
codebuild:BatchGetFleets
codebuild:ListFleets
codebuild:BatchGetFleets,
codebuild:UpdateFleet,
iam:PassRole