1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. imm
  5. getProjects
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.imm.getProjects

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    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.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Ids []string
    A list of Project IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    A list of Project IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    ids string[]
    A list of Project IDs.
    outputFile 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.
    outputFile 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.AliCloud.Imm.Outputs.GetProjectsProject>
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Projects []GetProjectsProject
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    projects List<GetProjectsProject>
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    projects GetProjectsProject[]
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    projects Sequence[GetProjectsProject]
    output_file str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    projects List<Property Map>
    outputFile String

    Supporting Types

    GetProjectsProject

    BillingType string
    The billing type. Note: This parameter is deprecated from 2021-04-01.
    ComputeUnit int
    The maximum number of requests that can be processed per second. Note: This parameter is deprecated from 2021-04-01.
    CreateTime string
    The creation time of project.
    Endpoint string
    The service address of project.
    Id string
    The ID of project.
    ModifyTime string
    The modification time of project.
    Project string
    The name of project.
    ServiceRole string
    The service role authorized to the Intelligent Media Management service to access other cloud resources.
    Type string
    The type of project.
    BillingType string
    The billing type. Note: This parameter is deprecated from 2021-04-01.
    ComputeUnit int
    The maximum number of requests that can be processed per second. Note: This parameter is deprecated from 2021-04-01.
    CreateTime string
    The creation time of project.
    Endpoint string
    The service address of project.
    Id string
    The ID of project.
    ModifyTime string
    The modification time of project.
    Project string
    The name of project.
    ServiceRole string
    The service role authorized to the Intelligent Media Management service to access other cloud resources.
    Type string
    The type of project.
    billingType String
    The billing type. Note: This parameter is deprecated from 2021-04-01.
    computeUnit Integer
    The maximum number of requests that can be processed per second. Note: This parameter is deprecated from 2021-04-01.
    createTime String
    The creation time of project.
    endpoint String
    The service address of project.
    id String
    The ID of project.
    modifyTime String
    The modification time of project.
    project String
    The name of project.
    serviceRole String
    The service role authorized to the Intelligent Media Management service to access other cloud resources.
    type String
    The type of project.
    billingType string
    The billing type. Note: This parameter is deprecated from 2021-04-01.
    computeUnit number
    The maximum number of requests that can be processed per second. Note: This parameter is deprecated from 2021-04-01.
    createTime string
    The creation time of project.
    endpoint string
    The service address of project.
    id string
    The ID of project.
    modifyTime string
    The modification time of project.
    project string
    The name of project.
    serviceRole 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.
    billingType String
    The billing type. Note: This parameter is deprecated from 2021-04-01.
    computeUnit Number
    The maximum number of requests that can be processed per second. Note: This parameter is deprecated from 2021-04-01.
    createTime String
    The creation time of project.
    endpoint String
    The service address of project.
    id String
    The ID of project.
    modifyTime String
    The modification time of project.
    project String
    The name of project.
    serviceRole 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.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi