Viewing docs for AzAPI v1.12.2
published on Saturday, May 11, 2024 by dirien
published on Saturday, May 11, 2024 by dirien
Viewing docs for AzAPI v1.12.2
published on Saturday, May 11, 2024 by dirien
published on Saturday, May 11, 2024 by dirien
This resource can list all resources of a specific type under a scope. If the API supports paging, it will automatically fetch all pages and return the full list.
Example Usage
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
}
data "azapi_resource_list" "listBySubscription" {
type = "Microsoft.Automation/automationAccounts@2021-06-22"
parent_id = "/subscriptions/00000000-0000-0000-0000-000000000000"
response_export_values = ["*"]
}
data "azapi_resource_list" "listByResourceGroup" {
type = "Microsoft.Automation/automationAccounts@2021-06-22"
parent_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1"
response_export_values = ["*"]
}
data "azapi_resource_list" "listSubnetsByVnet" {
type = "Microsoft.Network/virtualNetworks/subnets@2021-02-01"
parent_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1"
response_export_values = ["*"]
}
Using getResourceList
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 getResourceList(args: GetResourceListArgs, opts?: InvokeOptions): Promise<GetResourceListResult>
function getResourceListOutput(args: GetResourceListOutputArgs, opts?: InvokeOptions): Output<GetResourceListResult>def get_resource_list(parent_id: Optional[str] = None,
response_export_values: Optional[Sequence[str]] = None,
type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetResourceListResult
def get_resource_list_output(parent_id: Optional[pulumi.Input[str]] = None,
response_export_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
type: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetResourceListResult]func GetResourceList(ctx *Context, args *GetResourceListArgs, opts ...InvokeOption) (*GetResourceListResult, error)
func GetResourceListOutput(ctx *Context, args *GetResourceListOutputArgs, opts ...InvokeOption) GetResourceListResultOutput> Note: This function is named GetResourceList in the Go SDK.
public static class GetResourceList
{
public static Task<GetResourceListResult> InvokeAsync(GetResourceListArgs args, InvokeOptions? opts = null)
public static Output<GetResourceListResult> Invoke(GetResourceListInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetResourceListResult> getResourceList(GetResourceListArgs args, InvokeOptions options)
public static Output<GetResourceListResult> getResourceList(GetResourceListArgs args, InvokeOptions options)
fn::invoke:
function: azapi:index/getResourceList:getResourceList
arguments:
# arguments dictionaryThe following arguments are supported:
- Parent
Id string - The parent resource ID to list resources under. e.g.
/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup. - Type string
- It is in a format like
<resource-type>@<api-version>.<resource-type>is the Azure resource type, for example,Microsoft.Storage/storageAccounts.<api-version>is version of the API used to manage this azure resource. - Response
Export List<string>Values - A list of path that needs to be exported from response body.
Setting it to
["*"]will export the full response body. Here's an example. If it sets to["value"], it will set the following json to computed propertyoutput.{ "value": [ { "id": "id1", "Permissions": "Full" }, { "id": "id2", "Permissions": "Full" } ] }
- Parent
Id string - The parent resource ID to list resources under. e.g.
/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup. - Type string
- It is in a format like
<resource-type>@<api-version>.<resource-type>is the Azure resource type, for example,Microsoft.Storage/storageAccounts.<api-version>is version of the API used to manage this azure resource. - Response
Export []stringValues - A list of path that needs to be exported from response body.
Setting it to
["*"]will export the full response body. Here's an example. If it sets to["value"], it will set the following json to computed propertyoutput.{ "value": [ { "id": "id1", "Permissions": "Full" }, { "id": "id2", "Permissions": "Full" } ] }
- parent
Id String - The parent resource ID to list resources under. e.g.
/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup. - type String
- It is in a format like
<resource-type>@<api-version>.<resource-type>is the Azure resource type, for example,Microsoft.Storage/storageAccounts.<api-version>is version of the API used to manage this azure resource. - response
Export List<String>Values - A list of path that needs to be exported from response body.
Setting it to
["*"]will export the full response body. Here's an example. If it sets to["value"], it will set the following json to computed propertyoutput.{ "value": [ { "id": "id1", "Permissions": "Full" }, { "id": "id2", "Permissions": "Full" } ] }
- parent
Id string - The parent resource ID to list resources under. e.g.
/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup. - type string
- It is in a format like
<resource-type>@<api-version>.<resource-type>is the Azure resource type, for example,Microsoft.Storage/storageAccounts.<api-version>is version of the API used to manage this azure resource. - response
Export string[]Values - A list of path that needs to be exported from response body.
Setting it to
["*"]will export the full response body. Here's an example. If it sets to["value"], it will set the following json to computed propertyoutput.{ "value": [ { "id": "id1", "Permissions": "Full" }, { "id": "id2", "Permissions": "Full" } ] }
- parent_
id str - The parent resource ID to list resources under. e.g.
/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup. - type str
- It is in a format like
<resource-type>@<api-version>.<resource-type>is the Azure resource type, for example,Microsoft.Storage/storageAccounts.<api-version>is version of the API used to manage this azure resource. - response_
export_ Sequence[str]values - A list of path that needs to be exported from response body.
Setting it to
["*"]will export the full response body. Here's an example. If it sets to["value"], it will set the following json to computed propertyoutput.{ "value": [ { "id": "id1", "Permissions": "Full" }, { "id": "id2", "Permissions": "Full" } ] }
- parent
Id String - The parent resource ID to list resources under. e.g.
/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup. - type String
- It is in a format like
<resource-type>@<api-version>.<resource-type>is the Azure resource type, for example,Microsoft.Storage/storageAccounts.<api-version>is version of the API used to manage this azure resource. - response
Export List<String>Values - A list of path that needs to be exported from response body.
Setting it to
["*"]will export the full response body. Here's an example. If it sets to["value"], it will set the following json to computed propertyoutput.{ "value": [ { "id": "id1", "Permissions": "Full" }, { "id": "id2", "Permissions": "Full" } ] }
getResourceList Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Output string
- The output json containing the properties specified in
response_export_values. Here are some examples to decode json and extract the value. - Parent
Id string - Type string
- Response
Export List<string>Values
- Id string
- The provider-assigned unique ID for this managed resource.
- Output string
- The output json containing the properties specified in
response_export_values. Here are some examples to decode json and extract the value. - Parent
Id string - Type string
- Response
Export []stringValues
- id String
- The provider-assigned unique ID for this managed resource.
- output String
- The output json containing the properties specified in
response_export_values. Here are some examples to decode json and extract the value. - parent
Id String - type String
- response
Export List<String>Values
- id string
- The provider-assigned unique ID for this managed resource.
- output string
- The output json containing the properties specified in
response_export_values. Here are some examples to decode json and extract the value. - parent
Id string - type string
- response
Export string[]Values
- id str
- The provider-assigned unique ID for this managed resource.
- output str
- The output json containing the properties specified in
response_export_values. Here are some examples to decode json and extract the value. - parent_
id str - type str
- response_
export_ Sequence[str]values
- id String
- The provider-assigned unique ID for this managed resource.
- output String
- The output json containing the properties specified in
response_export_values. Here are some examples to decode json and extract the value. - parent
Id String - type String
- response
Export List<String>Values
Package Details
- Repository
- azapi dirien/pulumi-azapi
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azapiTerraform Provider.
Viewing docs for AzAPI v1.12.2
published on Saturday, May 11, 2024 by dirien
published on Saturday, May 11, 2024 by dirien
