/// <summary> /// Initializes a new instance of the <see cref="ManagementGroup"/> class. /// </summary> /// <param name="operations"> The operations to copy the client options from. </param> /// <param name="resource"> The ManagementGroupData to use in these operations. </param> internal ManagementGroup(ArmResource operations, ManagementGroupData resource) : base(operations, resource.Id) { _data = resource; HasData = true; _clientDiagnostics = new ClientDiagnostics(ClientOptions); _restClient = new ManagementGroupsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri); }
internal ManagementGroup(ArmClient client, ResourceIdentifier id) : base(client, id) { _managementGroupClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Management", ResourceType.Namespace, DiagnosticOptions); TryGetApiVersion(ResourceType, out string managementGroupApiVersion); _managementGroupRestClient = new ManagementGroupsRestOperations(Pipeline, DiagnosticOptions.ApplicationId, BaseUri, managementGroupApiVersion); #if DEBUG ValidateResourceId(Id); #endif }
internal ManagementGroupCollection(ArmResource parent) : base(parent) { _managementGroupClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Management", ManagementGroup.ResourceType.Namespace, DiagnosticOptions); ArmClient.TryGetApiVersion(ManagementGroup.ResourceType, out string managementGroupApiVersion); _managementGroupRestClient = new ManagementGroupsRestOperations(_managementGroupClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, managementGroupApiVersion); #if DEBUG ValidateResourceId(Id); #endif }
/// <summary> /// Initializes a new instance of the <see cref="ManagementGroupContainer"/> class. /// </summary> /// <param name="tenant"> The parent tenant. </param> internal ManagementGroupContainer(TenantOperations tenant) : base(tenant) { _clientDiagnostics = new ClientDiagnostics(ClientOptions); _restClient = new ManagementGroupsRestOperations(_clientDiagnostics, Pipeline, BaseUri); }
/// <summary> /// Initializes a new instance of the <see cref="ResourceGroupOperations"/> class. /// </summary> /// <param name="options"> The client parameters to use in these operations. </param> /// <param name="id"> The identifier of the resource that is the target of operations. </param> protected internal ManagementGroupOperations(ResourceOperations options, ResourceIdentifier id) : base(options, id) { _clientDiagnostics = new ClientDiagnostics(ClientOptions); _restClient = new ManagementGroupsRestOperations(_clientDiagnostics, Pipeline, BaseUri); }