1. Packages
  2. Scaleway
  3. API Docs
  4. getAccountProject
Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs

scaleway.getAccountProject

Explore with Pulumi AI

scaleway logo
Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs

    Gets information about an existing Project.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var byName = Scaleway.GetAccountProject.Invoke(new()
        {
            Name = "default",
        });
    
        var byId = Scaleway.GetAccountProject.Invoke(new()
        {
            ProjectId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.LookupAccountProject(ctx, &scaleway.LookupAccountProjectArgs{
    			Name: pulumi.StringRef("default"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.LookupAccountProject(ctx, &scaleway.LookupAccountProjectArgs{
    			ProjectId: pulumi.StringRef("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
    		}, nil)
    		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.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetAccountProjectArgs;
    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 byName = ScalewayFunctions.getAccountProject(GetAccountProjectArgs.builder()
                .name("default")
                .build());
    
            final var byId = ScalewayFunctions.getAccountProject(GetAccountProjectArgs.builder()
                .projectId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    by_name = scaleway.get_account_project(name="default")
    by_id = scaleway.get_account_project(project_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    
    const byName = scaleway.getAccountProject({
        name: "default",
    });
    const byId = scaleway.getAccountProject({
        projectId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    });
    
    variables:
      byName:
        fn::invoke:
          Function: scaleway:getAccountProject
          Arguments:
            name: default
      byId:
        fn::invoke:
          Function: scaleway:getAccountProject
          Arguments:
            projectId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    

    Using getAccountProject

    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 getAccountProject(args: GetAccountProjectArgs, opts?: InvokeOptions): Promise<GetAccountProjectResult>
    function getAccountProjectOutput(args: GetAccountProjectOutputArgs, opts?: InvokeOptions): Output<GetAccountProjectResult>
    def get_account_project(name: Optional[str] = None,
                            organization_id: Optional[str] = None,
                            project_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetAccountProjectResult
    def get_account_project_output(name: Optional[pulumi.Input[str]] = None,
                            organization_id: Optional[pulumi.Input[str]] = None,
                            project_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetAccountProjectResult]
    func LookupAccountProject(ctx *Context, args *LookupAccountProjectArgs, opts ...InvokeOption) (*LookupAccountProjectResult, error)
    func LookupAccountProjectOutput(ctx *Context, args *LookupAccountProjectOutputArgs, opts ...InvokeOption) LookupAccountProjectResultOutput

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

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

    The following arguments are supported:

    Name string

    The name of the Project. Only one of the name and project_id should be specified.

    OrganizationId string

    The organization ID the Project is associated with. If no default organization_id is set, one must be set explicitly in this datasource

    ProjectId string

    The ID of the Project. Only one of the name and project_id should be specified.

    Name string

    The name of the Project. Only one of the name and project_id should be specified.

    OrganizationId string

    The organization ID the Project is associated with. If no default organization_id is set, one must be set explicitly in this datasource

    ProjectId string

    The ID of the Project. Only one of the name and project_id should be specified.

    name String

    The name of the Project. Only one of the name and project_id should be specified.

    organizationId String

    The organization ID the Project is associated with. If no default organization_id is set, one must be set explicitly in this datasource

    projectId String

    The ID of the Project. Only one of the name and project_id should be specified.

    name string

    The name of the Project. Only one of the name and project_id should be specified.

    organizationId string

    The organization ID the Project is associated with. If no default organization_id is set, one must be set explicitly in this datasource

    projectId string

    The ID of the Project. Only one of the name and project_id should be specified.

    name str

    The name of the Project. Only one of the name and project_id should be specified.

    organization_id str

    The organization ID the Project is associated with. If no default organization_id is set, one must be set explicitly in this datasource

    project_id str

    The ID of the Project. Only one of the name and project_id should be specified.

    name String

    The name of the Project. Only one of the name and project_id should be specified.

    organizationId String

    The organization ID the Project is associated with. If no default organization_id is set, one must be set explicitly in this datasource

    projectId String

    The ID of the Project. Only one of the name and project_id should be specified.

    getAccountProject Result

    The following output properties are available:

    CreatedAt string
    Description string
    Id string

    The provider-assigned unique ID for this managed resource.

    ProjectId string
    UpdatedAt string
    Name string
    OrganizationId string
    CreatedAt string
    Description string
    Id string

    The provider-assigned unique ID for this managed resource.

    ProjectId string
    UpdatedAt string
    Name string
    OrganizationId string
    createdAt String
    description String
    id String

    The provider-assigned unique ID for this managed resource.

    projectId String
    updatedAt String
    name String
    organizationId String
    createdAt string
    description string
    id string

    The provider-assigned unique ID for this managed resource.

    projectId string
    updatedAt string
    name string
    organizationId string
    created_at str
    description str
    id str

    The provider-assigned unique ID for this managed resource.

    project_id str
    updated_at str
    name str
    organization_id str
    createdAt String
    description String
    id String

    The provider-assigned unique ID for this managed resource.

    projectId String
    updatedAt String
    name String
    organizationId String

    Package Details

    Repository
    scaleway lbrlabs/pulumi-scaleway
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the scaleway Terraform Provider.

    scaleway logo
    Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs