Table of Contents

Class ManagementGroupSubscriptionResource

Namespace
Azure.ResourceManager.ManagementGroups
Assembly
Azure.ResourceManager.dll

A Class representing a ManagementGroupSubscription along with the instance operations that can be performed on it. If you have a Azure.Core.ResourceIdentifier you can construct a ManagementGroupSubscriptionResource from an instance of ArmClient using the GetManagementGroupSubscriptionResource method. Otherwise you can get one from its parent resource ManagementGroupResource using the GetManagementGroupSubscription method.

public class ManagementGroupSubscriptionResource : ArmResource, IJsonModel<ManagementGroupSubscriptionData>, IPersistableModel<ManagementGroupSubscriptionData>
Inheritance
ManagementGroupSubscriptionResource
Implements
Inherited Members

Constructors

ManagementGroupSubscriptionResource()

Initializes a new instance of the ManagementGroupSubscriptionResource class for mocking.

protected ManagementGroupSubscriptionResource()

Fields

ResourceType

Gets the resource type for the operations.

public static readonly ResourceType ResourceType

Field Value

ResourceType

Properties

Data

Gets the data representing this Feature.

public virtual ManagementGroupSubscriptionData Data { get; }

Property Value

ManagementGroupSubscriptionData

Exceptions

InvalidOperationException

Throws if there is no data loaded in the current instance.

HasData

Gets whether or not the current instance has data.

public virtual bool HasData { get; }

Property Value

bool

Methods

CreateResourceIdentifier(string, string)

Generate the resource identifier of a ManagementGroupSubscriptionResource instance.

public static ResourceIdentifier CreateResourceIdentifier(string groupId, string subscriptionId)

Parameters

groupId string

The groupId.

subscriptionId string

The subscriptionId.

Returns

ResourceIdentifier

Delete(WaitUntil, string, CancellationToken)

De-associates subscription from the management group.

  • Request Path/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}
  • Operation IdManagementGroupSubscriptions_Delete
  • Default Api Version2021-04-01
  • ResourceManagementGroupSubscriptionResource
public virtual ArmOperation Delete(WaitUntil waitUntil, string cacheControl = null, CancellationToken cancellationToken = default)

Parameters

waitUntil WaitUntil

Azure.WaitUntil.Completed if the method should wait to return until the long-running operation has completed on the service; Azure.WaitUntil.Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

cacheControl string

Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.

cancellationToken CancellationToken

The cancellation token to use.

Returns

ArmOperation

DeleteAsync(WaitUntil, string, CancellationToken)

De-associates subscription from the management group.

  • Request Path/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}
  • Operation IdManagementGroupSubscriptions_Delete
  • Default Api Version2021-04-01
  • ResourceManagementGroupSubscriptionResource
public virtual Task<ArmOperation> DeleteAsync(WaitUntil waitUntil, string cacheControl = null, CancellationToken cancellationToken = default)

Parameters

waitUntil WaitUntil

Azure.WaitUntil.Completed if the method should wait to return until the long-running operation has completed on the service; Azure.WaitUntil.Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

cacheControl string

Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.

cancellationToken CancellationToken

The cancellation token to use.

Returns

Task<ArmOperation>

Get(string, CancellationToken)

Retrieves details about given subscription which is associated with the management group.

  • Request Path/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}
  • Operation IdManagementGroupSubscriptions_GetSubscription
  • Default Api Version2021-04-01
  • ResourceManagementGroupSubscriptionResource
public virtual Response<ManagementGroupSubscriptionResource> Get(string cacheControl = null, CancellationToken cancellationToken = default)

Parameters

cacheControl string

Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.

cancellationToken CancellationToken

The cancellation token to use.

Returns

Response<ManagementGroupSubscriptionResource>

GetAsync(string, CancellationToken)

Retrieves details about given subscription which is associated with the management group.

  • Request Path/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}
  • Operation IdManagementGroupSubscriptions_GetSubscription
  • Default Api Version2021-04-01
  • ResourceManagementGroupSubscriptionResource
public virtual Task<Response<ManagementGroupSubscriptionResource>> GetAsync(string cacheControl = null, CancellationToken cancellationToken = default)

Parameters

cacheControl string

Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.

cancellationToken CancellationToken

The cancellation token to use.

Returns

Task<Response<ManagementGroupSubscriptionResource>>

Update(WaitUntil, string, CancellationToken)

Associates existing subscription with the management group.

  • Request Path/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}
  • Operation IdManagementGroupSubscriptions_Create
  • Default Api Version2021-04-01
  • ResourceManagementGroupSubscriptionResource
public virtual ArmOperation<ManagementGroupSubscriptionResource> Update(WaitUntil waitUntil, string cacheControl = null, CancellationToken cancellationToken = default)

Parameters

waitUntil WaitUntil

Azure.WaitUntil.Completed if the method should wait to return until the long-running operation has completed on the service; Azure.WaitUntil.Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

cacheControl string

Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.

cancellationToken CancellationToken

The cancellation token to use.

Returns

ArmOperation<ManagementGroupSubscriptionResource>

UpdateAsync(WaitUntil, string, CancellationToken)

Associates existing subscription with the management group.

  • Request Path/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}
  • Operation IdManagementGroupSubscriptions_Create
  • Default Api Version2021-04-01
  • ResourceManagementGroupSubscriptionResource
public virtual Task<ArmOperation<ManagementGroupSubscriptionResource>> UpdateAsync(WaitUntil waitUntil, string cacheControl = null, CancellationToken cancellationToken = default)

Parameters

waitUntil WaitUntil

Azure.WaitUntil.Completed if the method should wait to return until the long-running operation has completed on the service; Azure.WaitUntil.Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

cacheControl string

Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.

cancellationToken CancellationToken

The cancellation token to use.

Returns

Task<ArmOperation<ManagementGroupSubscriptionResource>>