azure-native.resources.Resource
Explore with Pulumi AI
Resource information. Azure REST API version: 2022-09-01. Prior API version in Azure Native 1.x: 2019-05-01.
Other available API versions: 2023-07-01, 2024-03-01, 2024-07-01, 2024-11-01.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:resources:Resource myresource1 /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName} 
Create Resource Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Resource(name: string, args: ResourceArgs, opts?: CustomResourceOptions);@overload
def Resource(resource_name: str,
             args: ResourceArgs,
             opts: Optional[ResourceOptions] = None)
@overload
def Resource(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             resource_group_name: Optional[str] = None,
             parent_resource_path: Optional[str] = None,
             resource_type: Optional[str] = None,
             resource_provider_namespace: Optional[str] = None,
             api_version: Optional[str] = None,
             properties: Optional[Any] = None,
             extended_location: Optional[ExtendedLocationArgs] = None,
             plan: Optional[PlanArgs] = None,
             managed_by: Optional[str] = None,
             location: Optional[str] = None,
             resource_name_: Optional[str] = None,
             kind: Optional[str] = None,
             identity: Optional[IdentityArgs] = None,
             sku: Optional[SkuArgs] = None,
             tags: Optional[Mapping[str, str]] = None)func NewResource(ctx *Context, name string, args ResourceArgs, opts ...ResourceOption) (*Resource, error)public Resource(string name, ResourceArgs args, CustomResourceOptions? opts = null)
