1. Packages
  2. Volcengine
  3. API Docs
  4. cen
  5. GrantInstance
Volcengine v0.0.25 published on Tuesday, Jul 2, 2024 by Volcengine

volcengine.cen.GrantInstance

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.25 published on Tuesday, Jul 2, 2024 by Volcengine

    Provides a resource to manage cen grant instance

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Volcengine.Cen.GrantInstance("foo", new()
        {
            CenId = "cen-2d6zdn0c1z5s058ozfcyf4lee",
            CenOwnerId = "210000****",
            InstanceId = "vpc-2bysvq1xx543k2dx0eeulpeiv",
            InstanceRegionId = "cn-beijing",
            InstanceType = "VPC",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cen"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cen.NewGrantInstance(ctx, "foo", &cen.GrantInstanceArgs{
    			CenId:            pulumi.String("cen-2d6zdn0c1z5s058ozfcyf4lee"),
    			CenOwnerId:       pulumi.String("210000****"),
    			InstanceId:       pulumi.String("vpc-2bysvq1xx543k2dx0eeulpeiv"),
    			InstanceRegionId: pulumi.String("cn-beijing"),
    			InstanceType:     pulumi.String("VPC"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.cen.GrantInstance;
    import com.pulumi.volcengine.cen.GrantInstanceArgs;
    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 foo = new GrantInstance("foo", GrantInstanceArgs.builder()        
                .cenId("cen-2d6zdn0c1z5s058ozfcyf4lee")
                .cenOwnerId("210000****")
                .instanceId("vpc-2bysvq1xx543k2dx0eeulpeiv")
                .instanceRegionId("cn-beijing")
                .instanceType("VPC")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.cen.GrantInstance("foo",
        cen_id="cen-2d6zdn0c1z5s058ozfcyf4lee",
        cen_owner_id="210000****",
        instance_id="vpc-2bysvq1xx543k2dx0eeulpeiv",
        instance_region_id="cn-beijing",
        instance_type="VPC")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.cen.GrantInstance("foo", {
        cenId: "cen-2d6zdn0c1z5s058ozfcyf4lee",
        cenOwnerId: "210000****",
        instanceId: "vpc-2bysvq1xx543k2dx0eeulpeiv",
        instanceRegionId: "cn-beijing",
        instanceType: "VPC",
    });
    
    resources:
      foo:
        type: volcengine:cen:GrantInstance
        properties:
          cenId: cen-2d6zdn0c1z5s058ozfcyf4lee
          cenOwnerId: 210000****
          instanceId: vpc-2bysvq1xx543k2dx0eeulpeiv
          instanceRegionId: cn-beijing
          instanceType: VPC
    

    Create GrantInstance Resource

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

    Constructor syntax

    new GrantInstance(name: string, args: GrantInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def GrantInstance(resource_name: str,
                      args: GrantInstanceArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def GrantInstance(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      cen_id: Optional[str] = None,
                      cen_owner_id: Optional[str] = None,
                      instance_id: Optional[str] = None,
                      instance_region_id: Optional[str] = None,
                      instance_type: Optional[str] = None)
    func NewGrantInstance(ctx *Context, name string, args GrantInstanceArgs, opts ...ResourceOption) (*GrantInstance, error)
    public GrantInstance(string name, GrantInstanceArgs args, CustomResourceOptions? opts = null)
    public GrantInstance(String name, GrantInstanceArgs args)
    public GrantInstance(String name, GrantInstanceArgs args, CustomResourceOptions options)
    
    type: volcengine:cen:GrantInstance
    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 GrantInstanceArgs
    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 GrantInstanceArgs
    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 GrantInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GrantInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GrantInstanceArgs
    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 grantInstanceResource = new Volcengine.Cen.GrantInstance("grantInstanceResource", new()
    {
        CenId = "string",
        CenOwnerId = "string",
        InstanceId = "string",
        InstanceRegionId = "string",
        InstanceType = "string",
    });
    
    example, err := cen.NewGrantInstance(ctx, "grantInstanceResource", &cen.GrantInstanceArgs{
    	CenId:            pulumi.String("string"),
    	CenOwnerId:       pulumi.String("string"),
    	InstanceId:       pulumi.String("string"),
    	InstanceRegionId: pulumi.String("string"),
    	InstanceType:     pulumi.String("string"),
    })
    
    var grantInstanceResource = new GrantInstance("grantInstanceResource", GrantInstanceArgs.builder()
        .cenId("string")
        .cenOwnerId("string")
        .instanceId("string")
        .instanceRegionId("string")
        .instanceType("string")
        .build());
    
    grant_instance_resource = volcengine.cen.GrantInstance("grantInstanceResource",
        cen_id="string",
        cen_owner_id="string",
        instance_id="string",
        instance_region_id="string",
        instance_type="string")
    
    const grantInstanceResource = new volcengine.cen.GrantInstance("grantInstanceResource", {
        cenId: "string",
        cenOwnerId: "string",
        instanceId: "string",
        instanceRegionId: "string",
        instanceType: "string",
    });
    
    type: volcengine:cen:GrantInstance
    properties:
        cenId: string
        cenOwnerId: string
        instanceId: string
        instanceRegionId: string
        instanceType: string
    

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

    CenId string
    The ID of the cen.
    CenOwnerId string
    The owner ID of the cen.
    InstanceId string
    The ID of the instance.
    InstanceRegionId string
    The region ID of the instance.
    InstanceType string
    The type of the instance.
    CenId string
    The ID of the cen.
    CenOwnerId string
    The owner ID of the cen.
    InstanceId string
    The ID of the instance.
    InstanceRegionId string
    The region ID of the instance.
    InstanceType string
    The type of the instance.
    cenId String
    The ID of the cen.
    cenOwnerId String
    The owner ID of the cen.
    instanceId String
    The ID of the instance.
    instanceRegionId String
    The region ID of the instance.
    instanceType String
    The type of the instance.
    cenId string
    The ID of the cen.
    cenOwnerId string
    The owner ID of the cen.
    instanceId string
    The ID of the instance.
    instanceRegionId string
    The region ID of the instance.
    instanceType string
    The type of the instance.
    cen_id str
    The ID of the cen.
    cen_owner_id str
    The owner ID of the cen.
    instance_id str
    The ID of the instance.
    instance_region_id str
    The region ID of the instance.
    instance_type str
    The type of the instance.
    cenId String
    The ID of the cen.
    cenOwnerId String
    The owner ID of the cen.
    instanceId String
    The ID of the instance.
    instanceRegionId String
    The region ID of the instance.
    instanceType String
    The type of the instance.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing GrantInstance Resource

    Get an existing GrantInstance 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?: GrantInstanceState, opts?: CustomResourceOptions): GrantInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cen_id: Optional[str] = None,
            cen_owner_id: Optional[str] = None,
            instance_id: Optional[str] = None,
            instance_region_id: Optional[str] = None,
            instance_type: Optional[str] = None) -> GrantInstance
    func GetGrantInstance(ctx *Context, name string, id IDInput, state *GrantInstanceState, opts ...ResourceOption) (*GrantInstance, error)
    public static GrantInstance Get(string name, Input<string> id, GrantInstanceState? state, CustomResourceOptions? opts = null)
    public static GrantInstance get(String name, Output<String> id, GrantInstanceState 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:
    CenId string
    The ID of the cen.
    CenOwnerId string
    The owner ID of the cen.
    InstanceId string
    The ID of the instance.
    InstanceRegionId string
    The region ID of the instance.
    InstanceType string
    The type of the instance.
    CenId string
    The ID of the cen.
    CenOwnerId string
    The owner ID of the cen.
    InstanceId string
    The ID of the instance.
    InstanceRegionId string
    The region ID of the instance.
    InstanceType string
    The type of the instance.
    cenId String
    The ID of the cen.
    cenOwnerId String
    The owner ID of the cen.
    instanceId String
    The ID of the instance.
    instanceRegionId String
    The region ID of the instance.
    instanceType String
    The type of the instance.
    cenId string
    The ID of the cen.
    cenOwnerId string
    The owner ID of the cen.
    instanceId string
    The ID of the instance.
    instanceRegionId string
    The region ID of the instance.
    instanceType string
    The type of the instance.
    cen_id str
    The ID of the cen.
    cen_owner_id str
    The owner ID of the cen.
    instance_id str
    The ID of the instance.
    instance_region_id str
    The region ID of the instance.
    instance_type str
    The type of the instance.
    cenId String
    The ID of the cen.
    cenOwnerId String
    The owner ID of the cen.
    instanceId String
    The ID of the instance.
    instanceRegionId String
    The region ID of the instance.
    instanceType String
    The type of the instance.

    Import

    Cen grant instance can be imported using the CenId:CenOwnerId:InstanceId:InstanceType:RegionId, e.g.

     $ pulumi import volcengine:cen/grantInstance:GrantInstance default cen-7qthudw0ll6jmc***:210000****:vpc-2fexiqjlgjif45oxruvso****:VPC:cn-beijing
    

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

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.25 published on Tuesday, Jul 2, 2024 by Volcengine