azure-native-v2.resources.ResourceGroup
Explore with Pulumi AI
Resource group 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.
Create ResourceGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ResourceGroup(name: string, args?: ResourceGroupArgs, opts?: CustomResourceOptions);
@overload
def ResourceGroup(resource_name: str,
args: Optional[ResourceGroupArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def ResourceGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
managed_by: Optional[str] = None,
resource_group_name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewResourceGroup(ctx *Context, name string, args *ResourceGroupArgs, opts ...ResourceOption) (*ResourceGroup, error)
public ResourceGroup(string name, ResourceGroupArgs? args = null, CustomResourceOptions? opts = null)
public ResourceGroup(String name, ResourceGroupArgs args)
public ResourceGroup(String name, ResourceGroupArgs args, CustomResourceOptions options)
type: azure-native:resources:ResourceGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args ResourceGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args ResourceGroupArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args ResourceGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args ResourceGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. ResourceGroupArgs - 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 resourceGroupResource = new AzureNative.Resources.ResourceGroup("resourceGroupResource", new()
{
Location = "string",
ManagedBy = "string",
ResourceGroupName = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := resources.NewResourceGroup(ctx, "resourceGroupResource", &resources.ResourceGroupArgs{
Location: "string",
ManagedBy: "string",
ResourceGroupName: "string",
Tags: map[string]interface{}{
"string": "string",
},
})
var resourceGroupResource = new ResourceGroup("resourceGroupResource", ResourceGroupArgs.builder()
.location("string")
.managedBy("string")
.resourceGroupName("string")
.tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build());
resource_group_resource = azure_native.resources.ResourceGroup("resourceGroupResource",
location=string,
managed_by=string,
resource_group_name=string,
tags={
string: string,
})
const resourceGroupResource = new azure_native.resources.ResourceGroup("resourceGroupResource", {
location: "string",
managedBy: "string",
resourceGroupName: "string",
tags: {
string: "string",
},
});
type: azure-native:resources:ResourceGroup
properties:
location: string
managedBy: string
resourceGroupName: string
tags:
string: string
ResourceGroup 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 ResourceGroup resource accepts the following input properties:
- Location
Changes to this property will trigger replacement.
- The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.
- Managed
By string - The ID of the resource that manages this resource group.
- Resource
Group Name Changes to this property will trigger replacement.
- The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.
- Dictionary<string, string>
- The tags attached to the resource group.
- Location
Changes to this property will trigger replacement.
- The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.
- Managed
By string - The ID of the resource that manages this resource group.
- Resource
Group Name Changes to this property will trigger replacement.
- The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.
- map[string]string
- The tags attached to the resource group.
- location
Changes to this property will trigger replacement.
- The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.
- managed
By String - The ID of the resource that manages this resource group.
- resource
Group Name Changes to this property will trigger replacement.
- The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.
- Map<String,String>
- The tags attached to the resource group.
- location
Changes to this property will trigger replacement.
- The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.
- managed
By string - The ID of the resource that manages this resource group.
- resource
Group Name Changes to this property will trigger replacement.
- The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.
- {[key: string]: string}
- The tags attached to the resource group.
- location
Changes to this property will trigger replacement.
- The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.
- managed_
by str - The ID of the resource that manages this resource group.
- resource_
group_ name Changes to this property will trigger replacement.
- The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.
- Mapping[str, str]
- The tags attached to the resource group.
- location
Changes to this property will trigger replacement.
- The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.
- managed
By String - The ID of the resource that manages this resource group.
- resource
Group Name Changes to this property will trigger replacement.
- The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.
- Map<String>
- The tags attached to the resource group.
Outputs
All input properties are implicitly available as output properties. Additionally, the ResourceGroup resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource group.
- Properties
Pulumi.
Azure Native. Resources. Outputs. Resource Group Properties Response - The resource group properties.
- Type string
- The type of the resource group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource group.
- Properties
Resource
Group Properties Response - The resource group properties.
- Type string
- The type of the resource group.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource group.
- properties
Resource
Group Properties Response - The resource group properties.
- type String
- The type of the resource group.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the resource group.
- properties
Resource
Group Properties Response - The resource group properties.
- type string
- The type of the resource group.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the resource group.
- properties
Resource
Group Properties Response - The resource group properties.
- type str
- The type of the resource group.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource group.
- properties Property Map
- The resource group properties.
- type String
- The type of the resource group.
Supporting Types
ResourceGroupPropertiesResponse, ResourceGroupPropertiesResponseArgs
- Provisioning
State This property is required. string - The provisioning state.
- Provisioning
State This property is required. string - The provisioning state.
- provisioning
State This property is required. String - The provisioning state.
- provisioning
State This property is required. string - The provisioning state.
- provisioning_
state This property is required. str - The provisioning state.
- provisioning
State This property is required. String - The provisioning state.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:resources:ResourceGroup my-resource-group /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v2 pulumi/pulumi-azure-native
- License
- Apache-2.0