public Resource(String name, ResourceArgs args)
public Resource(String name, ResourceArgs args, CustomResourceOptions options)
type: azure-native:resources:Resource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ResourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ResourceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ResourceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ResourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ResourceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var resourceResource = new AzureNative.Resources.Resource("resourceResource", new()
{
    ResourceGroupName = "string",
    ParentResourcePath = "string",
    ResourceType = "string",
    ResourceProviderNamespace = "string",
    ApiVersion = "string",
    Properties = "any",
    ExtendedLocation = new AzureNative.Resources.Inputs.ExtendedLocationArgs
    {
        Name = "string",
        Type = "string",
    },
    Plan = new AzureNative.Resources.Inputs.PlanArgs
    {
        Name = "string",
        Product = "string",
        PromotionCode = "string",
        Publisher = "string",
        Version = "string",
    },
    ManagedBy = "string",
    Location = "string",
    ResourceName = "string",
    Kind = "string",
    Identity = new AzureNative.Resources.Inputs.IdentityArgs
    {
        Type = AzureNative.Resources.ResourceIdentityType.SystemAssigned,
        UserAssignedIdentities = new[]
        {
            "string",
        },
    },
    Sku = new AzureNative.Resources.Inputs.SkuArgs
    {
        Capacity = 0,
        Family = "string",
        Model = "string",
        Name = "string",
        Size = "string",
        Tier = "string",
    },
    Tags = 
    {
        { "string", "string" },
    },
});
example, err := resources.NewResource(ctx, "resourceResource", &resources.ResourceArgs{
	ResourceGroupName:         pulumi.String("string"),
	ParentResourcePath:        pulumi.String("string"),
	ResourceType:              pulumi.String("string"),
	ResourceProviderNamespace: pulumi.String("string"),
	ApiVersion:                pulumi.String("string"),
	Properties:                pulumi.Any("any"),
	ExtendedLocation: &resources.ExtendedLocationArgs{
		Name: pulumi.String("string"),
		Type: pulumi.String("string"),
	},
	Plan: &resources.PlanArgs{
		Name:          pulumi.String("string"),
		Product:       pulumi.String("string"),
		PromotionCode: pulumi.String("string"),
		Publisher:     pulumi.String("string"),
		Version:       pulumi.String("string"),
	},
	ManagedBy:    pulumi.String("string"),
	Location:     pulumi.String("string"),
	ResourceName: pulumi.String("string"),
	Kind:         pulumi.String("string"),
	Identity: &resources.IdentityArgs{
		Type: resources.ResourceIdentityTypeSystemAssigned,
		UserAssignedIdentities: pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	Sku: &resources.SkuArgs{
		Capacity: pulumi.Int(0),
		Family:   pulumi.String("string"),
		Model:    pulumi.String("string"),
		Name:     pulumi.String("string"),
		Size:     pulumi.String("string"),
		Tier:     pulumi.String("string"),
	},
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var resourceResource = new Resource("resourceResource", ResourceArgs.builder()
    .resourceGroupName("string")
    .parentResourcePath("string")
    .resourceType("string")
    .resourceProviderNamespace("string")
    .apiVersion("string")
    .properties("any")
    .extendedLocation(ExtendedLocationArgs.builder()
        .name("string")
        .type("string")
        .build())
    .plan(PlanArgs.builder()
        .name("string")
        .product("string")
        .promotionCode("string")
        .publisher("string")
        .version("string")
        .build())
    .managedBy("string")
    .location("string")
    .resourceName("string")
    .kind("string")
    .identity(IdentityArgs.builder()
        .type("SystemAssigned")
        .userAssignedIdentities("string")
        .build())
    .sku(SkuArgs.builder()
        .capacity(0)
        .family("string")
        .model("string")
        .name("string")
        .size("string")
        .tier("string")
        .build())
    .tags(Map.of("string", "string"))
    .build());
resource_resource = azure_native.resources.Resource("resourceResource",
    resource_group_name="string",
    parent_resource_path="string",
    resource_type="string",
    resource_provider_namespace="string",
    api_version="string",
    properties="any",
    extended_location={
        "name": "string",
        "type": "string",
    },
    plan={
        "name": "string",
        "product": "string",
        "promotion_code": "string",
        "publisher": "string",
        "version": "string",
    },
    managed_by="string",
    location="string",
    resource_name_="string",
    kind="string",
    identity={
        "type": azure_native.resources.ResourceIdentityType.SYSTEM_ASSIGNED,
        "user_assigned_identities": ["string"],
    },
    sku={
        "capacity": 0,
        "family": "string",
        "model": "string",
        "name": "string",
        "size": "string",
        "tier": "string",
    },
    tags={
        "string": "string",
    })
const resourceResource = new azure_native.resources.Resource("resourceResource", {
    resourceGroupName: "string",
    parentResourcePath: "string",
    resourceType: "string",
    resourceProviderNamespace: "string",
    apiVersion: "string",
    properties: "any",
    extendedLocation: {
        name: "string",
        type: "string",
    },
    plan: {
        name: "string",
        product: "string",
        promotionCode: "string",
        publisher: "string",
        version: "string",
    },
    managedBy: "string",
    location: "string",
    resourceName: "string",
    kind: "string",
    identity: {
        type: azure_native.resources.ResourceIdentityType.SystemAssigned,
        userAssignedIdentities: ["string"],
    },
    sku: {
        capacity: 0,
        family: "string",
        model: "string",
        name: "string",
        size: "string",
        tier: "string",
    },
    tags: {
        string: "string",
    },
});
type: azure-native:resources:Resource
properties:
    apiVersion: string
    extendedLocation:
        name: string
        type: string
    identity:
        type: SystemAssigned
        userAssignedIdentities:
            - string
    kind: string
    location: string
    managedBy: string
    parentResourcePath: string
    plan:
        name: string
        product: string
        promotionCode: string
        publisher: string
        version: string
    properties: any
    resourceGroupName: string
    resourceName: string
    resourceProviderNamespace: string
    resourceType: string
    sku:
        capacity: 0
        family: string
        model: string
        name: string
        size: string
        tier: string
    tags:
        string: string
Resource Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Resource resource accepts the following input properties:
- ApiVersion string
- The API version to use for the operation.
- ParentResource stringPath 
- The parent resource identity.
- ResourceGroup stringName 
- The name of the resource group for the resource. The name is case insensitive.
- ResourceProvider stringNamespace 
- The namespace of the resource provider.
- ResourceType string
- The resource type of the resource to create.
- ExtendedLocation Pulumi.Azure Native. Resources. Inputs. Extended Location 
- Resource extended location.
- Identity
Pulumi.Azure Native. Resources. Inputs. Identity 
- The identity of the resource.
- Kind string
- The kind of the resource.
- Location string
- Resource location
- ManagedBy string
- ID of the resource that manages this resource.
- Plan
Pulumi.Azure Native. Resources. Inputs. Plan 
- The plan of the resource.
- Properties object
- The resource properties.
- ResourceName string
- The name of the resource to create.
- Sku
Pulumi.Azure Native. Resources. Inputs. Sku 
- The SKU of the resource.
- Dictionary<string, string>
- Resource tags
- ApiVersion string
- The API version to use for the operation.
- ParentResource stringPath 
- The parent resource identity.
- ResourceGroup stringName 
- The name of the resource group for the resource. The name is case insensitive.
- ResourceProvider stringNamespace 
- The namespace of the resource provider.
- ResourceType string
- The resource type of the resource to create.
- ExtendedLocation ExtendedLocation Args 
- Resource extended location.
- Identity
IdentityArgs 
- The identity of the resource.
- Kind string
- The kind of the resource.
- Location string
- Resource location
- ManagedBy string
- ID of the resource that manages this resource.
- Plan
PlanArgs 
- The plan of the resource.
- Properties interface{}
- The resource properties.
- ResourceName string
- The name of the resource to create.
- Sku
SkuArgs 
- The SKU of the resource.
- map[string]string
- Resource tags
- apiVersion String
- The API version to use for the operation.
- parentResource StringPath 
- The parent resource identity.
- resourceGroup StringName 
- The name of the resource group for the resource. The name is case insensitive.
- resourceProvider StringNamespace 
- The namespace of the resource provider.
- resourceType String
- The resource type of the resource to create.
- extendedLocation ExtendedLocation 
- Resource extended location.
- identity Identity
- The identity of the resource.
- kind String
- The kind of the resource.
- location String
- Resource location
- managedBy String
- ID of the resource that manages this resource.
- plan Plan
- The plan of the resource.
- properties Object
- The resource properties.
- resourceName String
- The name of the resource to create.
- sku Sku
- The SKU of the resource.
- Map<String,String>
- Resource tags
- apiVersion string
- The API version to use for the operation.
- parentResource stringPath 
- The parent resource identity.
- resourceGroup stringName 
- The name of the resource group for the resource. The name is case insensitive.
- resourceProvider stringNamespace 
- The namespace of the resource provider.
- resourceType string
- The resource type of the resource to create.
- extendedLocation ExtendedLocation 
- Resource extended location.
- identity Identity
- The identity of the resource.
- kind string
- The kind of the resource.
- location string
- Resource location
- managedBy string
- ID of the resource that manages this resource.
- plan Plan
- The plan of the resource.
- properties any
- The resource properties.
- resourceName string
- The name of the resource to create.
- sku Sku
- The SKU of the resource.
- {[key: string]: string}
- Resource tags
- 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 for the resource. The name is case insensitive.
- resource_provider_ strnamespace 
- The namespace of the resource provider.
- resource_type str
- The resource type of the resource to create.
- extended_location ExtendedLocation Args 
- Resource extended location.
- identity
IdentityArgs 
- 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
PlanArgs 
- The plan of the resource.
- properties Any
- The resource properties.
- resource_name str
- The name of the resource to create.
- sku
SkuArgs 
- The SKU of the resource.
- Mapping[str, str]
- Resource tags
- apiVersion String
- The API version to use for the operation.
- parentResource StringPath 
- The parent resource identity.
- resourceGroup StringName 
- The name of the resource group for the resource. The name is case insensitive.
- resourceProvider StringNamespace 
- The namespace of the resource provider.
- resourceType String
- The resource type of the resource to create.
- extendedLocation Property Map
- Resource extended location.
- identity Property Map
- The identity of the resource.
- kind String
- The kind of the resource.
- location String
- Resource location
- managedBy String
- ID of the resource that manages this resource.
- plan Property Map
- The plan of the resource.
- properties Any
- The resource properties.
- resourceName String
- The name of the resource to create.
- sku Property Map
- The SKU of the resource.
- Map<String>
- Resource tags
Outputs
All input properties are implicitly available as output properties. Additionally, the Resource resource produces the following output properties:
Supporting Types
ExtendedLocation, ExtendedLocationArgs    
- Name string
- The extended location name.
- Type
string | Pulumi.Azure Native. Resources. Extended Location Type 
- The extended location type.
- Name string
- The extended location name.
- Type
string | ExtendedLocation Type 
- The extended location type.
- name String
- The extended location name.
- type
String | ExtendedLocation Type 
- The extended location type.
- name string
- The extended location name.
- type
string | ExtendedLocation Type 
- The extended location type.
- name str
- The extended location name.
- type
str | ExtendedLocation Type 
- The extended location type.
- name String
- The extended location name.
- type
String | "EdgeZone" 
- The extended location type.
ExtendedLocationResponse, ExtendedLocationResponseArgs      
ExtendedLocationType, ExtendedLocationTypeArgs      
- EdgeZone 
- EdgeZone
- ExtendedLocation Type Edge Zone 
- EdgeZone
- EdgeZone 
- EdgeZone
- EdgeZone 
- EdgeZone
- EDGE_ZONE
- EdgeZone
- "EdgeZone" 
- EdgeZone
Identity, IdentityArgs  
- Type
Pulumi.Azure Native. Resources. Resource Identity Type 
- The identity type.
- UserAssigned List<string>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}'.
- Type
ResourceIdentity Type 
- The identity type.
- UserAssigned []stringIdentities 
- 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}'.
- type
ResourceIdentity Type 
- The identity type.
- userAssigned List<String>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}'.
- type
ResourceIdentity Type 
- The identity type.
- userAssigned string[]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}'.
- type
ResourceIdentity Type 
- The identity type.
- user_assigned_ Sequence[str]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}'.
- type
"SystemAssigned" | "User Assigned" | "System Assigned, User Assigned" | "None" 
- The identity type.
- userAssigned List<String>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}'.
IdentityResponse, IdentityResponseArgs    
- PrincipalId string
- The principal ID of resource identity.
- TenantId string
- The tenant ID of resource.
- Type string
- The identity type.
- UserAssigned 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}'.
- PrincipalId string
- The principal ID of resource identity.
- TenantId string
- The tenant ID of resource.
- Type string
- The identity type.
- UserAssigned 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}'.
- principalId String
- The principal ID of resource identity.
- tenantId String
- The tenant ID of resource.
- type String
- The identity type.
- userAssigned 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}'.
- principalId string
- The principal ID of resource identity.
- tenantId string
- The tenant ID of resource.
- type string
- The identity type.
- userAssigned {[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}'.
- principalId String
- The principal ID of resource identity.
- tenantId String
- The tenant ID of resource.
- type String
- The identity type.
- userAssigned 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, IdentityResponseUserAssignedIdentitiesArgs          
- ClientId string
- The client id of user assigned identity.
- PrincipalId string
- The principal id of user assigned identity.
- ClientId string
- The client id of user assigned identity.
- PrincipalId string
- The principal id of user assigned identity.
- clientId String
- The client id of user assigned identity.
- principalId String
- The principal id of user assigned identity.
- clientId string
- The client id of user assigned identity.
- principalId 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.
- clientId String
- The client id of user assigned identity.
- principalId String
- The principal id of user assigned identity.
Plan, PlanArgs  
- Name string
- The plan ID.
- Product string
- The offer ID.
- PromotionCode 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.
- PromotionCode 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.
- promotionCode 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.
- promotionCode 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.
- promotionCode String
- The promotion code.
- publisher String
- The publisher ID.
- version String
- The plan's version.
PlanResponse, PlanResponseArgs    
- Name string
- The plan ID.
- Product string
- The offer ID.
- PromotionCode 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.
- PromotionCode 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.
- promotionCode 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.
- promotionCode 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.
- promotionCode String
- The promotion code.
- publisher String
- The publisher ID.
- version String
- The plan's version.
ResourceIdentityType, ResourceIdentityTypeArgs      
- SystemAssigned 
- SystemAssigned
- UserAssigned 
- UserAssigned
- SystemAssigned_User Assigned 
- SystemAssigned, UserAssigned
- None
- None
- ResourceIdentity Type System Assigned 
- SystemAssigned
- ResourceIdentity Type User Assigned 
- UserAssigned
- ResourceIdentity Type_System Assigned_User Assigned 
- SystemAssigned, UserAssigned
- ResourceIdentity Type None 
- None
- SystemAssigned 
- SystemAssigned
- UserAssigned 
- UserAssigned
- SystemAssigned_User Assigned 
- SystemAssigned, UserAssigned
- None
- None
- SystemAssigned 
- SystemAssigned
- UserAssigned 
- UserAssigned
- SystemAssigned_User Assigned 
- SystemAssigned, UserAssigned
- None
- None
- SYSTEM_ASSIGNED
- SystemAssigned
- USER_ASSIGNED
- UserAssigned
- SYSTEM_ASSIGNED_USER_ASSIGNED
- SystemAssigned, UserAssigned
- NONE
- None
- "SystemAssigned" 
- SystemAssigned
- "UserAssigned" 
- UserAssigned
- "SystemAssigned, User Assigned" 
- SystemAssigned, UserAssigned
- "None"
- None
Sku, SkuArgs  
SkuResponse, SkuResponseArgs    
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0