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 | aws.codebuild.fleets |
Fields
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 | |
tags | array | |
arn | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | 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 fleets
in a region.
SELECT
region,
name,
base_capacity,
environment_type,
compute_type,
overflow_behavior,
fleet_service_role,
fleet_vpc_config,
tags,
arn
FROM aws.codebuild.fleets
WHERE region = 'us-east-1';
Gets all properties from an individual fleet
.
SELECT
region,
name,
base_capacity,
environment_type,
compute_type,
overflow_behavior,
fleet_service_role,
fleet_vpc_config,
tags,
arn
FROM aws.codebuild.fleets
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
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 aws.codebuild.fleets (
Name,
BaseCapacity,
EnvironmentType,
ComputeType,
OverflowBehavior,
FleetServiceRole,
FleetVpcConfig,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ BaseCapacity }}',
'{{ EnvironmentType }}',
'{{ ComputeType }}',
'{{ OverflowBehavior }}',
'{{ FleetServiceRole }}',
'{{ FleetVpcConfig }}',
'{{ Tags }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.codebuild.fleets (
Name,
BaseCapacity,
EnvironmentType,
ComputeType,
OverflowBehavior,
FleetServiceRole,
FleetVpcConfig,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ BaseCapacity }}',
'{{ EnvironmentType }}',
'{{ ComputeType }}',
'{{ OverflowBehavior }}',
'{{ FleetServiceRole }}',
'{{ FleetVpcConfig }}',
'{{ Tags }}',
'{{ 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: BaseCapacity
value: '{{ BaseCapacity }}'
- name: EnvironmentType
value: '{{ EnvironmentType }}'
- name: ComputeType
value: '{{ ComputeType }}'
- name: OverflowBehavior
value: '{{ OverflowBehavior }}'
- name: FleetServiceRole
value: '{{ FleetServiceRole }}'
- name: FleetVpcConfig
value:
VpcId: '{{ VpcId }}'
Subnets:
- '{{ Subnets[0] }}'
SecurityGroupIds:
- '{{ SecurityGroupIds[0] }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.codebuild.fleets
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the fleets
resource, the following permissions are required:
Create
codebuild:BatchGetFleets,
codebuild:CreateFleet,
iam:PassRole
Delete
codebuild:BatchGetFleets,
codebuild:DeleteFleet
Read
codebuild:BatchGetFleets
List
codebuild:ListFleets
Update
codebuild:BatchGetFleets,
codebuild:UpdateFleet,
iam:PassRole