Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse
scaleway.getAccountProject
Explore with Pulumi AI
Gets information about an existing Project.
Example Usage
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",
});
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")
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 {
		_, 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
	})
}
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 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());
    }
}
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 dictionaryThe following arguments are supported:
- Name string
 - The name of the Project.
Only one of the 
nameandproject_idshould be specified. - Organization
Id string - 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 string - The ID of the Project.
Only one of the 
nameandproject_idshould be specified. 
- Name string
 - The name of the Project.
Only one of the 
nameandproject_idshould be specified. - Organization
Id string - 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 string - The ID of the Project.
Only one of the 
nameandproject_idshould be specified. 
- name String
 - The name of the Project.
Only one of the 
nameandproject_idshould be specified. - organization
Id String - 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 String - The ID of the Project.
Only one of the 
nameandproject_idshould be specified. 
- name string
 - The name of the Project.
Only one of the 
nameandproject_idshould be specified. - organization
Id string - 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 string - The ID of the Project.
Only one of the 
nameandproject_idshould be specified. 
- name str
 - The name of the Project.
Only one of the 
nameandproject_idshould 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 
nameandproject_idshould be specified. 
- name String
 - The name of the Project.
Only one of the 
nameandproject_idshould be specified. - organization
Id String - 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 String - The ID of the Project.
Only one of the 
nameandproject_idshould be specified. 
getAccountProject Result
The following output properties are available:
- Created
At string - Description string
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Project
Id string - Updated
At string - Name string
 - Organization
Id string 
- Created
At string - Description string
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Project
Id string - Updated
At string - Name string
 - Organization
Id string 
- created
At String - description String
 - id String
 - The provider-assigned unique ID for this managed resource.
 - project
Id String - updated
At String - name String
 - organization
Id String 
- created
At string - description string
 - id string
 - The provider-assigned unique ID for this managed resource.
 - project
Id string - updated
At string - name string
 - organization
Id 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 
- created
At String - description String
 - id String
 - The provider-assigned unique ID for this managed resource.
 - project
Id String - updated
At String - name String
 - organization
Id String 
Package Details
- Repository
 - scaleway pulumiverse/pulumi-scaleway
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
scalewayTerraform Provider.