spectrocloud 0.23.8 published on Monday, Jul 14, 2025 by spectrocloud
spectrocloud.getMacros
Explore with Pulumi AI
spectrocloud 0.23.8 published on Monday, Jul 14, 2025 by spectrocloud
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as spectrocloud from "@pulumi/spectrocloud";
const macros = spectrocloud.getMacros({
context: "project",
});
export const macroEgName = macros.then(macros => macros.macroValue);
export const macrosMap = macros.then(macros => macros.macrosMap);
import pulumi
import pulumi_spectrocloud as spectrocloud
macros = spectrocloud.get_macros(context="project")
pulumi.export("macroEgName", macros.macro_value)
pulumi.export("macrosMap", macros.macros_map)
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 {
macros, err := spectrocloud.LookupMacros(ctx, &spectrocloud.LookupMacrosArgs{
Context: pulumi.StringRef("project"),
}, nil)
if err != nil {
return err
}
ctx.Export("macroEgName", macros.MacroValue)
ctx.Export("macrosMap", macros.MacrosMap)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Spectrocloud = Pulumi.Spectrocloud;
return await Deployment.RunAsync(() =>
{
var macros = Spectrocloud.GetMacros.Invoke(new()
{
Context = "project",
});
return new Dictionary<string, object?>
{
["macroEgName"] = macros.Apply(getMacrosResult => getMacrosResult.MacroValue),
["macrosMap"] = macros.Apply(getMacrosResult => getMacrosResult.MacrosMap),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.spectrocloud.SpectrocloudFunctions;
import com.pulumi.spectrocloud.inputs.GetMacrosArgs;
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) {
final var macros = SpectrocloudFunctions.getMacros(GetMacrosArgs.builder()
.context("project")
.build());
ctx.export("macroEgName", macros.applyValue(getMacrosResult -> getMacrosResult.macroValue()));
ctx.export("macrosMap", macros.applyValue(getMacrosResult -> getMacrosResult.macrosMap()));
}
}
variables:
macros:
fn::invoke:
function: spectrocloud:getMacros
arguments:
context: project
outputs:
macroEgName: ${macros.macroValue}
macrosMap: ${macros.macrosMap}
Using getMacros
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getMacros(args: GetMacrosArgs, opts?: InvokeOptions): Promise<GetMacrosResult>
function getMacrosOutput(args: GetMacrosOutputArgs, opts?: InvokeOptions): Output<GetMacrosResult>
def get_macros(context: Optional[str] = None,
macro_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetMacrosResult
def get_macros_output(context: Optional[pulumi.Input[str]] = None,
macro_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMacrosResult]
func LookupMacros(ctx *Context, args *LookupMacrosArgs, opts ...InvokeOption) (*LookupMacrosResult, error)
func LookupMacrosOutput(ctx *Context, args *LookupMacrosOutputArgs, opts ...InvokeOption) LookupMacrosResultOutput
> Note: This function is named LookupMacros
in the Go SDK.
public static class GetMacros
{
public static Task<GetMacrosResult> InvokeAsync(GetMacrosArgs args, InvokeOptions? opts = null)
public static Output<GetMacrosResult> Invoke(GetMacrosInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetMacrosResult> getMacros(GetMacrosArgs args, InvokeOptions options)
public static Output<GetMacrosResult> getMacros(GetMacrosArgs args, InvokeOptions options)
fn::invoke:
function: spectrocloud:index/getMacros:getMacros
arguments:
# arguments dictionary
The following arguments are supported:
- context str
- The context to retrieve macros from. Valid values are
project
ortenant
. Defaults totenant
. - macro_
name str - The name of the macros resource. If specified, the data source will return the macros with this name.
getMacros Result
The following output properties are available:
- Id string
- unique identifier for the macros resource, which is the UID of the project or tenant.
- Macro
Value string - The value of the macros resource. This will be set if
macro_name
is specified. - Macros
Map Dictionary<string, string> - Map of macros where the key is the macro name and the value is the macro value.
- Context string
- The context to retrieve macros from. Valid values are
project
ortenant
. Defaults totenant
. - Macro
Name string - The name of the macros resource. If specified, the data source will return the macros with this name.
- Id string
- unique identifier for the macros resource, which is the UID of the project or tenant.
- Macro
Value string - The value of the macros resource. This will be set if
macro_name
is specified. - Macros
Map map[string]string - Map of macros where the key is the macro name and the value is the macro value.
- Context string
- The context to retrieve macros from. Valid values are
project
ortenant
. Defaults totenant
. - Macro
Name string - The name of the macros resource. If specified, the data source will return the macros with this name.
- id String
- unique identifier for the macros resource, which is the UID of the project or tenant.
- macro
Value String - The value of the macros resource. This will be set if
macro_name
is specified. - macros
Map Map<String,String> - Map of macros where the key is the macro name and the value is the macro value.
- context String
- The context to retrieve macros from. Valid values are
project
ortenant
. Defaults totenant
. - macro
Name String - The name of the macros resource. If specified, the data source will return the macros with this name.
- id string
- unique identifier for the macros resource, which is the UID of the project or tenant.
- macro
Value string - The value of the macros resource. This will be set if
macro_name
is specified. - macros
Map {[key: string]: string} - Map of macros where the key is the macro name and the value is the macro value.
- context string
- The context to retrieve macros from. Valid values are
project
ortenant
. Defaults totenant
. - macro
Name string - The name of the macros resource. If specified, the data source will return the macros with this name.
- id str
- unique identifier for the macros resource, which is the UID of the project or tenant.
- macro_
value str - The value of the macros resource. This will be set if
macro_name
is specified. - macros_
map Mapping[str, str] - Map of macros where the key is the macro name and the value is the macro value.
- context str
- The context to retrieve macros from. Valid values are
project
ortenant
. Defaults totenant
. - macro_
name str - The name of the macros resource. If specified, the data source will return the macros with this name.
- id String
- unique identifier for the macros resource, which is the UID of the project or tenant.
- macro
Value String - The value of the macros resource. This will be set if
macro_name
is specified. - macros
Map Map<String> - Map of macros where the key is the macro name and the value is the macro value.
- context String
- The context to retrieve macros from. Valid values are
project
ortenant
. Defaults totenant
. - macro
Name String - The name of the macros resource. If specified, the data source will return the macros with this name.
Package Details
- Repository
- spectrocloud spectrocloud/terraform-provider-spectrocloud
- License
- Notes
- This Pulumi package is based on the
spectrocloud
Terraform Provider.
spectrocloud 0.23.8 published on Monday, Jul 14, 2025 by spectrocloud