1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cddc
  5. getDedicatedHostAccounts
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.cddc.getDedicatedHostAccounts

Explore with Pulumi AI

This data source provides the Cddc Dedicated Host Accounts of the current Alibaba Cloud user.

NOTE: Available in v1.148.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.cddc.getDedicatedHostAccounts({});
export const cddcDedicatedHostAccountId1 = ids.then(ids => ids.accounts?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.cddc.get_dedicated_host_accounts()
pulumi.export("cddcDedicatedHostAccountId1", ids.accounts[0].id)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cddc"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := cddc.GetDedicatedHostAccounts(ctx, &cddc.GetDedicatedHostAccountsArgs{}, nil)
		if err != nil {
			return err
		}
		ctx.Export("cddcDedicatedHostAccountId1", ids.Accounts[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Cddc.GetDedicatedHostAccounts.Invoke();

    return new Dictionary<string, object?>
    {
        ["cddcDedicatedHostAccountId1"] = ids.Apply(getDedicatedHostAccountsResult => getDedicatedHostAccountsResult.Accounts[0]?.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cddc.CddcFunctions;
import com.pulumi.alicloud.cddc.inputs.GetDedicatedHostAccountsArgs;
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 = CddcFunctions.getDedicatedHostAccounts();

        ctx.export("cddcDedicatedHostAccountId1", ids.applyValue(getDedicatedHostAccountsResult -> getDedicatedHostAccountsResult.accounts()[0].id()));
    }
}
Copy
variables:
  ids:
    fn::invoke:
      function: alicloud:cddc:getDedicatedHostAccounts
      arguments: {}
outputs:
  cddcDedicatedHostAccountId1: ${ids.accounts[0].id}
Copy

Using getDedicatedHostAccounts

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 getDedicatedHostAccounts(args: GetDedicatedHostAccountsArgs, opts?: InvokeOptions): Promise<GetDedicatedHostAccountsResult>
function getDedicatedHostAccountsOutput(args: GetDedicatedHostAccountsOutputArgs, opts?: InvokeOptions): Output<GetDedicatedHostAccountsResult>
Copy
def get_dedicated_host_accounts(dedicated_host_id: Optional[str] = None,
                                ids: Optional[Sequence[str]] = None,
                                name_regex: Optional[str] = None,
                                output_file: Optional[str] = None,
                                page_number: Optional[int] = None,
                                page_size: Optional[int] = None,
                                opts: Optional[InvokeOptions] = None) -> GetDedicatedHostAccountsResult
def get_dedicated_host_accounts_output(dedicated_host_id: Optional[pulumi.Input[str]] = None,
                                ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                name_regex: Optional[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,
                                opts: Optional[InvokeOptions] = None) -> Output[GetDedicatedHostAccountsResult]
Copy
func GetDedicatedHostAccounts(ctx *Context, args *GetDedicatedHostAccountsArgs, opts ...InvokeOption) (*GetDedicatedHostAccountsResult, error)
func GetDedicatedHostAccountsOutput(ctx *Context, args *GetDedicatedHostAccountsOutputArgs, opts ...InvokeOption) GetDedicatedHostAccountsResultOutput
Copy

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

public static class GetDedicatedHostAccounts 
{
    public static Task<GetDedicatedHostAccountsResult> InvokeAsync(GetDedicatedHostAccountsArgs args, InvokeOptions? opts = null)
    public static Output<GetDedicatedHostAccountsResult> Invoke(GetDedicatedHostAccountsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDedicatedHostAccountsResult> getDedicatedHostAccounts(GetDedicatedHostAccountsArgs args, InvokeOptions options)
public static Output<GetDedicatedHostAccountsResult> getDedicatedHostAccounts(GetDedicatedHostAccountsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:cddc/getDedicatedHostAccounts:getDedicatedHostAccounts
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DedicatedHostId Changes to this property will trigger replacement. string
The ID of the host.
Ids Changes to this property will trigger replacement. List<string>
A list of Dedicated Host Account IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Account name.
OutputFile string
File name where to save data source results (after running pulumi preview).
PageNumber Changes to this property will trigger replacement. int
PageSize Changes to this property will trigger replacement. int
DedicatedHostId Changes to this property will trigger replacement. string
The ID of the host.
Ids Changes to this property will trigger replacement. []string
A list of Dedicated Host Account IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Account name.
OutputFile string
File name where to save data source results (after running pulumi preview).
PageNumber Changes to this property will trigger replacement. int
PageSize Changes to this property will trigger replacement. int
dedicatedHostId Changes to this property will trigger replacement. String
The ID of the host.
ids Changes to this property will trigger replacement. List<String>
A list of Dedicated Host Account IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Account name.
outputFile String
File name where to save data source results (after running pulumi preview).
pageNumber Changes to this property will trigger replacement. Integer
pageSize Changes to this property will trigger replacement. Integer
dedicatedHostId Changes to this property will trigger replacement. string
The ID of the host.
ids Changes to this property will trigger replacement. string[]
A list of Dedicated Host Account IDs.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Account name.
outputFile string
File name where to save data source results (after running pulumi preview).
pageNumber Changes to this property will trigger replacement. number
pageSize Changes to this property will trigger replacement. number
dedicated_host_id Changes to this property will trigger replacement. str
The ID of the host.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Dedicated Host Account IDs.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by Account name.
output_file str
File name where to save data source results (after running pulumi preview).
page_number Changes to this property will trigger replacement. int
page_size Changes to this property will trigger replacement. int
dedicatedHostId Changes to this property will trigger replacement. String
The ID of the host.
ids Changes to this property will trigger replacement. List<String>
A list of Dedicated Host Account IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Account name.
outputFile String
File name where to save data source results (after running pulumi preview).
pageNumber Changes to this property will trigger replacement. Number
pageSize Changes to this property will trigger replacement. Number

getDedicatedHostAccounts Result

The following output properties are available:

Accounts List<Pulumi.AliCloud.Cddc.Outputs.GetDedicatedHostAccountsAccount>
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
Names List<string>
DedicatedHostId string
NameRegex string
OutputFile string
PageNumber int
PageSize int
Accounts []GetDedicatedHostAccountsAccount
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Names []string
DedicatedHostId string
NameRegex string
OutputFile string
PageNumber int
PageSize int
accounts List<GetDedicatedHostAccountsAccount>
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
dedicatedHostId String
nameRegex String
outputFile String
pageNumber Integer
pageSize Integer
accounts GetDedicatedHostAccountsAccount[]
id string
The provider-assigned unique ID for this managed resource.
ids string[]
names string[]
dedicatedHostId string
nameRegex string
outputFile string
pageNumber number
pageSize number
accounts Sequence[GetDedicatedHostAccountsAccount]
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
names Sequence[str]
dedicated_host_id str
name_regex str
output_file str
page_number int
page_size int
accounts List<Property Map>
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
dedicatedHostId String
nameRegex String
outputFile String
pageNumber Number
pageSize Number

Supporting Types

GetDedicatedHostAccountsAccount

AccountName This property is required. string
The name of the Dedicated host account.
DedicatedHostId This property is required. string
The ID of the Dedicated host.
Id This property is required. string
The ID of the Dedicated Host Account. The value formats as <dedicated_host_id>:<account_name>.
AccountName This property is required. string
The name of the Dedicated host account.
DedicatedHostId This property is required. string
The ID of the Dedicated host.
Id This property is required. string
The ID of the Dedicated Host Account. The value formats as <dedicated_host_id>:<account_name>.
accountName This property is required. String
The name of the Dedicated host account.
dedicatedHostId This property is required. String
The ID of the Dedicated host.
id This property is required. String
The ID of the Dedicated Host Account. The value formats as <dedicated_host_id>:<account_name>.
accountName This property is required. string
The name of the Dedicated host account.
dedicatedHostId This property is required. string
The ID of the Dedicated host.
id This property is required. string
The ID of the Dedicated Host Account. The value formats as <dedicated_host_id>:<account_name>.
account_name This property is required. str
The name of the Dedicated host account.
dedicated_host_id This property is required. str
The ID of the Dedicated host.
id This property is required. str
The ID of the Dedicated Host Account. The value formats as <dedicated_host_id>:<account_name>.
accountName This property is required. String
The name of the Dedicated host account.
dedicatedHostId This property is required. String
The ID of the Dedicated host.
id This property is required. String
The ID of the Dedicated Host Account. The value formats as <dedicated_host_id>:<account_name>.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.