1. Packages
  2. Azure Native v2
  3. API Docs
  4. testbase
  5. CustomImage
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.testbase.CustomImage

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

The test base custom image resource. Azure REST API version: 2023-11-01-preview.

Example Usage

CustomImageCreate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var customImage = new AzureNative.TestBase.CustomImage("customImage", new()
    {
        CustomImageName = "image-2cfb2edc-13bc-4d54-8d6e-38b2a233b003",
        DefinitionName = "contoso-image-def",
        ResourceGroupName = "contoso-rg1",
        Source = AzureNative.TestBase.ImageSource.VHD,
        TestBaseAccountName = "contoso-testBaseAccount1",
        VersionName = "1.0.0",
        VhdId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/VHDs/vhd-00ac3ccd-1503-4ee5-aa26-26569cfafe88",
    });

});
Copy
package main

import (
	testbase "github.com/pulumi/pulumi-azure-native-sdk/testbase/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := testbase.NewCustomImage(ctx, "customImage", &testbase.CustomImageArgs{
			CustomImageName:     pulumi.String("image-2cfb2edc-13bc-4d54-8d6e-38b2a233b003"),
			DefinitionName:      pulumi.String("contoso-image-def"),
			ResourceGroupName:   pulumi.String("contoso-rg1"),
			Source:              pulumi.String(testbase.ImageSourceVHD),
			TestBaseAccountName: pulumi.String("contoso-testBaseAccount1"),
			VersionName:         pulumi.String("1.0.0"),
			VhdId:               pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/VHDs/vhd-00ac3ccd-1503-4ee5-aa26-26569cfafe88"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.testbase.CustomImage;
import com.pulumi.azurenative.testbase.CustomImageArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var customImage = new CustomImage("customImage", CustomImageArgs.builder()
            .customImageName("image-2cfb2edc-13bc-4d54-8d6e-38b2a233b003")
            .definitionName("contoso-image-def")
            .resourceGroupName("contoso-rg1")
            .source("VHD")
            .testBaseAccountName("contoso-testBaseAccount1")
            .versionName("1.0.0")
            .vhdId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/VHDs/vhd-00ac3ccd-1503-4ee5-aa26-26569cfafe88")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const customImage = new azure_native.testbase.CustomImage("customImage", {
    customImageName: "image-2cfb2edc-13bc-4d54-8d6e-38b2a233b003",
    definitionName: "contoso-image-def",
    resourceGroupName: "contoso-rg1",
    source: azure_native.testbase.ImageSource.VHD,
    testBaseAccountName: "contoso-testBaseAccount1",
    versionName: "1.0.0",
    vhdId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/VHDs/vhd-00ac3ccd-1503-4ee5-aa26-26569cfafe88",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

custom_image = azure_native.testbase.CustomImage("customImage",
    custom_image_name="image-2cfb2edc-13bc-4d54-8d6e-38b2a233b003",
    definition_name="contoso-image-def",
    resource_group_name="contoso-rg1",
    source=azure_native.testbase.ImageSource.VHD,
    test_base_account_name="contoso-testBaseAccount1",
    version_name="1.0.0",
    vhd_id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/VHDs/vhd-00ac3ccd-1503-4ee5-aa26-26569cfafe88")
Copy
resources:
  customImage:
    type: azure-native:testbase:CustomImage
    properties:
      customImageName: image-2cfb2edc-13bc-4d54-8d6e-38b2a233b003
      definitionName: contoso-image-def
      resourceGroupName: contoso-rg1
      source: VHD
      testBaseAccountName: contoso-testBaseAccount1
      versionName: 1.0.0
      vhdId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/VHDs/vhd-00ac3ccd-1503-4ee5-aa26-26569cfafe88
Copy

Create CustomImage Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new CustomImage(name: string, args: CustomImageArgs, opts?: CustomResourceOptions);
@overload
def CustomImage(resource_name: str,
                args: CustomImageArgs,
                opts: Optional[ResourceOptions] = None)

@overload
def CustomImage(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                definition_name: Optional[str] = None,
                resource_group_name: Optional[str] = None,
                source: Optional[Union[str, ImageSource]] = None,
                test_base_account_name: Optional[str] = None,
                version_name: Optional[str] = None,
                custom_image_name: Optional[str] = None,
                vhd_id: Optional[str] = None)
func NewCustomImage(ctx *Context, name string, args CustomImageArgs, opts ...ResourceOption) (*CustomImage, error)
public CustomImage(string name, CustomImageArgs args, CustomResourceOptions? opts = null)
public CustomImage(String name, CustomImageArgs args)
public CustomImage(String name, CustomImageArgs args, CustomResourceOptions options)
type: azure-native:testbase:CustomImage
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CustomImageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CustomImageArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CustomImageArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CustomImageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CustomImageArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var azure_nativeCustomImageResource = new AzureNative.Testbase.CustomImage("azure-nativeCustomImageResource", new()
{
    DefinitionName = "string",
    ResourceGroupName = "string",
    Source = "string",
    TestBaseAccountName = "string",
    VersionName = "string",
    CustomImageName = "string",
    VhdId = "string",
});
Copy
example, err := testbase.NewCustomImage(ctx, "azure-nativeCustomImageResource", &testbase.CustomImageArgs{
	DefinitionName:      "string",
	ResourceGroupName:   "string",
	Source:              "string",
	TestBaseAccountName: "string",
	VersionName:         "string",
	CustomImageName:     "string",
	VhdId:               "string",
})
Copy
var azure_nativeCustomImageResource = new CustomImage("azure-nativeCustomImageResource", CustomImageArgs.builder()
    .definitionName("string")
    .resourceGroupName("string")
    .source("string")
    .testBaseAccountName("string")
    .versionName("string")
    .customImageName("string")
    .vhdId("string")
    .build());
Copy
azure_native_custom_image_resource = azure_native.testbase.CustomImage("azure-nativeCustomImageResource",
    definition_name=string,
    resource_group_name=string,
    source=string,
    test_base_account_name=string,
    version_name=string,
    custom_image_name=string,
    vhd_id=string)
Copy
const azure_nativeCustomImageResource = new azure_native.testbase.CustomImage("azure-nativeCustomImageResource", {
    definitionName: "string",
    resourceGroupName: "string",
    source: "string",
    testBaseAccountName: "string",
    versionName: "string",
    customImageName: "string",
    vhdId: "string",
});
Copy
type: azure-native:testbase:CustomImage
properties:
    customImageName: string
    definitionName: string
    resourceGroupName: string
    source: string
    testBaseAccountName: string
    versionName: string
    vhdId: string
Copy

CustomImage Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The CustomImage resource accepts the following input properties:

DefinitionName This property is required. string
Image definition name.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
Source This property is required. string | Pulumi.AzureNative.TestBase.ImageSource
Custom image source type.
TestBaseAccountName
This property is required.
Changes to this property will trigger replacement.
string
The resource name of the Test Base Account.
VersionName This property is required. string
Image version name.
CustomImageName Changes to this property will trigger replacement. string
The resource name of the test base custom image.
VhdId string
The Id of the associated VHD resource.
DefinitionName This property is required. string
Image definition name.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
Source This property is required. string | ImageSource
Custom image source type.
TestBaseAccountName
This property is required.
Changes to this property will trigger replacement.
string
The resource name of the Test Base Account.
VersionName This property is required. string
Image version name.
CustomImageName Changes to this property will trigger replacement. string
The resource name of the test base custom image.
VhdId string
The Id of the associated VHD resource.
definitionName This property is required. String
Image definition name.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
source This property is required. String | ImageSource
Custom image source type.
testBaseAccountName
This property is required.
Changes to this property will trigger replacement.
String
The resource name of the Test Base Account.
versionName This property is required. String
Image version name.
customImageName Changes to this property will trigger replacement. String
The resource name of the test base custom image.
vhdId String
The Id of the associated VHD resource.
definitionName This property is required. string
Image definition name.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
source This property is required. string | ImageSource
Custom image source type.
testBaseAccountName
This property is required.
Changes to this property will trigger replacement.
string
The resource name of the Test Base Account.
versionName This property is required. string
Image version name.
customImageName Changes to this property will trigger replacement. string
The resource name of the test base custom image.
vhdId string
The Id of the associated VHD resource.
definition_name This property is required. str
Image definition name.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group. The name is case insensitive.
source This property is required. str | ImageSource
Custom image source type.
test_base_account_name
This property is required.
Changes to this property will trigger replacement.
str
The resource name of the Test Base Account.
version_name This property is required. str
Image version name.
custom_image_name Changes to this property will trigger replacement. str
The resource name of the test base custom image.
vhd_id str
The Id of the associated VHD resource.
definitionName This property is required. String
Image definition name.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
source This property is required. String | "Unknown" | "VHD"
Custom image source type.
testBaseAccountName
This property is required.
Changes to this property will trigger replacement.
String
The resource name of the Test Base Account.
versionName This property is required. String
Image version name.
customImageName Changes to this property will trigger replacement. String
The resource name of the test base custom image.
vhdId String
The Id of the associated VHD resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the CustomImage resource produces the following output properties:

CreationTime string
The UTC timestamp when the custom image was published.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
OsDiskImageSizeInGB double
This property indicates the size of the VHD to be created.
Product string
Product of the custom image.
ProvisioningState string
The provisioning state of the resource.
Release string
Release of the custom image OS.
ReleaseVersionDate string
The release version date of the release of the custom image OS.
Status string
Status of the custom image.
SystemData Pulumi.AzureNative.TestBase.Outputs.SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
ValidationResults Pulumi.AzureNative.TestBase.Outputs.ImageValidationResultsResponse
The validation result of the custom image.
VhdFileName string
The file name of the associated VHD resource.
CreationTime string
The UTC timestamp when the custom image was published.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
OsDiskImageSizeInGB float64
This property indicates the size of the VHD to be created.
Product string
Product of the custom image.
ProvisioningState string
The provisioning state of the resource.
Release string
Release of the custom image OS.
ReleaseVersionDate string
The release version date of the release of the custom image OS.
Status string
Status of the custom image.
SystemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
ValidationResults ImageValidationResultsResponse
The validation result of the custom image.
VhdFileName string
The file name of the associated VHD resource.
creationTime String
The UTC timestamp when the custom image was published.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
osDiskImageSizeInGB Double
This property indicates the size of the VHD to be created.
product String
Product of the custom image.
provisioningState String
The provisioning state of the resource.
release String
Release of the custom image OS.
releaseVersionDate String
The release version date of the release of the custom image OS.
status String
Status of the custom image.
systemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
validationResults ImageValidationResultsResponse
The validation result of the custom image.
vhdFileName String
The file name of the associated VHD resource.
creationTime string
The UTC timestamp when the custom image was published.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the resource
osDiskImageSizeInGB number
This property indicates the size of the VHD to be created.
product string
Product of the custom image.
provisioningState string
The provisioning state of the resource.
release string
Release of the custom image OS.
releaseVersionDate string
The release version date of the release of the custom image OS.
status string
Status of the custom image.
systemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
validationResults ImageValidationResultsResponse
The validation result of the custom image.
vhdFileName string
The file name of the associated VHD resource.
creation_time str
The UTC timestamp when the custom image was published.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the resource
os_disk_image_size_in_gb float
This property indicates the size of the VHD to be created.
product str
Product of the custom image.
provisioning_state str
The provisioning state of the resource.
release str
Release of the custom image OS.
release_version_date str
The release version date of the release of the custom image OS.
status str
Status of the custom image.
system_data SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type str
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
validation_results ImageValidationResultsResponse
The validation result of the custom image.
vhd_file_name str
The file name of the associated VHD resource.
creationTime String
The UTC timestamp when the custom image was published.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
osDiskImageSizeInGB Number
This property indicates the size of the VHD to be created.
product String
Product of the custom image.
provisioningState String
The provisioning state of the resource.
release String
Release of the custom image OS.
releaseVersionDate String
The release version date of the release of the custom image OS.
status String
Status of the custom image.
systemData Property Map
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
validationResults Property Map
The validation result of the custom image.
vhdFileName String
The file name of the associated VHD resource.

Supporting Types

ImageSource
, ImageSourceArgs

Unknown
UnknownUnknown image source type.
VHD
VHDSpecify image onboarding through VHD.
ImageSourceUnknown
UnknownUnknown image source type.
ImageSourceVHD
VHDSpecify image onboarding through VHD.
Unknown
UnknownUnknown image source type.
VHD
VHDSpecify image onboarding through VHD.
Unknown
UnknownUnknown image source type.
VHD
VHDSpecify image onboarding through VHD.
UNKNOWN
UnknownUnknown image source type.
VHD
VHDSpecify image onboarding through VHD.
"Unknown"
UnknownUnknown image source type.
"VHD"
VHDSpecify image onboarding through VHD.

ImageValidationResultsResponse
, ImageValidationResultsResponseArgs

Results []VerificationResultResponse
The validation results of the image.
results List<VerificationResultResponse>
The validation results of the image.
results VerificationResultResponse[]
The validation results of the image.
results Sequence[VerificationResultResponse]
The validation results of the image.
results List<Property Map>
The validation results of the image.

SystemDataResponse
, SystemDataResponseArgs

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The type of identity that last modified the resource.
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The type of identity that last modified the resource.
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The type of identity that last modified the resource.
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.
createdAt string
The timestamp of resource creation (UTC).
createdBy string
The identity that created the resource.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The type of identity that last modified the resource.
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
The type of identity that last modified the resource.
created_at str
The timestamp of resource creation (UTC).
created_by str
The identity that created the resource.
created_by_type str
The type of identity that created the resource.
last_modified_at str
The type of identity that last modified the resource.
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The type of identity that last modified the resource.
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.

VerificationResultResponse
, VerificationResultResponseArgs

Result This property is required. string
Indicates if the validation or rule checking is passed.
Message string
Message for clarification.
VerificationName string
The name of the verification rule.
Result This property is required. string
Indicates if the validation or rule checking is passed.
Message string
Message for clarification.
VerificationName string
The name of the verification rule.
result This property is required. String
Indicates if the validation or rule checking is passed.
message String
Message for clarification.
verificationName String
The name of the verification rule.
result This property is required. string
Indicates if the validation or rule checking is passed.
message string
Message for clarification.
verificationName string
The name of the verification rule.
result This property is required. str
Indicates if the validation or rule checking is passed.
message str
Message for clarification.
verification_name str
The name of the verification rule.
result This property is required. String
Indicates if the validation or rule checking is passed.
message String
Message for clarification.
verificationName String
The name of the verification rule.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:testbase:CustomImage image-2cfb2edc-13bc-4d54-8d6e-38b2a233b003 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/customImages/{customImageName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi