# AzureBicepResourceScope Methods

- Package: [Aspire.Hosting.Azure](/reference/api/csharp/aspire.hosting.azure.md)
- Type: [AzureBicepResourceScope](/reference/api/csharp/aspire.hosting.azure/azurebicepresourcescope.md)
- Kind: `Methods`
- Members: `2`

Represents the scope associated with the resource.

<a id="createforsubscription"></a>
<a id="createforsubscription-object"></a>

## CreateForSubscription(object)

- Name: `CreateForSubscription(object)`
- Modifiers: `static`
- Returns: [AzureBicepResourceScope](/reference/api/csharp/aspire.hosting.azure/azurebicepresourcescope.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/69db530a4816698cf1d5fa4557933e0ac4f127c6/src/Aspire.Hosting.Azure/AzureBicepResourceScope.cs#L65-L67)

Creates a scope for subscription-level resources.

```csharp
public sealed class AzureBicepResourceScope
{
    public static AzureBicepResourceScope CreateForSubscription(
        object subscription)
    {
        // ...
    }
}
```

## Parameters

- `subscription` (`object`)
  The subscription identifier for subscription-level resources.

## Returns

[AzureBicepResourceScope](/reference/api/csharp/aspire.hosting.azure/azurebicepresourcescope.md) -- A new [AzureBicepResourceScope](/reference/api/csharp/aspire.hosting.azure/azurebicepresourcescope.md) scoped to the subscription.

<a id="createfortenant"></a>

## CreateForTenant

- Name: `CreateForTenant`
- Modifiers: `static`
- Returns: [AzureBicepResourceScope](/reference/api/csharp/aspire.hosting.azure/azurebicepresourcescope.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/69db530a4816698cf1d5fa4557933e0ac4f127c6/src/Aspire.Hosting.Azure/AzureBicepResourceScope.cs#L76)

Creates a scope for tenant-level resources in the current tenant.

```csharp
public sealed class AzureBicepResourceScope
{
    public static AzureBicepResourceScope CreateForTenant()
    {
        // ...
    }
}
```

## Returns

[AzureBicepResourceScope](/reference/api/csharp/aspire.hosting.azure/azurebicepresourcescope.md) -- A new [AzureBicepResourceScope](/reference/api/csharp/aspire.hosting.azure/azurebicepresourcescope.md) scoped to the current tenant.
