Skip to content

Asg

Bases: DuploResourceV2

Manage Duplo ASGs

Duplo ASGs (Auto Scaling Groups) manage the number of hosts within a tenant, enabling automatic scaling of instances based on demand.

See more details at: https://docs.duplocloud.com/docs/overview/use-cases/hosts-vms/auto-scaling/auto-scaling-groups

Commands

apply

Apply a service.

Parameters:

--file, -f, --cli-input
A file to read the input from
FileType('r') action: YamlAction
--wait, -w
Wait for the operation to complete

create

Create an ASG.

Creates a new Auto Scaling Group with the specified configuration. The ASG will manage EC2 instances based on the defined capacity settings and scaling policies.

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.large
Base64UserData: ''
TagsCsv: ''
AgentPlatform: 7
IsClusterAutoscaled: true
IsMinion: true

Create an ASG using a one-liner.
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.large
Base64UserData: ''
TagsCsv: ''
AgentPlatform: 7
IsClusterAutoscaled: true
IsMinion: true

""" | duploctl asg create -f -

Returns:

Name Type Description
message dict

Success message and the created ASG configuration.

Raises:

Type Description
DuploError

If the ASG could not be created due to invalid configuration or API errors.

Model: AsgProfile
{
  "$defs": {
    "AvailabilityZone": {
      "description": "    \n    ",
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        100
      ],
      "title": "AvailabilityZone",
      "type": "integer"
    },
    "CloudPlatform": {
      "description": "    \n    ",
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        10
      ],
      "title": "CloudPlatform",
      "type": "integer"
    },
    "CustomData": {
      "description": "CustomData",
      "properties": {
        "Key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Key"
        },
        "Value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Value"
        }
      },
      "title": "CustomData",
      "type": "object"
    },
    "K8SWorkerOs": {
      "description": "    \n    ",
      "enum": [
        0,
        1
      ],
      "title": "K8SWorkerOs",
      "type": "integer"
    },
    "KeyPairType": {
      "description": "    \n    ",
      "enum": [
        1,
        2
      ],
      "title": "KeyPairType",
      "type": "integer"
    },
    "KeyValuePairOfStringAndString": {
      "description": "KeyValuePairOfStringAndString",
      "properties": {
        "Key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Key"
        },
        "Value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Value"
        }
      },
      "title": "KeyValuePairOfStringAndString",
      "type": "object"
    },
    "NativeHostNetworkInterface": {
      "description": "NativeHostNetworkInterface",
      "properties": {
        "NetworkInterfaceId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Networkinterfaceid"
        },
        "SubnetId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Subnetid"
        },
        "AssociatePublicIpAddress": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Associatepublicipaddress"
        },
        "Groups": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Groups"
        },
        "DeviceIndex": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Deviceindex"
        },
        "MetaData": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/CustomData"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Metadata"
        }
      },
      "title": "NativeHostNetworkInterface",
      "type": "object"
    },
    "NativeHostVolume": {
      "description": "NativeHostVolume",
      "properties": {
        "Name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "VolumeId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Volumeid"
        },
        "Size": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Size"
        },
        "Iops": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Iops"
        },
        "VolumeType": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Volumetype"
        },
        "SnapshotRef": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Snapshotref"
        },
        "State": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "State"
        },
        "DeleteOnTermination": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Deleteontermination"
        },
        "Tags": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/KeyValuePairOfStringAndString"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tags"
        }
      },
      "title": "NativeHostVolume",
      "type": "object"
    },
    "Platform": {
      "description": "    \n    ",
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8
      ],
      "title": "Platform",
      "type": "integer"
    },
    "Taint": {
      "description": "Taint",
      "properties": {
        "Key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Key"
        },
        "Value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Value"
        },
        "Effect": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Effect"
        }
      },
      "title": "Taint",
      "type": "object"
    }
  },
  "description": "AsgProfile",
  "properties": {
    "TenantId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Tenantid"
    },
    "FriendlyName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Friendlyname"
    },
    "ComputerName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Computername"
    },
    "ImageId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Imageid"
    },
    "Capacity": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Capacity"
    },
    "IsMinion": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Isminion"
    },
    "Zone": {
      "anyOf": [
        {
          "$ref": "#/$defs/AvailabilityZone"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "Volumes": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/NativeHostVolume"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Volumes"
    },
    "Tags": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/KeyValuePairOfStringAndString"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Tags"
    },
    "TagsEx": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/CustomData"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Tagsex"
    },
    "TagsCsv": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Tagscsv"
    },
    "Base64UserData": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Base64Userdata"
    },
    "ShutdownBehavior": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Shutdownbehavior"
    },
    "AgentPlatform": {
      "anyOf": [
        {
          "$ref": "#/$defs/Platform"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "IsEbsOptimized": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Isebsoptimized"
    },
    "Cloud": {
      "anyOf": [
        {
          "$ref": "#/$defs/CloudPlatform"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "SpotPrice": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Spotprice"
    },
    "AllocatedPublicIp": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Allocatedpublicip"
    },
    "NetworkInterfaces": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/NativeHostNetworkInterface"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Networkinterfaces"
    },
    "MetaData": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/CustomData"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Metadata"
    },
    "MinionTags": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/CustomData"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Miniontags"
    },
    "EncryptDisk": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Encryptdisk"
    },
    "KeyPairType": {
      "anyOf": [
        {
          "$ref": "#/$defs/KeyPairType"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "IsUserDataCombined": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Isuserdatacombined"
    },
    "DedicatedHostId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Dedicatedhostid"
    },
    "ExtraNodeLabels": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/CustomData"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Extranodelabels"
    },
    "Taints": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/Taint"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Taints"
    },
    "DiskControllerType": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Diskcontrollertype"
    },
    "InstallDuploNativeAgent": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Installduplonativeagent"
    },
    "SecurityType": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Securitytype"
    },
    "IsEncryptAtHost": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Isencryptathost"
    },
    "IsSecureBoot": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Issecureboot"
    },
    "IsvTPM": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Isvtpm"
    },
    "AvailabilitySetId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Availabilitysetid"
    },
    "K8sWorkerOs": {
      "anyOf": [
        {
          "$ref": "#/$defs/K8SWorkerOs"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "Created": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Created"
    },
    "AutoScalingGroupARN": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Autoscalinggrouparn"
    },
    "CustomDataTags": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/CustomData"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Customdatatags"
    },
    "Arch": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Arch"
    },
    "EnabledMetrics": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Enabledmetrics"
    },
    "Zones": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/AvailabilityZone"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Zones"
    },
    "DesiredCapacity": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Desiredcapacity"
    },
    "MaxSize": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Maxsize"
    },
    "MinSize": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Minsize"
    },
    "State": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "State"
    },
    "AccountName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Accountname"
    },
    "IsClusterAutoscaled": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Isclusterautoscaled"
    },
    "CanScaleFromZero": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Canscalefromzero"
    },
    "UseLaunchTemplate": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Uselaunchtemplate"
    },
    "UseSpotInstances": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Usespotinstances"
    }
  },
  "title": "AsgProfile",
  "type": "object"
}

Parameters:

--file, -f, --cli-input
A file to read the input from
AsgProfile action: YamlAction

delete

Delete an ASG.

Delete an Auto Scaling Group by its name. This will terminate all instances managed by the ASG and remove the ASG configuration.

CLI Usage
duploctl asg delete <name>

Returns:

Name Type Description
message dict

Success message confirming the ASG deletion.

Raises:

Type Description
DuploError

If the ASG could not be deleted or does not exist.

Parameters:

name positional
The resource name
str

find

Find an ASG by name.

Retrieve details of a specific Auto Scaling Group by its name.

CLI Usage
duploctl asg find <name>

Returns:

Name Type Description
dict

The ASG configuration including capacity, instance types, and other settings.

Raises:

Type Description
DuploError

If the ASG with the specified name could not be found.

Parameters:

name positional
The resource name
str

list

List all ASGs.

Retrieve the list of all Auto Scaling Groups in the tenant.

CLI Usage
duploctl asg list

Returns:

Name Type Description
list list

A list of all ASGs with their configurations.

scale

Scale an ASG.

Modify the capacity limits of an Auto Scaling Group. You can set new minimum and/or maximum instance counts. The ASG will automatically adjust the number of running instances to stay within these new bounds.

CLI Usage
duploctl asg scale -n <name> [-m <min>] [-M <max>]

Returns:

Name Type Description
message dict

Success message with the new scaling configuration.

Raises:

Type Description
DuploError

If neither min nor max is provided, or if the scaling operation fails.

Parameters:

name positional
The resource name
str
--min, -m
The minimum number of replicas
int
--max, -M
The maximum number of replicas
int

update

Update an ASG.

Update an existing Auto Scaling Group's configuration. This can include changes to capacity settings, instance types, scaling policies, and other parameters.

CLI Usage
duploctl asg update -f <file>

Returns:

Name Type Description
message dict

Success message and the updated ASG configuration.

Raises:

Type Description
DuploError

If the ASG could not be updated due to invalid configuration or API errors.

Model: AsgProfile
{
  "$defs": {
    "AvailabilityZone": {
      "description": "    \n    ",
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        100
      ],
      "title": "AvailabilityZone",
      "type": "integer"
    },
    "CloudPlatform": {
      "description": "    \n    ",
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        10
      ],
      "title": "CloudPlatform",
      "type": "integer"
    },
    "CustomData": {
      "description": "CustomData",
      "properties": {
        "Key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Key"
        },
        "Value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Value"
        }
      },
      "title": "CustomData",
      "type": "object"
    },
    "K8SWorkerOs": {
      "description": "    \n    ",
      "enum": [
        0,
        1
      ],
      "title": "K8SWorkerOs",
      "type": "integer"
    },
    "KeyPairType": {
      "description": "    \n    ",
      "enum": [
        1,
        2
      ],
      "title": "KeyPairType",
      "type": "integer"
    },
    "KeyValuePairOfStringAndString": {
      "description": "KeyValuePairOfStringAndString",
      "properties": {
        "Key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Key"
        },
        "Value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Value"
        }
      },
      "title": "KeyValuePairOfStringAndString",
      "type": "object"
    },
    "NativeHostNetworkInterface": {
      "description": "NativeHostNetworkInterface",
      "properties": {
        "NetworkInterfaceId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Networkinterfaceid"
        },
        "SubnetId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Subnetid"
        },
        "AssociatePublicIpAddress": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Associatepublicipaddress"
        },
        "Groups": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Groups"
        },
        "DeviceIndex": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Deviceindex"
        },
        "MetaData": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/CustomData"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Metadata"
        }
      },
      "title": "NativeHostNetworkInterface",
      "type": "object"
    },
    "NativeHostVolume": {
      "description": "NativeHostVolume",
      "properties": {
        "Name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "VolumeId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Volumeid"
        },
        "Size": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Size"
        },
        "Iops": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Iops"
        },
        "VolumeType": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Volumetype"
        },
        "SnapshotRef": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Snapshotref"
        },
        "State": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "State"
        },
        "DeleteOnTermination": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Deleteontermination"
        },
        "Tags": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/KeyValuePairOfStringAndString"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tags"
        }
      },
      "title": "NativeHostVolume",
      "type": "object"
    },
    "Platform": {
      "description": "    \n    ",
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8
      ],
      "title": "Platform",
      "type": "integer"
    },
    "Taint": {
      "description": "Taint",
      "properties": {
        "Key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Key"
        },
        "Value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Value"
        },
        "Effect": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Effect"
        }
      },
      "title": "Taint",
      "type": "object"
    }
  },
  "description": "AsgProfile",
  "properties": {
    "TenantId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Tenantid"
    },
    "FriendlyName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Friendlyname"
    },
    "ComputerName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Computername"
    },
    "ImageId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Imageid"
    },
    "Capacity": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Capacity"
    },
    "IsMinion": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Isminion"
    },
    "Zone": {
      "anyOf": [
        {
          "$ref": "#/$defs/AvailabilityZone"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "Volumes": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/NativeHostVolume"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Volumes"
    },
    "Tags": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/KeyValuePairOfStringAndString"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Tags"
    },
    "TagsEx": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/CustomData"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Tagsex"
    },
    "TagsCsv": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Tagscsv"
    },
    "Base64UserData": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Base64Userdata"
    },
    "ShutdownBehavior": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Shutdownbehavior"
    },
    "AgentPlatform": {
      "anyOf": [
        {
          "$ref": "#/$defs/Platform"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "IsEbsOptimized": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Isebsoptimized"
    },
    "Cloud": {
      "anyOf": [
        {
          "$ref": "#/$defs/CloudPlatform"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "SpotPrice": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Spotprice"
    },
    "AllocatedPublicIp": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Allocatedpublicip"
    },
    "NetworkInterfaces": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/NativeHostNetworkInterface"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Networkinterfaces"
    },
    "MetaData": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/CustomData"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Metadata"
    },
    "MinionTags": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/CustomData"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Miniontags"
    },
    "EncryptDisk": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Encryptdisk"
    },
    "KeyPairType": {
      "anyOf": [
        {
          "$ref": "#/$defs/KeyPairType"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "IsUserDataCombined": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Isuserdatacombined"
    },
    "DedicatedHostId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Dedicatedhostid"
    },
    "ExtraNodeLabels": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/CustomData"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Extranodelabels"
    },
    "Taints": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/Taint"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Taints"
    },
    "DiskControllerType": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Diskcontrollertype"
    },
    "InstallDuploNativeAgent": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Installduplonativeagent"
    },
    "SecurityType": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Securitytype"
    },
    "IsEncryptAtHost": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Isencryptathost"
    },
    "IsSecureBoot": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Issecureboot"
    },
    "IsvTPM": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Isvtpm"
    },
    "AvailabilitySetId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Availabilitysetid"
    },
    "K8sWorkerOs": {
      "anyOf": [
        {
          "$ref": "#/$defs/K8SWorkerOs"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "Created": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Created"
    },
    "AutoScalingGroupARN": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Autoscalinggrouparn"
    },
    "CustomDataTags": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/CustomData"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Customdatatags"
    },
    "Arch": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Arch"
    },
    "EnabledMetrics": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Enabledmetrics"
    },
    "Zones": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/AvailabilityZone"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Zones"
    },
    "DesiredCapacity": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Desiredcapacity"
    },
    "MaxSize": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Maxsize"
    },
    "MinSize": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Minsize"
    },
    "State": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "State"
    },
    "AccountName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Accountname"
    },
    "IsClusterAutoscaled": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Isclusterautoscaled"
    },
    "CanScaleFromZero": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Canscalefromzero"
    },
    "UseLaunchTemplate": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Uselaunchtemplate"
    },
    "UseSpotInstances": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Usespotinstances"
    }
  },
  "title": "AsgProfile",
  "type": "object"
}

Parameters:

--file, -f, --cli-input
A file to read the input from
AsgProfile action: YamlAction

update_allocation_tags

Update the allocation tag for an Auto Scaling Group.

Updates the allocation tag for an existing Auto Scaling Group. The allocation tag is used to specify custom allocation rules for the ASG instances.

CLI Usage
duploctl asg update_allocation_tags <name> <allocationtags>
Update an ASG with new allocation tag
duploctl asg update_allocation_tags duploservices-test-asg duploctl

Returns:

Name Type Description
message dict

Success message and the updated ASG allocation tag.

Parameters:

name positional
The resource name
str
allocationtags positional
Allocation tag used to specify custom allocation rules
str

Methods

discover_image

name_from_body