1. Packages
  2. Selectel Provider
  3. API Docs
  4. VpcLicenseV2
selectel 6.4.0 published on Monday, Apr 14, 2025 by selectel

selectel.VpcLicenseV2

Explore with Pulumi AI

selectel logo
selectel 6.4.0 published on Monday, Apr 14, 2025 by selectel

    Manages a license for cloud servers using public API v2.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as selectel from "@pulumi/selectel";
    
    const licenseWindows2016Standard = new selectel.VpcLicenseV2("licenseWindows2016Standard", {
        projectId: selectel_vpc_project_v2.project_1.id,
        region: "ru-2",
        type: "license_windows_2012_standard",
    });
    
    import pulumi
    import pulumi_selectel as selectel
    
    license_windows2016_standard = selectel.VpcLicenseV2("licenseWindows2016Standard",
        project_id=selectel_vpc_project_v2["project_1"]["id"],
        region="ru-2",
        type="license_windows_2012_standard")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/selectel/v6/selectel"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := selectel.NewVpcLicenseV2(ctx, "licenseWindows2016Standard", &selectel.VpcLicenseV2Args{
    			ProjectId: pulumi.Any(selectel_vpc_project_v2.Project_1.Id),
    			Region:    pulumi.String("ru-2"),
    			Type:      pulumi.String("license_windows_2012_standard"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Selectel = Pulumi.Selectel;
    
    return await Deployment.RunAsync(() => 
    {
        var licenseWindows2016Standard = new Selectel.VpcLicenseV2("licenseWindows2016Standard", new()
        {
            ProjectId = selectel_vpc_project_v2.Project_1.Id,
            Region = "ru-2",
            Type = "license_windows_2012_standard",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.selectel.VpcLicenseV2;
    import com.pulumi.selectel.VpcLicenseV2Args;
    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 licenseWindows2016Standard = new VpcLicenseV2("licenseWindows2016Standard", VpcLicenseV2Args.builder()
                .projectId(selectel_vpc_project_v2.project_1().id())
                .region("ru-2")
                .type("license_windows_2012_standard")
                .build());
    
        }
    }
    
    resources:
      licenseWindows2016Standard:
        type: selectel:VpcLicenseV2
        properties:
          projectId: ${selectel_vpc_project_v2.project_1.id}
          region: ru-2
          type: license_windows_2012_standard
    

    Create VpcLicenseV2 Resource

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

    Constructor syntax

    new VpcLicenseV2(name: string, args: VpcLicenseV2Args, opts?: CustomResourceOptions);
    @overload
    def VpcLicenseV2(resource_name: str,
                     args: VpcLicenseV2Args,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcLicenseV2(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     project_id: Optional[str] = None,
                     region: Optional[str] = None,
                     type: Optional[str] = None,
                     vpc_license_v2_id: Optional[str] = None)
    func NewVpcLicenseV2(ctx *Context, name string, args VpcLicenseV2Args, opts ...ResourceOption) (*VpcLicenseV2, error)
    public VpcLicenseV2(string name, VpcLicenseV2Args args, CustomResourceOptions? opts = null)
    public VpcLicenseV2(String name, VpcLicenseV2Args args)
    public VpcLicenseV2(String name, VpcLicenseV2Args args, CustomResourceOptions options)
    
    type: selectel:VpcLicenseV2
    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 VpcLicenseV2Args
    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 VpcLicenseV2Args
    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 VpcLicenseV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcLicenseV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcLicenseV2Args
    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 vpcLicenseV2Resource = new Selectel.VpcLicenseV2("vpcLicenseV2Resource", new()
    {
        ProjectId = "string",
        Region = "string",
        Type = "string",
        VpcLicenseV2Id = "string",
    });
    
    example, err := selectel.NewVpcLicenseV2(ctx, "vpcLicenseV2Resource", &selectel.VpcLicenseV2Args{
    	ProjectId:      pulumi.String("string"),
    	Region:         pulumi.String("string"),
    	Type:           pulumi.String("string"),
    	VpcLicenseV2Id: pulumi.String("string"),
    })
    
    var vpcLicenseV2Resource = new VpcLicenseV2("vpcLicenseV2Resource", VpcLicenseV2Args.builder()
        .projectId("string")
        .region("string")
        .type("string")
        .vpcLicenseV2Id("string")
        .build());
    
    vpc_license_v2_resource = selectel.VpcLicenseV2("vpcLicenseV2Resource",
        project_id="string",
        region="string",
        type="string",
        vpc_license_v2_id="string")
    
    const vpcLicenseV2Resource = new selectel.VpcLicenseV2("vpcLicenseV2Resource", {
        projectId: "string",
        region: "string",
        type: "string",
        vpcLicenseV2Id: "string",
    });
    
    type: selectel:VpcLicenseV2
    properties:
        projectId: string
        region: string
        type: string
        vpcLicenseV2Id: string
    

    VpcLicenseV2 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 VpcLicenseV2 resource accepts the following input properties:

    ProjectId string
    Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    Region string
    Pool where you can use the license, for example, ru-3. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix.
    Type string
    Type of the license. Changing this creates a new license. Available values are license_windows_2012_standard, license_windows_2016_standard, license_windows_2019_standard.
    VpcLicenseV2Id string
    Unique identifier of the cloud server.
    ProjectId string
    Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    Region string
    Pool where you can use the license, for example, ru-3. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix.
    Type string
    Type of the license. Changing this creates a new license. Available values are license_windows_2012_standard, license_windows_2016_standard, license_windows_2019_standard.
    VpcLicenseV2Id string
    Unique identifier of the cloud server.
    projectId String
    Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    region String
    Pool where you can use the license, for example, ru-3. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix.
    type String
    Type of the license. Changing this creates a new license. Available values are license_windows_2012_standard, license_windows_2016_standard, license_windows_2019_standard.
    vpcLicenseV2Id String
    Unique identifier of the cloud server.
    projectId string
    Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    region string
    Pool where you can use the license, for example, ru-3. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix.
    type string
    Type of the license. Changing this creates a new license. Available values are license_windows_2012_standard, license_windows_2016_standard, license_windows_2019_standard.
    vpcLicenseV2Id string
    Unique identifier of the cloud server.
    project_id str
    Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    region str
    Pool where you can use the license, for example, ru-3. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix.
    type str
    Type of the license. Changing this creates a new license. Available values are license_windows_2012_standard, license_windows_2016_standard, license_windows_2019_standard.
    vpc_license_v2_id str
    Unique identifier of the cloud server.
    projectId String
    Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    region String
    Pool where you can use the license, for example, ru-3. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix.
    type String
    Type of the license. Changing this creates a new license. Available values are license_windows_2012_standard, license_windows_2016_standard, license_windows_2019_standard.
    vpcLicenseV2Id String
    Unique identifier of the cloud server.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    NetworkId string
    Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
    PortId string
    Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
    Servers List<VpcLicenseV2Server>
    Cloud servers that use the license.
    Status string
    Status of the cloud server.
    SubnetId string
    Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
    Id string
    The provider-assigned unique ID for this managed resource.
    NetworkId string
    Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
    PortId string
    Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
    Servers []VpcLicenseV2Server
    Cloud servers that use the license.
    Status string
    Status of the cloud server.
    SubnetId string
    Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
    id String
    The provider-assigned unique ID for this managed resource.
    networkId String
    Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
    portId String
    Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
    servers List<VpcLicenseV2Server>
    Cloud servers that use the license.
    status String
    Status of the cloud server.
    subnetId String
    Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
    id string
    The provider-assigned unique ID for this managed resource.
    networkId string
    Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
    portId string
    Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
    servers VpcLicenseV2Server[]
    Cloud servers that use the license.
    status string
    Status of the cloud server.
    subnetId string
    Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
    id str
    The provider-assigned unique ID for this managed resource.
    network_id str
    Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
    port_id str
    Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
    servers Sequence[VpcLicenseV2Server]
    Cloud servers that use the license.
    status str
    Status of the cloud server.
    subnet_id str
    Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
    id String
    The provider-assigned unique ID for this managed resource.
    networkId String
    Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
    portId String
    Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
    servers List<Property Map>
    Cloud servers that use the license.
    status String
    Status of the cloud server.
    subnetId String
    Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.

    Look up Existing VpcLicenseV2 Resource

    Get an existing VpcLicenseV2 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?: VpcLicenseV2State, opts?: CustomResourceOptions): VpcLicenseV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            network_id: Optional[str] = None,
            port_id: Optional[str] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None,
            servers: Optional[Sequence[VpcLicenseV2ServerArgs]] = None,
            status: Optional[str] = None,
            subnet_id: Optional[str] = None,
            type: Optional[str] = None,
            vpc_license_v2_id: Optional[str] = None) -> VpcLicenseV2
    func GetVpcLicenseV2(ctx *Context, name string, id IDInput, state *VpcLicenseV2State, opts ...ResourceOption) (*VpcLicenseV2, error)
    public static VpcLicenseV2 Get(string name, Input<string> id, VpcLicenseV2State? state, CustomResourceOptions? opts = null)
    public static VpcLicenseV2 get(String name, Output<String> id, VpcLicenseV2State state, CustomResourceOptions options)
    resources:  _:    type: selectel:VpcLicenseV2    get:      id: ${id}
    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:
    NetworkId string
    Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
    PortId string
    Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
    ProjectId string
    Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    Region string
    Pool where you can use the license, for example, ru-3. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix.
    Servers List<VpcLicenseV2Server>
    Cloud servers that use the license.
    Status string
    Status of the cloud server.
    SubnetId string
    Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
    Type string
    Type of the license. Changing this creates a new license. Available values are license_windows_2012_standard, license_windows_2016_standard, license_windows_2019_standard.
    VpcLicenseV2Id string
    Unique identifier of the cloud server.
    NetworkId string
    Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
    PortId string
    Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
    ProjectId string
    Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    Region string
    Pool where you can use the license, for example, ru-3. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix.
    Servers []VpcLicenseV2ServerArgs
    Cloud servers that use the license.
    Status string
    Status of the cloud server.
    SubnetId string
    Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
    Type string
    Type of the license. Changing this creates a new license. Available values are license_windows_2012_standard, license_windows_2016_standard, license_windows_2019_standard.
    VpcLicenseV2Id string
    Unique identifier of the cloud server.
    networkId String
    Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
    portId String
    Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
    projectId String
    Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    region String
    Pool where you can use the license, for example, ru-3. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix.
    servers List<VpcLicenseV2Server>
    Cloud servers that use the license.
    status String
    Status of the cloud server.
    subnetId String
    Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
    type String
    Type of the license. Changing this creates a new license. Available values are license_windows_2012_standard, license_windows_2016_standard, license_windows_2019_standard.
    vpcLicenseV2Id String
    Unique identifier of the cloud server.
    networkId string
    Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
    portId string
    Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
    projectId string
    Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    region string
    Pool where you can use the license, for example, ru-3. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix.
    servers VpcLicenseV2Server[]
    Cloud servers that use the license.
    status string
    Status of the cloud server.
    subnetId string
    Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
    type string
    Type of the license. Changing this creates a new license. Available values are license_windows_2012_standard, license_windows_2016_standard, license_windows_2019_standard.
    vpcLicenseV2Id string
    Unique identifier of the cloud server.
    network_id str
    Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
    port_id str
    Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
    project_id str
    Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    region str
    Pool where you can use the license, for example, ru-3. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix.
    servers Sequence[VpcLicenseV2ServerArgs]
    Cloud servers that use the license.
    status str
    Status of the cloud server.
    subnet_id str
    Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
    type str
    Type of the license. Changing this creates a new license. Available values are license_windows_2012_standard, license_windows_2016_standard, license_windows_2019_standard.
    vpc_license_v2_id str
    Unique identifier of the cloud server.
    networkId String
    Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
    portId String
    Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
    projectId String
    Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    region String
    Pool where you can use the license, for example, ru-3. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix.
    servers List<Property Map>
    Cloud servers that use the license.
    status String
    Status of the cloud server.
    subnetId String
    Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
    type String
    Type of the license. Changing this creates a new license. Available values are license_windows_2012_standard, license_windows_2016_standard, license_windows_2019_standard.
    vpcLicenseV2Id String
    Unique identifier of the cloud server.

    Supporting Types

    VpcLicenseV2Server, VpcLicenseV2ServerArgs

    Id string
    Unique identifier of the cloud server.
    Name string
    Name of the cloud server.
    Status string
    Status of the cloud server.
    Id string
    Unique identifier of the cloud server.
    Name string
    Name of the cloud server.
    Status string
    Status of the cloud server.
    id String
    Unique identifier of the cloud server.
    name String
    Name of the cloud server.
    status String
    Status of the cloud server.
    id string
    Unique identifier of the cloud server.
    name string
    Name of the cloud server.
    status string
    Status of the cloud server.
    id str
    Unique identifier of the cloud server.
    name str
    Name of the cloud server.
    status str
    Status of the cloud server.
    id String
    Unique identifier of the cloud server.
    name String
    Name of the cloud server.
    status String
    Status of the cloud server.

    Import

    You can import a license:

    export OS_DOMAIN_NAME=<account_id>

    export OS_USERNAME=

    export OS_PASSWORD=

    $ pulumi import selectel:index/vpcLicenseV2:VpcLicenseV2 license_1 <license_id>
    

    where:

    • <account_id> — Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.

    • <username> — Name of the service user. To get the name, in the Control panel, go to Identity & Access ManagementUser management ⟶ the Service users tab ⟶ copy the name of the required user. Learn more about Service users.

    • <password> — Password of the service user.

    • <license_id> — Unique identifier of the license, for example, 4123. To get the license ID, use Selectel Cloud Management API.

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

    Package Details

    Repository
    selectel selectel/terraform-provider-selectel
    License
    Notes
    This Pulumi package is based on the selectel Terraform Provider.
    selectel logo
    selectel 6.4.0 published on Monday, Apr 14, 2025 by selectel