1. Packages
  2. Scaleway
  3. API Docs
  4. getCockpitPlan
Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse

scaleway.getCockpitPlan

Explore with Pulumi AI

scaleway logo
Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse

    Gets information about a Scaleway Cockpit plan.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const premium = scaleway.getCockpitPlan({
        name: "premium",
    });
    const main = new scaleway.Cockpit("main", {plan: premium.then(premium => premium.id)});
    
    import pulumi
    import pulumi_scaleway as scaleway
    import pulumiverse_scaleway as scaleway
    
    premium = scaleway.get_cockpit_plan(name="premium")
    main = scaleway.Cockpit("main", plan=premium.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		premium, err := scaleway.GetCockpitPlan(ctx, &scaleway.GetCockpitPlanArgs{
    			Name: "premium",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewCockpit(ctx, "main", &scaleway.CockpitArgs{
    			Plan: pulumi.String(premium.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var premium = Scaleway.GetCockpitPlan.Invoke(new()
        {
            Name = "premium",
        });
    
        var main = new Scaleway.Cockpit("main", new()
        {
            Plan = premium.Apply(getCockpitPlanResult => getCockpitPlanResult.Id),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetCockpitPlanArgs;
    import com.pulumi.scaleway.Cockpit;
    import com.pulumi.scaleway.CockpitArgs;
    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 premium = ScalewayFunctions.getCockpitPlan(GetCockpitPlanArgs.builder()
                .name("premium")
                .build());
    
            var main = new Cockpit("main", CockpitArgs.builder()        
                .plan(premium.applyValue(getCockpitPlanResult -> getCockpitPlanResult.id()))
                .build());
    
        }
    }
    
    resources:
      main:
        type: scaleway:Cockpit
        properties:
          plan: ${premium.id}
    variables:
      premium:
        fn::invoke:
          Function: scaleway:getCockpitPlan
          Arguments:
            name: premium
    

    Using getCockpitPlan

    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 getCockpitPlan(args: GetCockpitPlanArgs, opts?: InvokeOptions): Promise<GetCockpitPlanResult>
    function getCockpitPlanOutput(args: GetCockpitPlanOutputArgs, opts?: InvokeOptions): Output<GetCockpitPlanResult>
    def get_cockpit_plan(name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetCockpitPlanResult
    def get_cockpit_plan_output(name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetCockpitPlanResult]
    func GetCockpitPlan(ctx *Context, args *GetCockpitPlanArgs, opts ...InvokeOption) (*GetCockpitPlanResult, error)
    func GetCockpitPlanOutput(ctx *Context, args *GetCockpitPlanOutputArgs, opts ...InvokeOption) GetCockpitPlanResultOutput

    > Note: This function is named GetCockpitPlan in the Go SDK.

    public static class GetCockpitPlan 
    {
        public static Task<GetCockpitPlanResult> InvokeAsync(GetCockpitPlanArgs args, InvokeOptions? opts = null)
        public static Output<GetCockpitPlanResult> Invoke(GetCockpitPlanInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCockpitPlanResult> getCockpitPlan(GetCockpitPlanArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: scaleway:index/getCockpitPlan:getCockpitPlan
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the plan.
    Name string
    The name of the plan.
    name String
    The name of the plan.
    name string
    The name of the plan.
    name str
    The name of the plan.
    name String
    The name of the plan.

    getCockpitPlan Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    id String
    The provider-assigned unique ID for this managed resource.
    name String

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse