1. Packages
  2. Azure Classic
  3. API Docs
  4. loadtest
  5. LoadTest

We recommend using Azure Native.

Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi

azure.loadtest.LoadTest

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi

    Manages a Load Test Service.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleUserAssignedIdentity = new azure.authorization.UserAssignedIdentity("example", {
        name: "example",
        resourceGroupName: example.name,
        location: example.location,
    });
    const exampleLoadTest = new azure.loadtest.LoadTest("example", {
        location: example.location,
        name: "example",
        resourceGroupName: example.name,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_user_assigned_identity = azure.authorization.UserAssignedIdentity("example",
        name="example",
        resource_group_name=example.name,
        location=example.location)
    example_load_test = azure.loadtest.LoadTest("example",
        location=example.location,
        name="example",
        resource_group_name=example.name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/authorization"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/loadtest"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{
    			Name:              pulumi.String("example"),
    			ResourceGroupName: example.Name,
    			Location:          example.Location,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = loadtest.NewLoadTest(ctx, "example", &loadtest.LoadTestArgs{
    			Location:          example.Location,
    			Name:              pulumi.String("example"),
    			ResourceGroupName: example.Name,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleUserAssignedIdentity = new Azure.Authorization.UserAssignedIdentity("example", new()
        {
            Name = "example",
            ResourceGroupName = example.Name,
            Location = example.Location,
        });
    
        var exampleLoadTest = new Azure.LoadTest.LoadTest("example", new()
        {
            Location = example.Location,
            Name = "example",
            ResourceGroupName = example.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.authorization.UserAssignedIdentity;
    import com.pulumi.azure.authorization.UserAssignedIdentityArgs;
    import com.pulumi.azure.loadtest.LoadTest;
    import com.pulumi.azure.loadtest.LoadTestArgs;
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()        
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleUserAssignedIdentity = new UserAssignedIdentity("exampleUserAssignedIdentity", UserAssignedIdentityArgs.builder()        
                .name("example")
                .resourceGroupName(example.name())
                .location(example.location())
                .build());
    
            var exampleLoadTest = new LoadTest("exampleLoadTest", LoadTestArgs.builder()        
                .location(example.location())
                .name("example")
                .resourceGroupName(example.name())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleUserAssignedIdentity:
        type: azure:authorization:UserAssignedIdentity
        name: example
        properties:
          name: example
          resourceGroupName: ${example.name}
          location: ${example.location}
      exampleLoadTest:
        type: azure:loadtest:LoadTest
        name: example
        properties:
          location: ${example.location}
          name: example
          resourceGroupName: ${example.name}
    

    Blocks Reference

    identity Block

    The identity block supports the following arguments:

    • type - (Required) Specifies the type of Managed Identity that should be assigned to this Load Test. Possible values are SystemAssigned, SystemAssigned, UserAssigned and UserAssigned.
    • identity_ids - (Optional) A list of the User Assigned Identity IDs that should be assigned to this Load Test.

    In addition to the arguments defined above, the identity block exports the following attributes:

    • principal_id - The Principal ID for the System-Assigned Managed Identity assigned to this Load Test.
    • tenant_id - The Tenant ID for the System-Assigned Managed Identity assigned to this Load Test.

    Create LoadTest Resource

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

    Constructor syntax

    new LoadTest(name: string, args: LoadTestArgs, opts?: CustomResourceOptions);
    @overload
    def LoadTest(resource_name: str,
                 args: LoadTestArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def LoadTest(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 resource_group_name: Optional[str] = None,
                 description: Optional[str] = None,
                 identity: Optional[LoadTestIdentityArgs] = None,
                 location: Optional[str] = None,
                 name: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None)
    func NewLoadTest(ctx *Context, name string, args LoadTestArgs, opts ...ResourceOption) (*LoadTest, error)
    public LoadTest(string name, LoadTestArgs args, CustomResourceOptions? opts = null)
    public LoadTest(String name, LoadTestArgs args)
    public LoadTest(String name, LoadTestArgs args, CustomResourceOptions options)
    
    type: azure:loadtest:LoadTest
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

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

    Example

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

    var loadTestResource = new Azure.LoadTest.LoadTest("loadTestResource", new()
    {
        ResourceGroupName = "string",
        Description = "string",
        Identity = new Azure.LoadTest.Inputs.LoadTestIdentityArgs
        {
            Type = "string",
            IdentityIds = new[]
            {
                "string",
            },
            PrincipalId = "string",
            TenantId = "string",
        },
        Location = "string",
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := loadtest.NewLoadTest(ctx, "loadTestResource", &loadtest.LoadTestArgs{
    	ResourceGroupName: pulumi.String("string"),
    	Description:       pulumi.String("string"),
    	Identity: &loadtest.LoadTestIdentityArgs{
    		Type: pulumi.String("string"),
    		IdentityIds: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		PrincipalId: pulumi.String("string"),
    		TenantId:    pulumi.String("string"),
    	},
    	Location: pulumi.String("string"),
    	Name:     pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var loadTestResource = new LoadTest("loadTestResource", LoadTestArgs.builder()        
        .resourceGroupName("string")
        .description("string")
        .identity(LoadTestIdentityArgs.builder()
            .type("string")
            .identityIds("string")
            .principalId("string")
            .tenantId("string")
            .build())
        .location("string")
        .name("string")
        .tags(Map.of("string", "string"))
        .build());
    
    load_test_resource = azure.loadtest.LoadTest("loadTestResource",
        resource_group_name="string",
        description="string",
        identity=azure.loadtest.LoadTestIdentityArgs(
            type="string",
            identity_ids=["string"],
            principal_id="string",
            tenant_id="string",
        ),
        location="string",
        name="string",
        tags={
            "string": "string",
        })
    
    const loadTestResource = new azure.loadtest.LoadTest("loadTestResource", {
        resourceGroupName: "string",
        description: "string",
        identity: {
            type: "string",
            identityIds: ["string"],
            principalId: "string",
            tenantId: "string",
        },
        location: "string",
        name: "string",
        tags: {
            string: "string",
        },
    });
    
    type: azure:loadtest:LoadTest
    properties:
        description: string
        identity:
            identityIds:
                - string
            principalId: string
            tenantId: string
            type: string
        location: string
        name: string
        resourceGroupName: string
        tags:
            string: string
    

    LoadTest Resource Properties

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

    Inputs

    The LoadTest resource accepts the following input properties:

    ResourceGroupName string
    Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created.
    Description string
    Description of the resource. Changing this forces a new Load Test to be created.
    Identity LoadTestIdentity
    An identity block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.
    Location string
    The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created.
    Name string
    Specifies the name of this Load Test. Changing this forces a new Load Test to be created.
    Tags Dictionary<string, string>
    A mapping of tags which should be assigned to the Load Test.
    ResourceGroupName string
    Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created.
    Description string
    Description of the resource. Changing this forces a new Load Test to be created.
    Identity LoadTestIdentityArgs
    An identity block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.
    Location string
    The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created.
    Name string
    Specifies the name of this Load Test. Changing this forces a new Load Test to be created.
    Tags map[string]string
    A mapping of tags which should be assigned to the Load Test.
    resourceGroupName String
    Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created.
    description String
    Description of the resource. Changing this forces a new Load Test to be created.
    identity LoadTestIdentity
    An identity block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.
    location String
    The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created.
    name String
    Specifies the name of this Load Test. Changing this forces a new Load Test to be created.
    tags Map<String,String>
    A mapping of tags which should be assigned to the Load Test.
    resourceGroupName string
    Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created.
    description string
    Description of the resource. Changing this forces a new Load Test to be created.
    identity LoadTestIdentity
    An identity block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.
    location string
    The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created.
    name string
    Specifies the name of this Load Test. Changing this forces a new Load Test to be created.
    tags {[key: string]: string}
    A mapping of tags which should be assigned to the Load Test.
    resource_group_name str
    Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created.
    description str
    Description of the resource. Changing this forces a new Load Test to be created.
    identity LoadTestIdentityArgs
    An identity block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.
    location str
    The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created.
    name str
    Specifies the name of this Load Test. Changing this forces a new Load Test to be created.
    tags Mapping[str, str]
    A mapping of tags which should be assigned to the Load Test.
    resourceGroupName String
    Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created.
    description String
    Description of the resource. Changing this forces a new Load Test to be created.
    identity Property Map
    An identity block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.
    location String
    The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created.
    name String
    Specifies the name of this Load Test. Changing this forces a new Load Test to be created.
    tags Map<String>
    A mapping of tags which should be assigned to the Load Test.

    Outputs

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

    DataPlaneUri string
    Resource data plane URI.
    Id string
    The provider-assigned unique ID for this managed resource.
    DataPlaneUri string
    Resource data plane URI.
    Id string
    The provider-assigned unique ID for this managed resource.
    dataPlaneUri String
    Resource data plane URI.
    id String
    The provider-assigned unique ID for this managed resource.
    dataPlaneUri string
    Resource data plane URI.
    id string
    The provider-assigned unique ID for this managed resource.
    data_plane_uri str
    Resource data plane URI.
    id str
    The provider-assigned unique ID for this managed resource.
    dataPlaneUri String
    Resource data plane URI.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing LoadTest Resource

    Get an existing LoadTest resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: LoadTestState, opts?: CustomResourceOptions): LoadTest
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            data_plane_uri: Optional[str] = None,
            description: Optional[str] = None,
            identity: Optional[LoadTestIdentityArgs] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None) -> LoadTest
    func GetLoadTest(ctx *Context, name string, id IDInput, state *LoadTestState, opts ...ResourceOption) (*LoadTest, error)
    public static LoadTest Get(string name, Input<string> id, LoadTestState? state, CustomResourceOptions? opts = null)
    public static LoadTest get(String name, Output<String> id, LoadTestState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DataPlaneUri string
    Resource data plane URI.
    Description string
    Description of the resource. Changing this forces a new Load Test to be created.
    Identity LoadTestIdentity
    An identity block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.
    Location string
    The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created.
    Name string
    Specifies the name of this Load Test. Changing this forces a new Load Test to be created.
    ResourceGroupName string
    Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created.
    Tags Dictionary<string, string>
    A mapping of tags which should be assigned to the Load Test.
    DataPlaneUri string
    Resource data plane URI.
    Description string
    Description of the resource. Changing this forces a new Load Test to be created.
    Identity LoadTestIdentityArgs
    An identity block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.
    Location string
    The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created.
    Name string
    Specifies the name of this Load Test. Changing this forces a new Load Test to be created.
    ResourceGroupName string
    Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created.
    Tags map[string]string
    A mapping of tags which should be assigned to the Load Test.
    dataPlaneUri String
    Resource data plane URI.
    description String
    Description of the resource. Changing this forces a new Load Test to be created.
    identity LoadTestIdentity
    An identity block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.
    location String
    The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created.
    name String
    Specifies the name of this Load Test. Changing this forces a new Load Test to be created.
    resourceGroupName String
    Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created.
    tags Map<String,String>
    A mapping of tags which should be assigned to the Load Test.
    dataPlaneUri string
    Resource data plane URI.
    description string
    Description of the resource. Changing this forces a new Load Test to be created.
    identity LoadTestIdentity
    An identity block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.
    location string
    The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created.
    name string
    Specifies the name of this Load Test. Changing this forces a new Load Test to be created.
    resourceGroupName string
    Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created.
    tags {[key: string]: string}
    A mapping of tags which should be assigned to the Load Test.
    data_plane_uri str
    Resource data plane URI.
    description str
    Description of the resource. Changing this forces a new Load Test to be created.
    identity LoadTestIdentityArgs
    An identity block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.
    location str
    The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created.
    name str
    Specifies the name of this Load Test. Changing this forces a new Load Test to be created.
    resource_group_name str
    Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created.
    tags Mapping[str, str]
    A mapping of tags which should be assigned to the Load Test.
    dataPlaneUri String
    Resource data plane URI.
    description String
    Description of the resource. Changing this forces a new Load Test to be created.
    identity Property Map
    An identity block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.
    location String
    The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created.
    name String
    Specifies the name of this Load Test. Changing this forces a new Load Test to be created.
    resourceGroupName String
    Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created.
    tags Map<String>
    A mapping of tags which should be assigned to the Load Test.

    Supporting Types

    LoadTestIdentity, LoadTestIdentityArgs

    Type string
    IdentityIds List<string>
    PrincipalId string
    TenantId string
    Type string
    IdentityIds []string
    PrincipalId string
    TenantId string
    type String
    identityIds List<String>
    principalId String
    tenantId String
    type string
    identityIds string[]
    principalId string
    tenantId string
    type str
    identity_ids Sequence[str]
    principal_id str
    tenant_id str
    type String
    identityIds List<String>
    principalId String
    tenantId String

    Import

    An existing Load Test can be imported into Terraform using the resource id, e.g.

    $ pulumi import azure:loadtest/loadTest:LoadTest example /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LoadTestService/loadTests/{loadTestName}
    
    • Where {subscriptionId} is the ID of the Azure Subscription where the Load Test exists. For example 12345678-1234-9876-4563-123456789012.

    • Where {resourceGroupName} is the name of Resource Group where this Load Test exists. For example example-resource-group.

    • Where {loadTestName} is the name of the Load Test. For example loadTestValue.

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

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi