Updated on 2023-12-13 GMT+08:00

AOS.Batch

Element Description

The AOS.Batch element is a batch processing object. It is used to create and deploy jobs in batches. By defining contained sub-objects and the number of batch processing times, the AOS.Batch element implements the batch processing function. The AOS.Batch element considers that the execution succeeds only after all the batch operations of the included objects are complete. Currently, the AOS.Batch element supports the following sub-objects: CCE.Job, CCE.Deployment, and AOS.Stack.

Element Properties

Table 1 Property Description

Property

Required

Descripiton

items

Yes

Contained sub-element template

Type: AOS.BatchItem Array

Value Description: Supports customization.

Value Constraint: Array format. A template contains 1 to 10 objects.

Suggestion: Customize the value. For details, visit https://support.huaweicloud.com/intl/en-us/tr-aos/datatypes-aos-batchitem.html.

step

No

Maximum concurrency value

Type: integer

Value Description: By default, the step is not defined. That is, objects are created in batches based on the maximum concurrency value. If the step is specified, objects are executed in batches by phase. For example, a batch object contains one job and the step is 5. In this scenario, job6 will be executed only after job1 is completed.

Suggestion: Set the value based on specifications and requirements.

values

No

Variable used in the sub-element template

Type: dict

Value Description: Supports customization. When a batch object is instantiated, the values are replaced with the variables of properties defined in items, including the built-in variables item, limit, and offset.

Default: {}

Suggestion: Set the value based on specifications and requirements.

limit

Yes

Total number of jobs that are executed in batches

Type: integer

Value Description: Supports customization. The value ranges from 1 to 500.

Suggestion: Set the value based on specifications and requirements.

Relationships Between Elements

Table 2 Relationship description

Description

Target

ConsistsOf

AOS.Stack

ConsistsOf

CCE.Deployment

ConsistsOf

CCE.Job

DependsOn

CCE.Service

DependsOn

EVS.NonSharedVolume

DependsOn

CCE.Deployment

DependsOn

ServiceStage.Agent

DependsOn

SMN.Topic

DependsOn

CCI.Storage.EVS

DependsOn

VPC.VIP

DependsOn

APM.AutoScaler

DependsOn

ServiceStage.AppGroup

DependsOn

FGS.DmsEventMap

DependsOn

VPC.FirewallPolicy.Ingress

DependsOn

VPC.EIP

DependsOn

CDN.Source

DependsOn

RDS.MySQL.User

DependsOn

CCE.Ingress

DependsOn

CDN.Cache

DependsOn

CCI.ConfigMap

DependsOn

DIS.Stream

DependsOn

CCI.Namespace

DependsOn

CCE.Addon.AutoScaler

DependsOn

VPC.FirewallRule

DependsOn

CCE.Cluster

DependsOn

SFS.FileSystem

DependsOn

CDN.RefreshJob

DependsOn

EVS.SharedVolume

DependsOn

CCI.Job

DependsOn

AOS.Stack

DependsOn

FGS.TimerEventMap

DependsOn

NAT.Instance

DependsOn

FGS.ObsEventMap

DependsOn

OBS.Bucket

DependsOn

APIG.ApiGroup

DependsOn

AOS.Batch

DependsOn

CCE.Secret

DependsOn

CCE.Storage.EVS

DependsOn

CCE.Storage.SFS

DependsOn

CCE.HelmRelease

DependsOn

FGS.ApigEventMap

DependsOn

RDS.MySQL.DataBase

DependsOn

CCE.NodePool

DependsOn

IAM.UserGroup

DependsOn

CCI.Deployment

DependsOn

CDN.Domain

DependsOn

CCE.StatefulSet

DependsOn

VPCEndpoint.Endpoint

DependsOn

CCI.Ingress

DependsOn

CCE.Job

DependsOn

CCI.Secret

DependsOn

APIG.API

DependsOn

FGS.LtsEventMap

DependsOn

ServiceStage.ContainerComponent

DependsOn

CCI.Storage.SFS

DependsOn

VPC.FirewallGroup

DependsOn

CCI.StatefulSet

DependsOn

CCE.DaemonSet

DependsOn

RDS.PostgreSQL

DependsOn

ECS.KeyPair

DependsOn

ServiceStage.StatelessApplication

DependsOn

ServiceStage.StatefulApplication

DependsOn

IAM.Agency

DependsOn

FGS.CtsEventMap

DependsOn

DDS.CommunityReplicaSetOrSingle

DependsOn

FGS.DisEventMap

DependsOn

APIG.Throttle

DependsOn

CCE.Pod

DependsOn

DCS.Redis

DependsOn

CDN.Https

DependsOn

VPC.VPC

DependsOn

CDN.PreheatJob

DependsOn

CDN.Referer

DependsOn

ECS.CloudServer

DependsOn

SMN.Subscription

DependsOn

VPC.Subnet

DependsOn

CCE.ConfigMap

DependsOn

FGS.Function

DependsOn

VPC.FirewallPolicy.Egress

DependsOn

CCI.Service

DependsOn

CCE.Storage.OBS

DependsOn

ServiceStage.Job

DependsOn

CDN.Host

DependsOn

ECS.ServerGroup

DependsOn

RDS.MySQL

DependsOn

VPCEndpoint.EndpointService

DependsOn

FGS.SmnEventMap

Return Value

None.

Blueprint Example

tosca_definitions_version: huaweicloud_tosca_version_1_0
inputs:
  sample_list: # Sample directory name.
    default: A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z
    type: string
  one_wgs_tpid: 
    description: ID of a single sample processing template.
  sleep_time: 
    default: 120
    label: wgs
node_templates:
  sample: # Single sample processing.
    type: HuaweiCloud.AOS.Stack
    properties:
      templateId: {get_input: one_wgs_tpid}
      inputs: 
        sleep_time: {get_input: sleep_time}
  sample-all: # Performs batch operations on sample1.
    type: HuaweiCloud.AOS.Batch
    properties:
      limit: {get_list_length: {split: [',', {get_input: sample_list}]}}  # Number of batch operations.
      step: 10
      items:
        - element: sample # Performs batch operations on each sample. 
          values: # Divide the samples into arrays and obtain array elements. 
            sample_name_list: {split: [',', {get_input: sample_list}]}
          properties: |
            templateId: {get_input: one_wgs_tpid}
            inputs:
              sleep_time: {get_input: sleep_time}
    requirements:
      - item:
          node: sample