volcengine.transit_router.GrantRule
Explore with Pulumi AI
Provides a resource to manage transit router grant rule
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooTransitRouter = new Volcengine.Transit_router.TransitRouter("fooTransitRouter", new()
{
TransitRouterName = "acc-test-tf",
Description = "acc-test-tf",
});
var fooGrantRule = new Volcengine.Transit_router.GrantRule("fooGrantRule", new()
{
GrantAccountId = "2000xxxxx",
Description = "acc-test-tf",
TransitRouterId = fooTransitRouter.Id,
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/transit_router"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooTransitRouter, err := transit_router.NewTransitRouter(ctx, "fooTransitRouter", &transit_router.TransitRouterArgs{
TransitRouterName: pulumi.String("acc-test-tf"),
Description: pulumi.String("acc-test-tf"),
})
if err != nil {
return err
}
_, err = transit_router.NewGrantRule(ctx, "fooGrantRule", &transit_router.GrantRuleArgs{
GrantAccountId: pulumi.String("2000xxxxx"),
Description: pulumi.String("acc-test-tf"),
TransitRouterId: fooTransitRouter.ID(),
})
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.transit_router.TransitRouter;
import com.pulumi.volcengine.transit_router.TransitRouterArgs;
import com.pulumi.volcengine.transit_router.GrantRule;
import com.pulumi.volcengine.transit_router.GrantRuleArgs;
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 fooTransitRouter = new TransitRouter("fooTransitRouter", TransitRouterArgs.builder()
.transitRouterName("acc-test-tf")
.description("acc-test-tf")
.build());
var fooGrantRule = new GrantRule("fooGrantRule", GrantRuleArgs.builder()
.grantAccountId("2000xxxxx")
.description("acc-test-tf")
.transitRouterId(fooTransitRouter.id())
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo_transit_router = volcengine.transit_router.TransitRouter("fooTransitRouter",
transit_router_name="acc-test-tf",
description="acc-test-tf")
foo_grant_rule = volcengine.transit_router.GrantRule("fooGrantRule",
grant_account_id="2000xxxxx",
description="acc-test-tf",
transit_router_id=foo_transit_router.id)
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const fooTransitRouter = new volcengine.transit_router.TransitRouter("fooTransitRouter", {
transitRouterName: "acc-test-tf",
description: "acc-test-tf",
});
const fooGrantRule = new volcengine.transit_router.GrantRule("fooGrantRule", {
grantAccountId: "2000xxxxx",
description: "acc-test-tf",
transitRouterId: fooTransitRouter.id,
});
resources:
fooTransitRouter:
type: volcengine:transit_router:TransitRouter
properties:
transitRouterName: acc-test-tf
description: acc-test-tf
fooGrantRule:
type: volcengine:transit_router:GrantRule
properties:
grantAccountId: 2000xxxxx
description: acc-test-tf
transitRouterId: ${fooTransitRouter.id}
Create GrantRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GrantRule(name: string, args: GrantRuleArgs, opts?: CustomResourceOptions);
@overload
def GrantRule(resource_name: str,
args: GrantRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GrantRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
grant_account_id: Optional[str] = None,
transit_router_id: Optional[str] = None,
description: Optional[str] = None)
func NewGrantRule(ctx *Context, name string, args GrantRuleArgs, opts ...ResourceOption) (*GrantRule, error)
public GrantRule(string name, GrantRuleArgs args, CustomResourceOptions? opts = null)
public GrantRule(String name, GrantRuleArgs args)
public GrantRule(String name, GrantRuleArgs args, CustomResourceOptions options)
type: volcengine:transit_router:GrantRule
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 GrantRuleArgs
- 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 GrantRuleArgs
- 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 GrantRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GrantRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GrantRuleArgs
- 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 grantRuleResource = new Volcengine.Transit_router.GrantRule("grantRuleResource", new()
{
GrantAccountId = "string",
TransitRouterId = "string",
Description = "string",
});
example, err := transit_router.NewGrantRule(ctx, "grantRuleResource", &transit_router.GrantRuleArgs{
GrantAccountId: pulumi.String("string"),
TransitRouterId: pulumi.String("string"),
Description: pulumi.String("string"),
})
var grantRuleResource = new GrantRule("grantRuleResource", GrantRuleArgs.builder()
.grantAccountId("string")
.transitRouterId("string")
.description("string")
.build());
grant_rule_resource = volcengine.transit_router.GrantRule("grantRuleResource",
grant_account_id="string",
transit_router_id="string",
description="string")
const grantRuleResource = new volcengine.transit_router.GrantRule("grantRuleResource", {
grantAccountId: "string",
transitRouterId: "string",
description: "string",
});
type: volcengine:transit_router:GrantRule
properties:
description: string
grantAccountId: string
transitRouterId: string
GrantRule 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 GrantRule resource accepts the following input properties:
- Grant
Account stringId - Account ID awaiting authorization for intermediate router instance.
- Transit
Router stringId - The id of the transit router.
- Description string
- The description of the rule.
- Grant
Account stringId - Account ID awaiting authorization for intermediate router instance.
- Transit
Router stringId - The id of the transit router.
- Description string
- The description of the rule.
- grant
Account StringId - Account ID awaiting authorization for intermediate router instance.
- transit
Router StringId - The id of the transit router.
- description String
- The description of the rule.
- grant
Account stringId - Account ID awaiting authorization for intermediate router instance.
- transit
Router stringId - The id of the transit router.
- description string
- The description of the rule.
- grant_
account_ strid - Account ID awaiting authorization for intermediate router instance.
- transit_
router_ strid - The id of the transit router.
- description str
- The description of the rule.
- grant
Account StringId - Account ID awaiting authorization for intermediate router instance.
- transit
Router StringId - The id of the transit router.
- description String
- The description of the rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the GrantRule 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 GrantRule Resource
Get an existing GrantRule 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?: GrantRuleState, opts?: CustomResourceOptions): GrantRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
grant_account_id: Optional[str] = None,
transit_router_id: Optional[str] = None) -> GrantRule
func GetGrantRule(ctx *Context, name string, id IDInput, state *GrantRuleState, opts ...ResourceOption) (*GrantRule, error)
public static GrantRule Get(string name, Input<string> id, GrantRuleState? state, CustomResourceOptions? opts = null)
public static GrantRule get(String name, Output<String> id, GrantRuleState 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.
- Description string
- The description of the rule.
- Grant
Account stringId - Account ID awaiting authorization for intermediate router instance.
- Transit
Router stringId - The id of the transit router.
- Description string
- The description of the rule.
- Grant
Account stringId - Account ID awaiting authorization for intermediate router instance.
- Transit
Router stringId - The id of the transit router.
- description String
- The description of the rule.
- grant
Account StringId - Account ID awaiting authorization for intermediate router instance.
- transit
Router StringId - The id of the transit router.
- description string
- The description of the rule.
- grant
Account stringId - Account ID awaiting authorization for intermediate router instance.
- transit
Router stringId - The id of the transit router.
- description str
- The description of the rule.
- grant_
account_ strid - Account ID awaiting authorization for intermediate router instance.
- transit_
router_ strid - The id of the transit router.
- description String
- The description of the rule.
- grant
Account StringId - Account ID awaiting authorization for intermediate router instance.
- transit
Router StringId - The id of the transit router.
Import
TransitRouterGrantRule can be imported using the transit router id and accountId, e.g.
$ pulumi import volcengine:transit_router/grantRule:GrantRule default trId:accountId
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.