1. Packages
  2. Volcengine
  3. API Docs
  4. cen
  5. GrantInstance
Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine

volcengine.cen.GrantInstance

Explore with Pulumi AI

Provides a resource to manage cen grant instance

Example Usage

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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
resources:
  foo:
    type: volcengine:cen:GrantInstance
    properties:
      cenId: cen-2d6zdn0c1z5s058ozfcyf4lee
      cenOwnerId: 210000****
      instanceId: vpc-2bysvq1xx543k2dx0eeulpeiv
      instanceRegionId: cn-beijing
      instanceType: VPC
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. GrantInstanceArgs
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. 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 This property is required. string
The unique name of the resource.
args This property is required. GrantInstanceArgs
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. GrantInstanceArgs
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. 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",
});
Copy
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"),
})
Copy
var grantInstanceResource = new GrantInstance("grantInstanceResource", GrantInstanceArgs.builder()
    .cenId("string")
    .cenOwnerId("string")
    .instanceId("string")
    .instanceRegionId("string")
    .instanceType("string")
    .build());
Copy
grant_instance_resource = volcengine.cen.GrantInstance("grantInstanceResource",
    cen_id="string",
    cen_owner_id="string",
    instance_id="string",
    instance_region_id="string",
    instance_type="string")
Copy
const grantInstanceResource = new volcengine.cen.GrantInstance("grantInstanceResource", {
    cenId: "string",
    cenOwnerId: "string",
    instanceId: "string",
    instanceRegionId: "string",
    instanceType: "string",
});
Copy
type: volcengine:cen:GrantInstance
properties:
    cenId: string
    cenOwnerId: string
    instanceId: string
    instanceRegionId: string
    instanceType: string
Copy

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

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

The GrantInstance resource accepts the following input properties:

CenId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the cen.
CenOwnerId
This property is required.
Changes to this property will trigger replacement.
string
The owner ID of the cen.
InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the instance.
InstanceRegionId
This property is required.
Changes to this property will trigger replacement.
string
The region ID of the instance.
InstanceType
This property is required.
Changes to this property will trigger replacement.
string
The type of the instance.
CenId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the cen.
CenOwnerId
This property is required.
Changes to this property will trigger replacement.
string
The owner ID of the cen.
InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the instance.
InstanceRegionId
This property is required.
Changes to this property will trigger replacement.
string
The region ID of the instance.
InstanceType
This property is required.
Changes to this property will trigger replacement.
string
The type of the instance.
cenId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the cen.
cenOwnerId
This property is required.
Changes to this property will trigger replacement.
String
The owner ID of the cen.
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the instance.
instanceRegionId
This property is required.
Changes to this property will trigger replacement.
String
The region ID of the instance.
instanceType
This property is required.
Changes to this property will trigger replacement.
String
The type of the instance.
cenId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the cen.
cenOwnerId
This property is required.
Changes to this property will trigger replacement.
string
The owner ID of the cen.
instanceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the instance.
instanceRegionId
This property is required.
Changes to this property will trigger replacement.
string
The region ID of the instance.
instanceType
This property is required.
Changes to this property will trigger replacement.
string
The type of the instance.
cen_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the cen.
cen_owner_id
This property is required.
Changes to this property will trigger replacement.
str
The owner ID of the cen.
instance_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the instance.
instance_region_id
This property is required.
Changes to this property will trigger replacement.
str
The region ID of the instance.
instance_type
This property is required.
Changes to this property will trigger replacement.
str
The type of the instance.
cenId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the cen.
cenOwnerId
This property is required.
Changes to this property will trigger replacement.
String
The owner ID of the cen.
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the instance.
instanceRegionId
This property is required.
Changes to this property will trigger replacement.
String
The region ID of the instance.
instanceType
This property is required.
Changes to this property will trigger replacement.
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)
resources:  _:    type: volcengine:cen:GrantInstance    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. string
The ID of the cen.
CenOwnerId Changes to this property will trigger replacement. string
The owner ID of the cen.
InstanceId Changes to this property will trigger replacement. string
The ID of the instance.
InstanceRegionId Changes to this property will trigger replacement. string
The region ID of the instance.
InstanceType Changes to this property will trigger replacement. string
The type of the instance.
CenId Changes to this property will trigger replacement. string
The ID of the cen.
CenOwnerId Changes to this property will trigger replacement. string
The owner ID of the cen.
InstanceId Changes to this property will trigger replacement. string
The ID of the instance.
InstanceRegionId Changes to this property will trigger replacement. string
The region ID of the instance.
InstanceType Changes to this property will trigger replacement. string
The type of the instance.
cenId Changes to this property will trigger replacement. String
The ID of the cen.
cenOwnerId Changes to this property will trigger replacement. String
The owner ID of the cen.
instanceId Changes to this property will trigger replacement. String
The ID of the instance.
instanceRegionId Changes to this property will trigger replacement. String
The region ID of the instance.
instanceType Changes to this property will trigger replacement. String
The type of the instance.
cenId Changes to this property will trigger replacement. string
The ID of the cen.
cenOwnerId Changes to this property will trigger replacement. string
The owner ID of the cen.
instanceId Changes to this property will trigger replacement. string
The ID of the instance.
instanceRegionId Changes to this property will trigger replacement. string
The region ID of the instance.
instanceType Changes to this property will trigger replacement. string
The type of the instance.
cen_id Changes to this property will trigger replacement. str
The ID of the cen.
cen_owner_id Changes to this property will trigger replacement. str
The owner ID of the cen.
instance_id Changes to this property will trigger replacement. str
The ID of the instance.
instance_region_id Changes to this property will trigger replacement. str
The region ID of the instance.
instance_type Changes to this property will trigger replacement. str
The type of the instance.
cenId Changes to this property will trigger replacement. String
The ID of the cen.
cenOwnerId Changes to this property will trigger replacement. String
The owner ID of the cen.
instanceId Changes to this property will trigger replacement. String
The ID of the instance.
instanceRegionId Changes to this property will trigger replacement. String
The region ID of the instance.
instanceType Changes to this property will trigger replacement. 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
Copy

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.