Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.imm.getProjects
Explore with Pulumi AI
This data source provides the Intelligent Media Management Projects of the current Alibaba Cloud user.
NOTE: Available in v1.134.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.imm.getProjects({
ids: ["example_id"],
});
export const immProjectId1 = ids.then(ids => ids.projects?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.imm.get_projects(ids=["example_id"])
pulumi.export("immProjectId1", ids.projects[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/imm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := imm.GetProjects(ctx, &imm.GetProjectsArgs{
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("immProjectId1", ids.Projects[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Imm.GetProjects.Invoke(new()
{
Ids = new[]
{
"example_id",
},
});
return new Dictionary<string, object?>
{
["immProjectId1"] = ids.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.imm.ImmFunctions;
import com.pulumi.alicloud.imm.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 ids = ImmFunctions.getProjects(GetProjectsArgs.builder()
.ids("example_id")
.build());
ctx.export("immProjectId1", ids.applyValue(getProjectsResult -> getProjectsResult.projects()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:imm:getProjects
Arguments:
ids:
- example_id
outputs:
immProjectId1: ${ids.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,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetProjectsResult
def get_projects_output(ids: Optional[pulumi.Input[Sequence[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:imm/getProjects:getProjects
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Project IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Ids []string
- A list of Project IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- ids List<String>
- A list of Project IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- ids string[]
- A list of Project IDs.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- ids Sequence[str]
- A list of Project IDs.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- ids List<String>
- A list of Project IDs.
- 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>
- Projects
List<Pulumi.
Ali Cloud. Imm. Outputs. Get Projects Project> - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Projects
[]Get
Projects Project - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- projects
List<Get
Projects Project> - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- projects
Get
Projects Project[] - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- projects
Sequence[Get
Projects Project] - output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- projects List<Property Map>
- output
File String
Supporting Types
GetProjectsProject
- Billing
Type string - The billing type. Note: This parameter is deprecated from 2021-04-01.
- Compute
Unit int - The maximum number of requests that can be processed per second. Note: This parameter is deprecated from 2021-04-01.
- Create
Time string - The creation time of project.
- Endpoint string
- The service address of project.
- Id string
- The ID of project.
- Modify
Time string - The modification time of project.
- Project string
- The name of project.
- Service
Role string - The service role authorized to the Intelligent Media Management service to access other cloud resources.
- Type string
- The type of project.
- Billing
Type string - The billing type. Note: This parameter is deprecated from 2021-04-01.
- Compute
Unit int - The maximum number of requests that can be processed per second. Note: This parameter is deprecated from 2021-04-01.
- Create
Time string - The creation time of project.
- Endpoint string
- The service address of project.
- Id string
- The ID of project.
- Modify
Time string - The modification time of project.
- Project string
- The name of project.
- Service
Role string - The service role authorized to the Intelligent Media Management service to access other cloud resources.
- Type string
- The type of project.
- billing
Type String - The billing type. Note: This parameter is deprecated from 2021-04-01.
- compute
Unit Integer - The maximum number of requests that can be processed per second. Note: This parameter is deprecated from 2021-04-01.
- create
Time String - The creation time of project.
- endpoint String
- The service address of project.
- id String
- The ID of project.
- modify
Time String - The modification time of project.
- project String
- The name of project.
- service
Role String - The service role authorized to the Intelligent Media Management service to access other cloud resources.
- type String
- The type of project.
- billing
Type string - The billing type. Note: This parameter is deprecated from 2021-04-01.
- compute
Unit number - The maximum number of requests that can be processed per second. Note: This parameter is deprecated from 2021-04-01.
- create
Time string - The creation time of project.
- endpoint string
- The service address of project.
- id string
- The ID of project.
- modify
Time string - The modification time of project.
- project string
- The name of project.
- service
Role string - The service role authorized to the Intelligent Media Management service to access other cloud resources.
- type string
- The type of project.
- billing_
type str - The billing type. Note: This parameter is deprecated from 2021-04-01.
- compute_
unit int - The maximum number of requests that can be processed per second. Note: This parameter is deprecated from 2021-04-01.
- create_
time str - The creation time of project.
- endpoint str
- The service address of project.
- id str
- The ID of project.
- modify_
time str - The modification time of project.
- project str
- The name of project.
- service_
role str - The service role authorized to the Intelligent Media Management service to access other cloud resources.
- type str
- The type of project.
- billing
Type String - The billing type. Note: This parameter is deprecated from 2021-04-01.
- compute
Unit Number - The maximum number of requests that can be processed per second. Note: This parameter is deprecated from 2021-04-01.
- create
Time String - The creation time of project.
- endpoint String
- The service address of project.
- id String
- The ID of project.
- modify
Time String - The modification time of project.
- project String
- The name of project.
- service
Role String - The service role authorized to the Intelligent Media Management service to access other cloud resources.
- type String
- The type of project.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.