Viewing docs for spectrocloud 0.28.3
published on Friday, Mar 6, 2026 by spectrocloud
published on Friday, Mar 6, 2026 by spectrocloud
Viewing docs for spectrocloud 0.28.3
published on Friday, Mar 6, 2026 by spectrocloud
published on Friday, Mar 6, 2026 by spectrocloud
Data source for retrieving information about a cluster config policy (maintenance policy).
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as spectrocloud from "@pulumi/spectrocloud";
const policy = spectrocloud.getClusterConfigPolicy({
name: "weekly-maintenance-policy",
context: "project",
});
export const policySchedules = policy.then(policy => policy.schedules);
export const policyTags = policy.then(policy => policy.tags);
import pulumi
import pulumi_spectrocloud as spectrocloud
policy = spectrocloud.get_cluster_config_policy(name="weekly-maintenance-policy",
context="project")
pulumi.export("policySchedules", policy.schedules)
pulumi.export("policyTags", policy.tags)
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 {
policy, err := spectrocloud.LookupClusterConfigPolicy(ctx, &spectrocloud.LookupClusterConfigPolicyArgs{
Name: "weekly-maintenance-policy",
Context: pulumi.StringRef("project"),
}, nil)
if err != nil {
return err
}
ctx.Export("policySchedules", policy.Schedules)
ctx.Export("policyTags", policy.Tags)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Spectrocloud = Pulumi.Spectrocloud;
return await Deployment.RunAsync(() =>
{
var policy = Spectrocloud.GetClusterConfigPolicy.Invoke(new()
{
Name = "weekly-maintenance-policy",
Context = "project",
});
return new Dictionary<string, object?>
{
["policySchedules"] = policy.Apply(getClusterConfigPolicyResult => getClusterConfigPolicyResult.Schedules),
["policyTags"] = policy.Apply(getClusterConfigPolicyResult => getClusterConfigPolicyResult.Tags),
};
});
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.GetClusterConfigPolicyArgs;
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 policy = SpectrocloudFunctions.getClusterConfigPolicy(GetClusterConfigPolicyArgs.builder()
.name("weekly-maintenance-policy")
.context("project")
.build());
ctx.export("policySchedules", policy.schedules());
ctx.export("policyTags", policy.tags());
}
}
variables:
policy:
fn::invoke:
function: spectrocloud:getClusterConfigPolicy
arguments:
name: weekly-maintenance-policy
context: project
outputs:
policySchedules: ${policy.schedules}
policyTags: ${policy.tags}
Using getClusterConfigPolicy
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 getClusterConfigPolicy(args: GetClusterConfigPolicyArgs, opts?: InvokeOptions): Promise<GetClusterConfigPolicyResult>
function getClusterConfigPolicyOutput(args: GetClusterConfigPolicyOutputArgs, opts?: InvokeOptions): Output<GetClusterConfigPolicyResult>def get_cluster_config_policy(context: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetClusterConfigPolicyResult
def get_cluster_config_policy_output(context: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetClusterConfigPolicyResult]func LookupClusterConfigPolicy(ctx *Context, args *LookupClusterConfigPolicyArgs, opts ...InvokeOption) (*LookupClusterConfigPolicyResult, error)
func LookupClusterConfigPolicyOutput(ctx *Context, args *LookupClusterConfigPolicyOutputArgs, opts ...InvokeOption) LookupClusterConfigPolicyResultOutput> Note: This function is named LookupClusterConfigPolicy in the Go SDK.
public static class GetClusterConfigPolicy
{
public static Task<GetClusterConfigPolicyResult> InvokeAsync(GetClusterConfigPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetClusterConfigPolicyResult> Invoke(GetClusterConfigPolicyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetClusterConfigPolicyResult> getClusterConfigPolicy(GetClusterConfigPolicyArgs args, InvokeOptions options)
public static Output<GetClusterConfigPolicyResult> getClusterConfigPolicy(GetClusterConfigPolicyArgs args, InvokeOptions options)
fn::invoke:
function: spectrocloud:index/getClusterConfigPolicy:getClusterConfigPolicy
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The name of the cluster config policy.
- Context string
- The context of the cluster config policy. Allowed values are
projectortenant. Default value isproject. If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - Id string
- The ID of this resource.
- Name string
- The name of the cluster config policy.
- Context string
- The context of the cluster config policy. Allowed values are
projectortenant. Default value isproject. If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - Id string
- The ID of this resource.
- name String
- The name of the cluster config policy.
- context String
- The context of the cluster config policy. Allowed values are
projectortenant. Default value isproject. If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - id String
- The ID of this resource.
- name string
- The name of the cluster config policy.
- context string
- The context of the cluster config policy. Allowed values are
projectortenant. Default value isproject. If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - id string
- The ID of this resource.
- name str
- The name of the cluster config policy.
- context str
- The context of the cluster config policy. Allowed values are
projectortenant. Default value isproject. If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - id str
- The ID of this resource.
- name String
- The name of the cluster config policy.
- context String
- The context of the cluster config policy. Allowed values are
projectortenant. Default value isproject. If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - id String
- The ID of this resource.
getClusterConfigPolicy Result
The following output properties are available:
- Id string
- The ID of this resource.
- Name string
- The name of the cluster config policy.
- Schedules
List<Get
Cluster Config Policy Schedule> - List of maintenance schedules for the policy.
- List<string>
- Tags assigned to the cluster config policy.
- Context string
- The context of the cluster config policy. Allowed values are
projectortenant. Default value isproject. If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name.
- Id string
- The ID of this resource.
- Name string
- The name of the cluster config policy.
- Schedules
[]Get
Cluster Config Policy Schedule - List of maintenance schedules for the policy.
- []string
- Tags assigned to the cluster config policy.
- Context string
- The context of the cluster config policy. Allowed values are
projectortenant. Default value isproject. If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name.
- id String
- The ID of this resource.
- name String
- The name of the cluster config policy.
- schedules
List<Get
Cluster Config Policy Schedule> - List of maintenance schedules for the policy.
- List<String>
- Tags assigned to the cluster config policy.
- context String
- The context of the cluster config policy. Allowed values are
projectortenant. Default value isproject. If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name.
- id string
- The ID of this resource.
- name string
- The name of the cluster config policy.
- schedules
Get
Cluster Config Policy Schedule[] - List of maintenance schedules for the policy.
- string[]
- Tags assigned to the cluster config policy.
- context string
- The context of the cluster config policy. Allowed values are
projectortenant. Default value isproject. If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name.
- id str
- The ID of this resource.
- name str
- The name of the cluster config policy.
- schedules
Sequence[Get
Cluster Config Policy Schedule] - List of maintenance schedules for the policy.
- Sequence[str]
- Tags assigned to the cluster config policy.
- context str
- The context of the cluster config policy. Allowed values are
projectortenant. Default value isproject. If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name.
- id String
- The ID of this resource.
- name String
- The name of the cluster config policy.
- schedules List<Property Map>
- List of maintenance schedules for the policy.
- List<String>
- Tags assigned to the cluster config policy.
- context String
- The context of the cluster config policy. Allowed values are
projectortenant. Default value isproject. If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name.
Supporting Types
GetClusterConfigPolicySchedule
- Duration
Hrs double - Name string
- Start
Cron string
- Duration
Hrs float64 - Name string
- Start
Cron string
- duration
Hrs Double - name String
- start
Cron String
- duration
Hrs number - name string
- start
Cron string
- duration_
hrs float - name str
- start_
cron str
- duration
Hrs Number - name String
- start
Cron String
Package Details
- Repository
- spectrocloud spectrocloud/terraform-provider-spectrocloud
- License
- Notes
- This Pulumi package is based on the
spectrocloudTerraform Provider.
Viewing docs for spectrocloud 0.28.3
published on Friday, Mar 6, 2026 by spectrocloud
published on Friday, Mar 6, 2026 by spectrocloud
