AutomationBuilderPurpose: Initializes the AutomationBuilder with the provided arguments and sets up the initial state.
Usage:
const builder = new AutomationBuilder({
name: 'example',
group: { resourceGroupName: 'resourceGroup' },
vaultInfo: { id: 'vaultId' },
envRoles: { /* environment roles info */ },
envUIDInfo: { id: 'userAssignedIdentityId', clientId: 'clientId' },
enableEncryption: true,
dependsOn: [],
});
withSkuPurpose: Sets the SKU for the Automation Account.
Usage:
builder.withSku(automation.SkuNameEnum.Basic);
buildPurpose: Builds the entire Automation Account resource with the configured properties.
Usage:
const resourceInfo = builder.build();
console.log(resourceInfo);
Here is a complete example that demonstrates how to use the AutomationBuilder class, ensuring that the build() method is called at the end:
const builder = new AutomationBuilder({
name: 'example',
group: { resourceGroupName: 'resourceGroup' },
vaultInfo: { id: 'vaultId' },
envRoles: { /* environment roles info */ },
envUIDInfo: { id: 'userAssignedIdentityId', clientId: 'clientId' },
enableEncryption: true,
dependsOn: [],
});
builder.withSku(automation.SkuNameEnum.Basic);
const resourceInfo = builder.build();
console.log(resourceInfo);
Purpose: Initializes the AutomationBuilder with the provided arguments and sets up the initial state.
Usage:
const builder = new AutomationBuilder({
name: 'example',
group: { resourceGroupName: 'resourceGroup' },
vaultInfo: { id: 'vaultId' },
envRoles: { /* environment roles info */ },
envUIDInfo: { id: 'userAssignedIdentityId', clientId: 'clientId' },
enableEncryption: true,
dependsOn: [],
});
withSkuPurpose: Sets the SKU for the Automation Account.
Usage:
builder.withSku(automation.SkuNameEnum.Basic);
buildPurpose: Builds the entire Automation Account resource with the configured properties.
Usage:
const resourceInfo = builder.build();
console.log(resourceInfo);
Here is a complete example that demonstrates how to use the AutomationBuilder class, ensuring that the build() method is called at the end:
const builder = new AutomationBuilder({
name: 'example',
group: { resourceGroupName: 'resourceGroup' },
vaultInfo: { id: 'vaultId' },
envRoles: { /* environment roles info */ },
envUIDInfo: { id: 'userAssignedIdentityId', clientId: 'clientId' },
enableEncryption: true,
dependsOn: [],
});
builder.withSku(automation.SkuNameEnum.Basic);
const resourceInfo = builder.build();
console.log(resourceInfo);
This example demonstrates how to create an AutomationBuilder instance, configure it with various settings, and finally build the Automation Account resource. The build() method is called last to ensure the resource is fully constructed.