azure-native.resources.getResource
Explore with Pulumi AI
Gets a resource.
Uses Azure REST API version 2024-03-01.
Other available API versions: 2020-10-01, 2021-01-01, 2021-04-01, 2022-09-01, 2023-07-01, 2024-07-01, 2024-11-01, 2025-03-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native resources [ApiVersion]. See the version guide for details.
Using getResource
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 getResource(args: GetResourceArgs, opts?: InvokeOptions): Promise<GetResourceResult>
function getResourceOutput(args: GetResourceOutputArgs, opts?: InvokeOptions): Output<GetResourceResult>def get_resource(api_version: Optional[str] = None,
                 parent_resource_path: Optional[str] = None,
                 resource_group_name: Optional[str] = None,
                 resource_name: Optional[str] = None,
                 resource_provider_namespace: Optional[str] = None,
                 resource_type: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetResourceResult
def get_resource_output(api_version: Optional[pulumi.Input[str]] = None,
                 parent_resource_path: Optional[pulumi.Input[str]] = None,
                 resource_group_name: Optional[pulumi.Input[str]] = None,
                 resource_name: Optional[pulumi.Input[str]] = None,
                 resource_provider_namespace: Optional[pulumi.Input[str]] = None,
                 resource_type: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetResourceResult]func LookupResource(ctx *Context, args *LookupResourceArgs, opts ...InvokeOption) (*LookupResourceResult, error)
func LookupResourceOutput(ctx *Context, args *LookupResourceOutputArgs, opts ...InvokeOption) LookupResourceResultOutput> Note: This function is named LookupResource in the Go SDK.
public static class GetResource 
{
    public static Task<GetResourceResult> InvokeAsync(GetResourceArgs args, InvokeOptions? opts = null)
    public static Output<GetResourceResult> Invoke(GetResourceInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetResourceResult> getResource(GetResourceArgs args, InvokeOptions options)
public static Output<GetResourceResult> getResource(GetResourceArgs args, InvokeOptions options)
fn::invoke:
  function: azure-native:resources:getResource
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Api
Version string - The API version to use for the operation.
 - Parent
Resource stringPath  - The parent resource identity.
 - Resource
Group stringName  - The name of the resource group containing the resource to get. The name is case insensitive.
 - Resource
Name string - The name of the resource to get.
 - Resource
Provider stringNamespace  - The namespace of the resource provider.
 - Resource
Type string - The resource type of the resource.
 
- Api
Version string - The API version to use for the operation.
 - Parent
Resource stringPath  - The parent resource identity.
 - Resource
Group stringName  - The name of the resource group containing the resource to get. The name is case insensitive.
 - Resource
Name string - The name of the resource to get.
 - Resource
Provider stringNamespace  - The namespace of the resource provider.
 - Resource
Type string - The resource type of the resource.
 
- api
Version String - The API version to use for the operation.
 - parent
Resource StringPath  - The parent resource identity.
 - resource
Group StringName  - The name of the resource group containing the resource to get. The name is case insensitive.
 - resource
Name String - The name of the resource to get.
 - resource
Provider StringNamespace  - The namespace of the resource provider.
 - resource
Type String - The resource type of the resource.
 
- api
Version string - The API version to use for the operation.
 - parent
Resource stringPath  - The parent resource identity.
 - resource
Group stringName  - The name of the resource group containing the resource to get. The name is case insensitive.
 - resource
Name string - The name of the resource to get.
 - resource
Provider stringNamespace  - The namespace of the resource provider.
 - resource
Type string - The resource type of the resource.
 
- api_
version str - The API version to use for the operation.
 - parent_
resource_ strpath  - The parent resource identity.
 - resource_
group_ strname  - The name of the resource group containing the resource to get. The name is case insensitive.
 - resource_
name str - The name of the resource to get.
 - resource_
provider_ strnamespace  - The namespace of the resource provider.
 - resource_
type str - The resource type of the resource.
 
- api
Version String - The API version to use for the operation.
 - parent
Resource StringPath  - The parent resource identity.
 - resource
Group StringName  - The name of the resource group containing the resource to get. The name is case insensitive.
 - resource
Name String - The name of the resource to get.
 - resource
Provider StringNamespace  - The namespace of the resource provider.
 - resource
Type String - The resource type of the resource.
 
getResource Result
The following output properties are available:
- Azure
Api stringVersion  - The Azure API version of the resource.
 - Id string
 - Resource ID
 - Name string
 - Resource name
 - Properties object
 - The resource properties.
 - Type string
 - Resource type
 - Extended
Location Pulumi.Azure Native. Resources. Outputs. Extended Location Response  - Resource extended location.
 - Identity
Pulumi.
Azure Native. Resources. Outputs. Identity Response  - The identity of the resource.
 - Kind string
 - The kind of the resource.
 - Location string
 - Resource location
 - Managed
By string - ID of the resource that manages this resource.
 - Plan
Pulumi.
Azure Native. Resources. Outputs. Plan Response  - The plan of the resource.
 - Sku
Pulumi.
Azure Native. Resources. Outputs. Sku Response  - The SKU of the resource.
 - Dictionary<string, string>
 - Resource tags
 
- Azure
Api stringVersion  - The Azure API version of the resource.
 - Id string
 - Resource ID
 - Name string
 - Resource name
 - Properties interface{}
 - The resource properties.
 - Type string
 - Resource type
 - Extended
Location ExtendedLocation Response  - Resource extended location.
 - Identity
Identity
Response  - The identity of the resource.
 - Kind string
 - The kind of the resource.
 - Location string
 - Resource location
 - Managed
By string - ID of the resource that manages this resource.
 - Plan
Plan
Response  - The plan of the resource.
 - Sku
Sku
Response  - The SKU of the resource.
 - map[string]string
 - Resource tags
 
- azure
Api StringVersion  - The Azure API version of the resource.
 - id String
 - Resource ID
 - name String
 - Resource name
 - properties Object
 - The resource properties.
 - type String
 - Resource type
 - extended
Location ExtendedLocation Response  - Resource extended location.
 - identity
Identity
Response  - The identity of the resource.
 - kind String
 - The kind of the resource.
 - location String
 - Resource location
 - managed
By String - ID of the resource that manages this resource.
 - plan
Plan
Response  - The plan of the resource.
 - sku
Sku
Response  - The SKU of the resource.
 - Map<String,String>
 - Resource tags
 
- azure
Api stringVersion  - The Azure API version of the resource.
 - id string
 - Resource ID
 - name string
 - Resource name
 - properties any
 - The resource properties.
 - type string
 - Resource type
 - extended
Location ExtendedLocation Response  - Resource extended location.
 - identity
Identity
Response  - The identity of the resource.
 - kind string
 - The kind of the resource.
 - location string
 - Resource location
 - managed
By string - ID of the resource that manages this resource.
 - plan
Plan
Response  - The plan of the resource.
 - sku
Sku
Response  - The SKU of the resource.
 - {[key: string]: string}
 - Resource tags
 
- azure_
api_ strversion  - The Azure API version of the resource.
 - id str
 - Resource ID
 - name str
 - Resource name
 - properties Any
 - The resource properties.
 - type str
 - Resource type
 - extended_
location ExtendedLocation Response  - Resource extended location.
 - identity
Identity
Response  - The identity of the resource.
 - kind str
 - The kind of the resource.
 - location str
 - Resource location
 - managed_
by str - ID of the resource that manages this resource.
 - plan
Plan
Response  - The plan of the resource.
 - sku
Sku
Response  - The SKU of the resource.
 - Mapping[str, str]
 - Resource tags
 
- azure
Api StringVersion  - The Azure API version of the resource.
 - id String
 - Resource ID
 - name String
 - Resource name
 - properties Any
 - The resource properties.
 - type String
 - Resource type
 - extended
Location Property Map - Resource extended location.
 - identity Property Map
 - The identity of the resource.
 - kind String
 - The kind of the resource.
 - location String
 - Resource location
 - managed
By String - ID of the resource that manages this resource.
 - plan Property Map
 - The plan of the resource.
 - sku Property Map
 - The SKU of the resource.
 - Map<String>
 - Resource tags
 
Supporting Types
ExtendedLocationResponse  
IdentityResponse 
- Principal
Id string - The principal ID of resource identity.
 - Tenant
Id string - The tenant ID of resource.
 - Type string
 - The identity type.
 - User
Assigned Dictionary<string, Pulumi.Identities Azure Native. Resources. Inputs. Identity Response User Assigned Identities>  - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
 
- Principal
Id string - The principal ID of resource identity.
 - Tenant
Id string - The tenant ID of resource.
 - Type string
 - The identity type.
 - User
Assigned map[string]IdentityIdentities Response User Assigned Identities  - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
 
- principal
Id String - The principal ID of resource identity.
 - tenant
Id String - The tenant ID of resource.
 - type String
 - The identity type.
 - user
Assigned Map<String,IdentityIdentities Response User Assigned Identities>  - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
 
- principal
Id string - The principal ID of resource identity.
 - tenant
Id string - The tenant ID of resource.
 - type string
 - The identity type.
 - user
Assigned {[key: string]: IdentityIdentities Response User Assigned Identities}  - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
 
- principal_
id str - The principal ID of resource identity.
 - tenant_
id str - The tenant ID of resource.
 - type str
 - The identity type.
 - user_
assigned_ Mapping[str, Identityidentities Response User Assigned Identities]  - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
 
- principal
Id String - The principal ID of resource identity.
 - tenant
Id String - The tenant ID of resource.
 - type String
 - The identity type.
 - user
Assigned Map<Property Map>Identities  - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
 
IdentityResponseUserAssignedIdentities    
- Client
Id string - The client id of user assigned identity.
 - Principal
Id string - The principal id of user assigned identity.
 
- Client
Id string - The client id of user assigned identity.
 - Principal
Id string - The principal id of user assigned identity.
 
- client
Id String - The client id of user assigned identity.
 - principal
Id String - The principal id of user assigned identity.
 
- client
Id string - The client id of user assigned identity.
 - principal
Id string - The principal id of user assigned identity.
 
- client_
id str - The client id of user assigned identity.
 - principal_
id str - The principal id of user assigned identity.
 
- client
Id String - The client id of user assigned identity.
 - principal
Id String - The principal id of user assigned identity.
 
PlanResponse 
- Name string
 - The plan ID.
 - Product string
 - The offer ID.
 - Promotion
Code string - The promotion code.
 - Publisher string
 - The publisher ID.
 - Version string
 - The plan's version.
 
- Name string
 - The plan ID.
 - Product string
 - The offer ID.
 - Promotion
Code string - The promotion code.
 - Publisher string
 - The publisher ID.
 - Version string
 - The plan's version.
 
- name String
 - The plan ID.
 - product String
 - The offer ID.
 - promotion
Code String - The promotion code.
 - publisher String
 - The publisher ID.
 - version String
 - The plan's version.
 
- name string
 - The plan ID.
 - product string
 - The offer ID.
 - promotion
Code string - The promotion code.
 - publisher string
 - The publisher ID.
 - version string
 - The plan's version.
 
- name str
 - The plan ID.
 - product str
 - The offer ID.
 - promotion_
code str - The promotion code.
 - publisher str
 - The publisher ID.
 - version str
 - The plan's version.
 
- name String
 - The plan ID.
 - product String
 - The offer ID.
 - promotion
Code String - The promotion code.
 - publisher String
 - The publisher ID.
 - version String
 - The plan's version.
 
SkuResponse 
Package Details
- Repository
 - Azure Native pulumi/pulumi-azure-native
 - License
 - Apache-2.0