Skip to content

Asg

Bases: DuploTenantResourceV2

Manage Duplo ASGs

Duplo ASGs are Auto Scaling Groups that manage the number of hosts within a tenant.

apply

Apply a service.

create

Create an ASG

CLI Usage

duploctl hosts create -f 'asg.yaml'
Contents of the asg.yaml file
FriendlyName: duploctl
Zone: 1
IsEbsOptimized: false
DesiredCapacity: 1
MinSize: 1
MaxSize: 2
MetaData:
- Key: OsDiskSize
  Value: 30
- Key: MetadataServiceOption
  Value: enabled_v2_only
UseLaunchTemplate: true
CanScaleFromZero: false
IsUserDataCombined: true
KeyPairType: 
Capacity: t3.small
Base64UserData: ''
TagsCsv: ''
AgentPlatform: 7
IsClusterAutoscaled: true
IsMinion: true

Example: One liner example

echo """
FriendlyName: duploctl
Zone: 1
IsEbsOptimized: false
DesiredCapacity: 1
MinSize: 1
MaxSize: 2
MetaData:
- Key: OsDiskSize
  Value: 30
- Key: MetadataServiceOption
  Value: enabled_v2_only
UseLaunchTemplate: true
CanScaleFromZero: false
IsUserDataCombined: true
KeyPairType: 
Capacity: t3.small
Base64UserData: ''
TagsCsv: ''
AgentPlatform: 7
IsClusterAutoscaled: true
IsMinion: true
""" | duploctl asg create -f -
Args: body: The body of the request. wait: Whether to wait for the creation to complete. Returns: message: A message that the asg was successfully created.

delete

Delete an ASG

CLI Usage
duploctl asg delete <name>

Parameters:

Name Type Description Default
name NAME

The name of the asg to delete.

required

Returns:

Name Type Description
message dict

A message that the asg was successfully deleted.

find

Find an asg by name.

CLI Usage
duploctl asg find <name>

Args: name (str): The name of the asg to find. Returns: The service object. Raises: DuploError: If the asg could not be found.

list

List all ASGs

CLI Usage
duploctl asg list

Returns: list: A list of all ASGs.

scale

Scale an ASG.

Note: "-m" represents Minimum instances and "-M" represents Maximum instances.

CLI Usage

```sh duploctl asg scale -n [-m ][-M ]

Parameters:

Name Type Description Default
name NAME

The name of the asg to scale.

required
min MIN

The minimum number of instances.

None
max MAX

The maximum number of instances.

None

Returns:

Name Type Description
message dict

A messaget that the asg was successfully scaled.

update

Update an ASG.

CLI Usage
duploctl asg update -f <file>

Parameters:

Name Type Description Default
body BODY

The body of the request.

required

Returns:

Name Type Description
message dict

A message that the asg was successfully updated