spectrocloud.Macro
Explore with Pulumi AI
A resource for creating and managing service output variables and macro.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as spectrocloud from "@pulumi/spectrocloud";
const projectMacro = new spectrocloud.Macro("projectMacro", {
project: "Default",
value: "project_val2",
});
const tenantMacro = new spectrocloud.Macro("tenantMacro", {value: "tenant_val1"});
import pulumi
import pulumi_spectrocloud as spectrocloud
project_macro = spectrocloud.Macro("projectMacro",
project="Default",
value="project_val2")
tenant_macro = spectrocloud.Macro("tenantMacro", value="tenant_val1")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/spectrocloud/spectrocloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := spectrocloud.NewMacro(ctx, "projectMacro", &spectrocloud.MacroArgs{
Project: pulumi.String("Default"),
Value: pulumi.String("project_val2"),
})
if err != nil {
return err
}
_, err = spectrocloud.NewMacro(ctx, "tenantMacro", &spectrocloud.MacroArgs{
Value: pulumi.String("tenant_val1"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Spectrocloud = Pulumi.Spectrocloud;
return await Deployment.RunAsync(() =>
{
var projectMacro = new Spectrocloud.Macro("projectMacro", new()
{
Project = "Default",
Value = "project_val2",
});
var tenantMacro = new Spectrocloud.Macro("tenantMacro", new()
{
Value = "tenant_val1",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.spectrocloud.Macro;
import com.pulumi.spectrocloud.MacroArgs;
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 projectMacro = new Macro("projectMacro", MacroArgs.builder()
.project("Default")
.value("project_val2")
.build());
var tenantMacro = new Macro("tenantMacro", MacroArgs.builder()
.value("tenant_val1")
.build());
}
}
resources:
projectMacro:
type: spectrocloud:Macro
properties:
project: Default
value: project_val2
tenantMacro:
type: spectrocloud:Macro
properties:
value: tenant_val1
Create Macro Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Macro(name: string, args: MacroArgs, opts?: CustomResourceOptions);
@overload
def Macro(resource_name: str,
args: MacroArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Macro(resource_name: str,
opts: Optional[ResourceOptions] = None,
value: Optional[str] = None,
macro_id: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
timeouts: Optional[MacroTimeoutsArgs] = None)
func NewMacro(ctx *Context, name string, args MacroArgs, opts ...ResourceOption) (*Macro, error)
public Macro(string name, MacroArgs args, CustomResourceOptions? opts = null)
type: spectrocloud:Macro
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 MacroArgs
- 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 MacroArgs
- 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 MacroArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MacroArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MacroArgs
- 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 macroResource = new Spectrocloud.Macro("macroResource", new()
{
Value = "string",
MacroId = "string",
Name = "string",
Project = "string",
Timeouts = new Spectrocloud.Inputs.MacroTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
});
example, err := spectrocloud.NewMacro(ctx, "macroResource", &spectrocloud.MacroArgs{
Value: pulumi.String("string"),
MacroId: pulumi.String("string"),
Name: pulumi.String("string"),
Project: pulumi.String("string"),
Timeouts: &spectrocloud.MacroTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var macroResource = new Macro("macroResource", MacroArgs.builder()
.value("string")
.macroId("string")
.name("string")
.project("string")
.timeouts(MacroTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.build());
macro_resource = spectrocloud.Macro("macroResource",
value="string",
macro_id="string",
name="string",
project="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
})
const macroResource = new spectrocloud.Macro("macroResource", {
value: "string",
macroId: "string",
name: "string",
project: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
});
type: spectrocloud:Macro
properties:
macroId: string
name: string
project: string
timeouts:
create: string
delete: string
update: string
value: string
Macro 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 Macro resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the Macro 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 Macro Resource
Get an existing Macro 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?: MacroState, opts?: CustomResourceOptions): Macro
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
macro_id: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
timeouts: Optional[MacroTimeoutsArgs] = None,
value: Optional[str] = None) -> Macro
func GetMacro(ctx *Context, name string, id IDInput, state *MacroState, opts ...ResourceOption) (*Macro, error)
public static Macro Get(string name, Input<string> id, MacroState? state, CustomResourceOptions? opts = null)
public static Macro get(String name, Output<String> id, MacroState state, CustomResourceOptions options)
resources: _: type: spectrocloud:Macro 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.
Supporting Types
MacroTimeouts, MacroTimeoutsArgs
Package Details
- Repository
- spectrocloud spectrocloud/terraform-provider-spectrocloud
- License
- Notes
- This Pulumi package is based on the
spectrocloud
Terraform Provider.