1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. resourcemanager
  5. getDelegatedAdministrators
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.resourcemanager.getDelegatedAdministrators

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    This data source provides the Resource Manager Delegated Administrators of the current Alibaba Cloud user.

    NOTE: Available in v1.181.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.resourcemanager.getDelegatedAdministrators({
        ids: ["example_value"],
    });
    export const resourceManagerDelegatedAdministratorId1 = ids.then(ids => ids.administrators?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.resourcemanager.get_delegated_administrators(ids=["example_value"])
    pulumi.export("resourceManagerDelegatedAdministratorId1", ids.administrators[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := resourcemanager.GetDelegatedAdministrators(ctx, &resourcemanager.GetDelegatedAdministratorsArgs{
    			Ids: []string{
    				"example_value",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("resourceManagerDelegatedAdministratorId1", ids.Administrators[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.ResourceManager.GetDelegatedAdministrators.Invoke(new()
        {
            Ids = new[]
            {
                "example_value",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["resourceManagerDelegatedAdministratorId1"] = ids.Apply(getDelegatedAdministratorsResult => getDelegatedAdministratorsResult.Administrators[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
    import com.pulumi.alicloud.resourcemanager.inputs.GetDelegatedAdministratorsArgs;
    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 = ResourcemanagerFunctions.getDelegatedAdministrators(GetDelegatedAdministratorsArgs.builder()
                .ids("example_value")
                .build());
    
            ctx.export("resourceManagerDelegatedAdministratorId1", ids.applyValue(getDelegatedAdministratorsResult -> getDelegatedAdministratorsResult.administrators()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:resourcemanager:getDelegatedAdministrators
          Arguments:
            ids:
              - example_value
    outputs:
      resourceManagerDelegatedAdministratorId1: ${ids.administrators[0].id}
    

    Using getDelegatedAdministrators

    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 getDelegatedAdministrators(args: GetDelegatedAdministratorsArgs, opts?: InvokeOptions): Promise<GetDelegatedAdministratorsResult>
    function getDelegatedAdministratorsOutput(args: GetDelegatedAdministratorsOutputArgs, opts?: InvokeOptions): Output<GetDelegatedAdministratorsResult>
    def get_delegated_administrators(ids: Optional[Sequence[str]] = None,
                                     output_file: Optional[str] = None,
                                     page_number: Optional[int] = None,
                                     page_size: Optional[int] = None,
                                     service_principal: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetDelegatedAdministratorsResult
    def get_delegated_administrators_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                     output_file: Optional[pulumi.Input[str]] = None,
                                     page_number: Optional[pulumi.Input[int]] = None,
                                     page_size: Optional[pulumi.Input[int]] = None,
                                     service_principal: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetDelegatedAdministratorsResult]
    func GetDelegatedAdministrators(ctx *Context, args *GetDelegatedAdministratorsArgs, opts ...InvokeOption) (*GetDelegatedAdministratorsResult, error)
    func GetDelegatedAdministratorsOutput(ctx *Context, args *GetDelegatedAdministratorsOutputArgs, opts ...InvokeOption) GetDelegatedAdministratorsResultOutput

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

    public static class GetDelegatedAdministrators 
    {
        public static Task<GetDelegatedAdministratorsResult> InvokeAsync(GetDelegatedAdministratorsArgs args, InvokeOptions? opts = null)
        public static Output<GetDelegatedAdministratorsResult> Invoke(GetDelegatedAdministratorsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDelegatedAdministratorsResult> getDelegatedAdministrators(GetDelegatedAdministratorsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:resourcemanager/getDelegatedAdministrators:getDelegatedAdministrators
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Delegated Administrator IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    ServicePrincipal string
    The identification of the trusted service.
    Ids []string
    A list of Delegated Administrator IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    ServicePrincipal string
    The identification of the trusted service.
    ids List<String>
    A list of Delegated Administrator IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Integer
    pageSize Integer
    servicePrincipal String
    The identification of the trusted service.
    ids string[]
    A list of Delegated Administrator IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    pageNumber number
    pageSize number
    servicePrincipal string
    The identification of the trusted service.
    ids Sequence[str]
    A list of Delegated Administrator IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    page_number int
    page_size int
    service_principal str
    The identification of the trusted service.
    ids List<String>
    A list of Delegated Administrator IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Number
    pageSize Number
    servicePrincipal String
    The identification of the trusted service.

    getDelegatedAdministrators Result

    The following output properties are available:

    Administrators List<Pulumi.AliCloud.ResourceManager.Outputs.GetDelegatedAdministratorsAdministrator>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    OutputFile string
    PageNumber int
    PageSize int
    ServicePrincipal string
    Administrators []GetDelegatedAdministratorsAdministrator
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    OutputFile string
    PageNumber int
    PageSize int
    ServicePrincipal string
    administrators List<GetDelegatedAdministratorsAdministrator>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    outputFile String
    pageNumber Integer
    pageSize Integer
    servicePrincipal String
    administrators GetDelegatedAdministratorsAdministrator[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    outputFile string
    pageNumber number
    pageSize number
    servicePrincipal string
    administrators Sequence[GetDelegatedAdministratorsAdministrator]
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    output_file str
    page_number int
    page_size int
    service_principal str
    administrators List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    outputFile String
    pageNumber Number
    pageSize Number
    servicePrincipal String

    Supporting Types

    GetDelegatedAdministratorsAdministrator

    AccountId string
    The ID of the member account.
    DelegationEnabledTime string
    The time when the member was specified as a delegated administrator account.
    Id string
    The ID of the Delegated Administrator.
    ServicePrincipal string
    The identity of the trusted service.
    AccountId string
    The ID of the member account.
    DelegationEnabledTime string
    The time when the member was specified as a delegated administrator account.
    Id string
    The ID of the Delegated Administrator.
    ServicePrincipal string
    The identity of the trusted service.
    accountId String
    The ID of the member account.
    delegationEnabledTime String
    The time when the member was specified as a delegated administrator account.
    id String
    The ID of the Delegated Administrator.
    servicePrincipal String
    The identity of the trusted service.
    accountId string
    The ID of the member account.
    delegationEnabledTime string
    The time when the member was specified as a delegated administrator account.
    id string
    The ID of the Delegated Administrator.
    servicePrincipal string
    The identity of the trusted service.
    account_id str
    The ID of the member account.
    delegation_enabled_time str
    The time when the member was specified as a delegated administrator account.
    id str
    The ID of the Delegated Administrator.
    service_principal str
    The identity of the trusted service.
    accountId String
    The ID of the member account.
    delegationEnabledTime String
    The time when the member was specified as a delegated administrator account.
    id String
    The ID of the Delegated Administrator.
    servicePrincipal String
    The identity of the trusted service.

    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.57.1 published on Wednesday, Jun 26, 2024 by Pulumi