volcengine.transit_router.SharedTransitRouterState
Explore with Pulumi AI
Provides a resource to manage transit router shared transit router state
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-tr",
Description = "acc-test",
});
var fooSharedTransitRouterState = new Volcengine.Transit_router.SharedTransitRouterState("fooSharedTransitRouterState", new()
{
TransitRouterId = fooTransitRouter.Id,
Action = "Reject",
});
});
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-tr"),
Description: pulumi.String("acc-test"),
})
if err != nil {
return err
}
_, err = transit_router.NewSharedTransitRouterState(ctx, "fooSharedTransitRouterState", &transit_router.SharedTransitRouterStateArgs{
TransitRouterId: fooTransitRouter.ID(),
Action: pulumi.String("Reject"),
})
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.SharedTransitRouterState;
import com.pulumi.volcengine.transit_router.SharedTransitRouterStateArgs;
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-tr")
.description("acc-test")
.build());
var fooSharedTransitRouterState = new SharedTransitRouterState("fooSharedTransitRouterState", SharedTransitRouterStateArgs.builder()
.transitRouterId(fooTransitRouter.id())
.action("Reject")
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo_transit_router = volcengine.transit_router.TransitRouter("fooTransitRouter",
transit_router_name="acc-test-tr",
description="acc-test")
foo_shared_transit_router_state = volcengine.transit_router.SharedTransitRouterState("fooSharedTransitRouterState",
transit_router_id=foo_transit_router.id,
action="Reject")
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const fooTransitRouter = new volcengine.transit_router.TransitRouter("fooTransitRouter", {
transitRouterName: "acc-test-tr",
description: "acc-test",
});
const fooSharedTransitRouterState = new volcengine.transit_router.SharedTransitRouterState("fooSharedTransitRouterState", {
transitRouterId: fooTransitRouter.id,
action: "Reject",
});
resources:
fooTransitRouter:
type: volcengine:transit_router:TransitRouter
properties:
transitRouterName: acc-test-tr
description: acc-test
fooSharedTransitRouterState:
type: volcengine:transit_router:SharedTransitRouterState
properties:
transitRouterId: ${fooTransitRouter.id}
action: Reject
Create SharedTransitRouterState Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SharedTransitRouterState(name: string, args: SharedTransitRouterStateArgs, opts?: CustomResourceOptions);
@overload
def SharedTransitRouterState(resource_name: str,
args: SharedTransitRouterStateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SharedTransitRouterState(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
transit_router_id: Optional[str] = None)
func NewSharedTransitRouterState(ctx *Context, name string, args SharedTransitRouterStateArgs, opts ...ResourceOption) (*SharedTransitRouterState, error)
public SharedTransitRouterState(string name, SharedTransitRouterStateArgs args, CustomResourceOptions? opts = null)
public SharedTransitRouterState(String name, SharedTransitRouterStateArgs args)
public SharedTransitRouterState(String name, SharedTransitRouterStateArgs args, CustomResourceOptions options)
type: volcengine:transit_router:SharedTransitRouterState
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 SharedTransitRouterStateArgs
- 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 SharedTransitRouterStateArgs
- 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 SharedTransitRouterStateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SharedTransitRouterStateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SharedTransitRouterStateArgs
- 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 sharedTransitRouterStateResource = new Volcengine.Transit_router.SharedTransitRouterState("sharedTransitRouterStateResource", new()
{
Action = "string",
TransitRouterId = "string",
});
example, err := transit_router.NewSharedTransitRouterState(ctx, "sharedTransitRouterStateResource", &transit_router.SharedTransitRouterStateArgs{
Action: pulumi.String("string"),
TransitRouterId: pulumi.String("string"),
})
var sharedTransitRouterStateResource = new SharedTransitRouterState("sharedTransitRouterStateResource", SharedTransitRouterStateArgs.builder()
.action("string")
.transitRouterId("string")
.build());
shared_transit_router_state_resource = volcengine.transit_router.SharedTransitRouterState("sharedTransitRouterStateResource",
action="string",
transit_router_id="string")
const sharedTransitRouterStateResource = new volcengine.transit_router.SharedTransitRouterState("sharedTransitRouterStateResource", {
action: "string",
transitRouterId: "string",
});
type: volcengine:transit_router:SharedTransitRouterState
properties:
action: string
transitRouterId: string
SharedTransitRouterState 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 SharedTransitRouterState resource accepts the following input properties:
- Action string
Accept
orReject
the shared transit router.- Transit
Router stringId - The id of the transit router.
- Action string
Accept
orReject
the shared transit router.- Transit
Router stringId - The id of the transit router.
- action String
Accept
orReject
the shared transit router.- transit
Router StringId - The id of the transit router.
- action string
Accept
orReject
the shared transit router.- transit
Router stringId - The id of the transit router.
- action str
Accept
orReject
the shared transit router.- transit_
router_ strid - The id of the transit router.
- action String
Accept
orReject
the shared transit router.- transit
Router StringId - The id of the transit router.
Outputs
All input properties are implicitly available as output properties. Additionally, the SharedTransitRouterState 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 SharedTransitRouterState Resource
Get an existing SharedTransitRouterState 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?: SharedTransitRouterStateState, opts?: CustomResourceOptions): SharedTransitRouterState
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
transit_router_id: Optional[str] = None) -> SharedTransitRouterState
func GetSharedTransitRouterState(ctx *Context, name string, id IDInput, state *SharedTransitRouterStateState, opts ...ResourceOption) (*SharedTransitRouterState, error)
public static SharedTransitRouterState Get(string name, Input<string> id, SharedTransitRouterStateState? state, CustomResourceOptions? opts = null)
public static SharedTransitRouterState get(String name, Output<String> id, SharedTransitRouterStateState 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.
- Action string
Accept
orReject
the shared transit router.- Transit
Router stringId - The id of the transit router.
- Action string
Accept
orReject
the shared transit router.- Transit
Router stringId - The id of the transit router.
- action String
Accept
orReject
the shared transit router.- transit
Router StringId - The id of the transit router.
- action string
Accept
orReject
the shared transit router.- transit
Router stringId - The id of the transit router.
- action str
Accept
orReject
the shared transit router.- transit_
router_ strid - The id of the transit router.
- action String
Accept
orReject
the shared transit router.- transit
Router StringId - The id of the transit router.
Import
SharedTransitRouterState can be imported using the id, e.g.
$ pulumi import volcengine:transit_router/sharedTransitRouterState:SharedTransitRouterState default state:transitRouterId
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.