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
-
IJsonModel<ManagementGroupSubscriptionData>IPersistableModel<ManagementGroupSubscriptionData>
- 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
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
Methods
CreateResourceIdentifier(string, string)
Generate the resource identifier of a ManagementGroupSubscriptionResource instance.
public static ResourceIdentifier CreateResourceIdentifier(string groupId, string subscriptionId)
Parameters
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
WaitUntilAzure.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
stringIndicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
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
WaitUntilAzure.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
stringIndicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
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
stringIndicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.
cancellationToken
CancellationTokenThe 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
stringIndicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.
cancellationToken
CancellationTokenThe 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
WaitUntilAzure.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
stringIndicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
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
WaitUntilAzure.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
stringIndicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.
cancellationToken
CancellationTokenThe cancellation token to use.