Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.maxcompute.getProjects
Explore with Pulumi AI
This data source provides Max Compute Project available to the user.What is Project
NOTE: Available in 1.196.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf_testaccmp";
const defaultProject = new alicloud.maxcompute.Project("default", {
defaultQuota: "默认后付费Quota",
projectName: name,
comment: name,
productType: "PAYASYOUGO",
});
const default = defaultProject.id.apply(id => alicloud.maxcompute.getProjectsOutput({
ids: [id],
nameRegex: defaultProject.name,
}));
export const alicloudMaxcomputeProjectExampleId = _default.apply(_default => _default.projects?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf_testaccmp"
default_project = alicloud.maxcompute.Project("default",
default_quota="默认后付费Quota",
project_name=name,
comment=name,
product_type="PAYASYOUGO")
default = default_project.id.apply(lambda id: alicloud.maxcompute.get_projects_output(ids=[id],
name_regex=default_project.name))
pulumi.export("alicloudMaxcomputeProjectExampleId", default.projects[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/maxcompute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf_testaccmp";
if param := cfg.Get("name"); param != ""{
name = param
}
defaultProject, err := maxcompute.NewProject(ctx, "default", &maxcompute.ProjectArgs{
DefaultQuota: pulumi.String("默认后付费Quota"),
ProjectName: pulumi.String(name),
Comment: pulumi.String(name),
ProductType: pulumi.String("PAYASYOUGO"),
})
if err != nil {
return err
}
_default := defaultProject.ID().ApplyT(func(id string) (maxcompute.GetProjectsResult, error) {
return maxcompute.GetProjectsOutput(ctx, maxcompute.GetProjectsOutputArgs{
Ids: []string{
id,
},
NameRegex: defaultProject.Name,
}, nil), nil
}).(maxcompute.GetProjectsResultOutput)
ctx.Export("alicloudMaxcomputeProjectExampleId", _default.ApplyT(func(_default maxcompute.GetProjectsResult) (*string, error) {
return &default.Projects[0].Id, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf_testaccmp";
var defaultProject = new AliCloud.MaxCompute.Project("default", new()
{
DefaultQuota = "默认后付费Quota",
ProjectName = name,
Comment = name,
ProductType = "PAYASYOUGO",
});
var @default = AliCloud.MaxCompute.GetProjects.Invoke(new()
{
Ids = new[]
{
defaultProject.Id,
},
NameRegex = defaultProject.Name,
});
return new Dictionary<string, object?>
{
["alicloudMaxcomputeProjectExampleId"] = @default.Apply(@default => @default.Apply(getProjectsResult => getProjectsResult.Projects[0]?.Id)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.maxcompute.Project;
import com.pulumi.alicloud.maxcompute.ProjectArgs;
import com.pulumi.alicloud.maxcompute.MaxcomputeFunctions;
import com.pulumi.alicloud.maxcompute.inputs.GetProjectsArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("tf_testaccmp");
var defaultProject = new Project("defaultProject", ProjectArgs.builder()
.defaultQuota("默认后付费Quota")
.projectName(name)
.comment(name)
.productType("PAYASYOUGO")
.build());
final var default = MaxcomputeFunctions.getProjects(GetProjectsArgs.builder()
.ids(defaultProject.id())
.nameRegex(defaultProject.name())
.build());
ctx.export("alicloudMaxcomputeProjectExampleId", default_.applyValue(default_ -> default_.projects()[0].id()));
}
}
configuration:
name:
type: string
default: tf_testaccmp
resources:
defaultProject:
type: alicloud:maxcompute:Project
name: default
properties:
defaultQuota: 默认后付费Quota
projectName: ${name}
comment: ${name}
productType: PAYASYOUGO
variables:
default:
fn::invoke:
Function: alicloud:maxcompute:getProjects
Arguments:
ids:
- ${defaultProject.id}
nameRegex: ${defaultProject.name}
outputs:
alicloudMaxcomputeProjectExampleId: ${default.projects[0].id}
Using getProjects
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 getProjects(args: GetProjectsArgs, opts?: InvokeOptions): Promise<GetProjectsResult>
function getProjectsOutput(args: GetProjectsOutputArgs, opts?: InvokeOptions): Output<GetProjectsResult>
def get_projects(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetProjectsResult
def get_projects_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetProjectsResult]
func GetProjects(ctx *Context, args *GetProjectsArgs, opts ...InvokeOption) (*GetProjectsResult, error)
func GetProjectsOutput(ctx *Context, args *GetProjectsOutputArgs, opts ...InvokeOption) GetProjectsResultOutput
> Note: This function is named GetProjects
in the Go SDK.
public static class GetProjects
{
public static Task<GetProjectsResult> InvokeAsync(GetProjectsArgs args, InvokeOptions? opts = null)
public static Output<GetProjectsResult> Invoke(GetProjectsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetProjectsResult> getProjects(GetProjectsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:maxcompute/getProjects:getProjects
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Project IDs.
- Name
Regex string - A regex string to filter results by Group Metric Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Ids []string
- A list of Project IDs.
- Name
Regex string - A regex string to filter results by Group Metric Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- ids List<String>
- A list of Project IDs.
- name
Regex String - A regex string to filter results by Group Metric Rule name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- ids string[]
- A list of Project IDs.
- name
Regex string - A regex string to filter results by Group Metric Rule name.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- ids Sequence[str]
- A list of Project IDs.
- name_
regex str - A regex string to filter results by Group Metric Rule name.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- ids List<String>
- A list of Project IDs.
- name
Regex String - A regex string to filter results by Group Metric Rule name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getProjects Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of Project IDs.
- Names List<string>
- A list of name of Projects.
- Projects
List<Pulumi.
Ali Cloud. Max Compute. Outputs. Get Projects Project> - A list of Project Entries. Each element contains the following attributes:
- Name
Regex string - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of Project IDs.
- Names []string
- A list of name of Projects.
- Projects
[]Get
Projects Project - A list of Project Entries. Each element contains the following attributes:
- Name
Regex string - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Project IDs.
- names List<String>
- A list of name of Projects.
- projects
List<Get
Projects Project> - A list of Project Entries. Each element contains the following attributes:
- name
Regex String - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of Project IDs.
- names string[]
- A list of name of Projects.
- projects
Get
Projects Project[] - A list of Project Entries. Each element contains the following attributes:
- name
Regex string - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of Project IDs.
- names Sequence[str]
- A list of name of Projects.
- projects
Sequence[Get
Projects Project] - A list of Project Entries. Each element contains the following attributes:
- name_
regex str - output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Project IDs.
- names List<String>
- A list of name of Projects.
- projects List<Property Map>
- A list of Project Entries. Each element contains the following attributes:
- name
Regex String - output
File String
Supporting Types
GetProjectsProject
- Comment string
- Default
Quota string - Default Computing Resource Group
- Id string
- Project ID. The value is the same as
project_name
. - Ip
White Pulumi.List Ali Cloud. Max Compute. Inputs. Get Projects Project Ip White List - IP whitelist
- Owner string
- Project owner
- Project
Name string - The name of the resource
- Properties
Pulumi.
Ali Cloud. Max Compute. Inputs. Get Projects Project Properties - Project base attributes
- Security
Properties Pulumi.Ali Cloud. Max Compute. Inputs. Get Projects Project Security Properties - Security-related attributes
- Status string
- The status of the resource
- Type string
- Project type
- Comment string
- Default
Quota string - Default Computing Resource Group
- Id string
- Project ID. The value is the same as
project_name
. - Ip
White GetList Projects Project Ip White List - IP whitelist
- Owner string
- Project owner
- Project
Name string - The name of the resource
- Properties
Get
Projects Project Properties - Project base attributes
- Security
Properties GetProjects Project Security Properties - Security-related attributes
- Status string
- The status of the resource
- Type string
- Project type
- comment String
- default
Quota String - Default Computing Resource Group
- id String
- Project ID. The value is the same as
project_name
. - ip
White GetList Projects Project Ip White List - IP whitelist
- owner String
- Project owner
- project
Name String - The name of the resource
- properties
Get
Projects Project Properties - Project base attributes
- security
Properties GetProjects Project Security Properties - Security-related attributes
- status String
- The status of the resource
- type String
- Project type
- comment string
- default
Quota string - Default Computing Resource Group
- id string
- Project ID. The value is the same as
project_name
. - ip
White GetList Projects Project Ip White List - IP whitelist
- owner string
- Project owner
- project
Name string - The name of the resource
- properties
Get
Projects Project Properties - Project base attributes
- security
Properties GetProjects Project Security Properties - Security-related attributes
- status string
- The status of the resource
- type string
- Project type
- comment str
- default_
quota str - Default Computing Resource Group
- id str
- Project ID. The value is the same as
project_name
. - ip_
white_ Getlist Projects Project Ip White List - IP whitelist
- owner str
- Project owner
- project_
name str - The name of the resource
- properties
Get
Projects Project Properties - Project base attributes
- security_
properties GetProjects Project Security Properties - Security-related attributes
- status str
- The status of the resource
- type str
- Project type
- comment String
- default
Quota String - Default Computing Resource Group
- id String
- Project ID. The value is the same as
project_name
. - ip
White Property MapList - IP whitelist
- owner String
- Project owner
- project
Name String - The name of the resource
- properties Property Map
- Project base attributes
- security
Properties Property Map - Security-related attributes
- status String
- The status of the resource
- type String
- Project type
GetProjectsProjectIpWhiteList
- ip_
list str - Classic network IP white list.
- vpc_
ip_ strlist - VPC network whitelist.
GetProjectsProjectProperties
- Allow
Full boolScan - Whether to allow full table scan.
- Enable
Decimal2 bool - Whether to turn on Decimal2.0.
- Encryption
Pulumi.
Ali Cloud. Max Compute. Inputs. Get Projects Project Properties Encryption - Whether encryption is turned on.
- Retention
Days string - Job default retention time.
- Sql
Metering stringMax - SQL charge limit.
- Table
Lifecycle Pulumi.Ali Cloud. Max Compute. Inputs. Get Projects Project Properties Table Lifecycle - Life cycle of tables.
- Timezone string
- Project time zone.
- Type
System string - Type system.
- Allow
Full boolScan - Whether to allow full table scan.
- Enable
Decimal2 bool - Whether to turn on Decimal2.0.
- Encryption
Get
Projects Project Properties Encryption - Whether encryption is turned on.
- Retention
Days string - Job default retention time.
- Sql
Metering stringMax - SQL charge limit.
- Table
Lifecycle GetProjects Project Properties Table Lifecycle - Life cycle of tables.
- Timezone string
- Project time zone.
- Type
System string - Type system.
- allow
Full BooleanScan - Whether to allow full table scan.
- enable
Decimal2 Boolean - Whether to turn on Decimal2.0.
- encryption
Get
Projects Project Properties Encryption - Whether encryption is turned on.
- retention
Days String - Job default retention time.
- sql
Metering StringMax - SQL charge limit.
- table
Lifecycle GetProjects Project Properties Table Lifecycle - Life cycle of tables.
- timezone String
- Project time zone.
- type
System String - Type system.
- allow
Full booleanScan - Whether to allow full table scan.
- enable
Decimal2 boolean - Whether to turn on Decimal2.0.
- encryption
Get
Projects Project Properties Encryption - Whether encryption is turned on.
- retention
Days string - Job default retention time.
- sql
Metering stringMax - SQL charge limit.
- table
Lifecycle GetProjects Project Properties Table Lifecycle - Life cycle of tables.
- timezone string
- Project time zone.
- type
System string - Type system.
- allow_
full_ boolscan - Whether to allow full table scan.
- enable_
decimal2 bool - Whether to turn on Decimal2.0.
- encryption
Get
Projects Project Properties Encryption - Whether encryption is turned on.
- retention_
days str - Job default retention time.
- sql_
metering_ strmax - SQL charge limit.
- table_
lifecycle GetProjects Project Properties Table Lifecycle - Life cycle of tables.
- timezone str
- Project time zone.
- type_
system str - Type system.
- allow
Full BooleanScan - Whether to allow full table scan.
- enable
Decimal2 Boolean - Whether to turn on Decimal2.0.
- encryption Property Map
- Whether encryption is turned on.
- retention
Days String - Job default retention time.
- sql
Metering StringMax - SQL charge limit.
- table
Lifecycle Property Map - Life cycle of tables.
- timezone String
- Project time zone.
- type
System String - Type system.
GetProjectsProjectPropertiesEncryption
GetProjectsProjectPropertiesTableLifecycle
GetProjectsProjectSecurityProperties
- Enable
Download boolPrivilege - Whether to enable download permission check.
- Label
Security bool - Label authorization.
- Object
Creator boolHas Access Permission - Project creator permissions.
- Object
Creator boolHas Grant Permission - Does the project creator have authorization rights.
- Project
Protection Pulumi.Ali Cloud. Max Compute. Inputs. Get Projects Project Security Properties Project Protection - Project protection.
- Using
Acl bool - Whether to turn on ACL.
- Using
Policy bool - Whether to enable Policy.
- Enable
Download boolPrivilege - Whether to enable download permission check.
- Label
Security bool - Label authorization.
- Object
Creator boolHas Access Permission - Project creator permissions.
- Object
Creator boolHas Grant Permission - Does the project creator have authorization rights.
- Project
Protection GetProjects Project Security Properties Project Protection - Project protection.
- Using
Acl bool - Whether to turn on ACL.
- Using
Policy bool - Whether to enable Policy.
- enable
Download BooleanPrivilege - Whether to enable download permission check.
- label
Security Boolean - Label authorization.
- object
Creator BooleanHas Access Permission - Project creator permissions.
- object
Creator BooleanHas Grant Permission - Does the project creator have authorization rights.
- project
Protection GetProjects Project Security Properties Project Protection - Project protection.
- using
Acl Boolean - Whether to turn on ACL.
- using
Policy Boolean - Whether to enable Policy.
- enable
Download booleanPrivilege - Whether to enable download permission check.
- label
Security boolean - Label authorization.
- object
Creator booleanHas Access Permission - Project creator permissions.
- object
Creator booleanHas Grant Permission - Does the project creator have authorization rights.
- project
Protection GetProjects Project Security Properties Project Protection - Project protection.
- using
Acl boolean - Whether to turn on ACL.
- using
Policy boolean - Whether to enable Policy.
- enable_
download_ boolprivilege - Whether to enable download permission check.
- label_
security bool - Label authorization.
- object_
creator_ boolhas_ access_ permission - Project creator permissions.
- object_
creator_ boolhas_ grant_ permission - Does the project creator have authorization rights.
- project_
protection GetProjects Project Security Properties Project Protection - Project protection.
- using_
acl bool - Whether to turn on ACL.
- using_
policy bool - Whether to enable Policy.
- enable
Download BooleanPrivilege - Whether to enable download permission check.
- label
Security Boolean - Label authorization.
- object
Creator BooleanHas Access Permission - Project creator permissions.
- object
Creator BooleanHas Grant Permission - Does the project creator have authorization rights.
- project
Protection Property Map - Project protection.
- using
Acl Boolean - Whether to turn on ACL.
- using
Policy Boolean - Whether to enable Policy.
GetProjectsProjectSecurityPropertiesProjectProtection
- Exception
Policy string - Exclusion policy.
- Protected bool
- Is it turned on.
- Exception
Policy string - Exclusion policy.
- Protected bool
- Is it turned on.
- exception
Policy String - Exclusion policy.
- protected_ Boolean
- Is it turned on.
- exception
Policy string - Exclusion policy.
- protected boolean
- Is it turned on.
- exception_
policy str - Exclusion policy.
- protected bool
- Is it turned on.
- exception
Policy String - Exclusion policy.
- protected Boolean
- Is it turned on.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.