Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 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);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.cddc.get_dedicated_host_accounts()
pulumi.export("cddcDedicatedHostAccountId1", ids.accounts[0].id)
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, nil, nil)
if err != nil {
return err
}
ctx.Export("cddcDedicatedHostAccountId1", ids.Accounts[0].Id)
return nil
})
}
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),
};
});
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()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:cddc:getDedicatedHostAccounts
Arguments: {}
outputs:
cddcDedicatedHostAccountId1: ${ids.accounts[0].id}
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>
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]
func GetDedicatedHostAccounts(ctx *Context, args *GetDedicatedHostAccountsArgs, opts ...InvokeOption) (*GetDedicatedHostAccountsResult, error)
func GetDedicatedHostAccountsOutput(ctx *Context, args *GetDedicatedHostAccountsOutputArgs, opts ...InvokeOption) GetDedicatedHostAccountsResultOutput
> 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)
}
public static CompletableFuture<GetDedicatedHostAccountsResult> getDedicatedHostAccounts(GetDedicatedHostAccountsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:cddc/getDedicatedHostAccounts:getDedicatedHostAccounts
arguments:
# arguments dictionary
The following arguments are supported:
- Dedicated
Host stringId - The ID of the host.
- Ids List<string>
- A list of Dedicated Host Account IDs.
- Name
Regex string - A regex string to filter results by Account name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Page
Number int - Page
Size int
- Dedicated
Host stringId - The ID of the host.
- Ids []string
- A list of Dedicated Host Account IDs.
- Name
Regex string - A regex string to filter results by Account name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Page
Number int - Page
Size int
- dedicated
Host StringId - The ID of the host.
- ids List<String>
- A list of Dedicated Host Account IDs.
- name
Regex String - A regex string to filter results by Account name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Integer - page
Size Integer
- dedicated
Host stringId - The ID of the host.
- ids string[]
- A list of Dedicated Host Account IDs.
- name
Regex string - A regex string to filter results by Account name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - page
Number number - page
Size number
- dedicated_
host_ strid - The ID of the host.
- ids Sequence[str]
- A list of Dedicated Host Account IDs.
- name_
regex 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 int - page_
size int
- dedicated
Host StringId - The ID of the host.
- ids List<String>
- A list of Dedicated Host Account IDs.
- name
Regex String - A regex string to filter results by Account name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Number - page
Size Number
getDedicatedHostAccounts Result
The following output properties are available:
- Accounts
List<Pulumi.
Ali Cloud. Cddc. Outputs. Get Dedicated Host Accounts Account> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Dedicated
Host stringId - Name
Regex string - Output
File string - Page
Number int - Page
Size int
- Accounts
[]Get
Dedicated Host Accounts Account - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Dedicated
Host stringId - Name
Regex string - Output
File string - Page
Number int - Page
Size int
- accounts
List<Get
Dedicated Host Accounts Account> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- dedicated
Host StringId - name
Regex String - output
File String - page
Number Integer - page
Size Integer
- accounts
Get
Dedicated Host Accounts Account[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- dedicated
Host stringId - name
Regex string - output
File string - page
Number number - page
Size number
- accounts
Sequence[Get
Dedicated Host Accounts Account] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- dedicated_
host_ strid - 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>
- dedicated
Host StringId - name
Regex String - output
File String - page
Number Number - page
Size Number
Supporting Types
GetDedicatedHostAccountsAccount
- Account
Name string - The name of the Dedicated host account.
- Dedicated
Host stringId - The ID of the Dedicated host.
- Id string
- The ID of the Dedicated Host Account. The value formats as
<dedicated_host_id>:<account_name>
.
- Account
Name string - The name of the Dedicated host account.
- Dedicated
Host stringId - The ID of the Dedicated host.
- Id string
- The ID of the Dedicated Host Account. The value formats as
<dedicated_host_id>:<account_name>
.
- account
Name String - The name of the Dedicated host account.
- dedicated
Host StringId - The ID of the Dedicated host.
- id String
- The ID of the Dedicated Host Account. The value formats as
<dedicated_host_id>:<account_name>
.
- account
Name string - The name of the Dedicated host account.
- dedicated
Host stringId - The ID of the Dedicated host.
- id string
- The ID of the Dedicated Host Account. The value formats as
<dedicated_host_id>:<account_name>
.
- account_
name str - The name of the Dedicated host account.
- dedicated_
host_ strid - The ID of the Dedicated host.
- id str
- The ID of the Dedicated Host Account. The value formats as
<dedicated_host_id>:<account_name>
.
- account
Name String - The name of the Dedicated host account.
- dedicated
Host StringId - The ID of the Dedicated host.
- id 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.