internal InstancePool(ArmClientOptions clientOptions, TokenCredential credential, Uri uri, HttpPipeline pipeline, ResourceIdentifier id) : base(clientOptions, credential, uri, pipeline, id)
 {
     _clientDiagnostics          = new ClientDiagnostics(ClientOptions);
     _instancePoolsRestClient    = new InstancePoolsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
     _managedInstancesRestClient = new ManagedInstancesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
     _usagesRestClient           = new UsagesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
 internal InstancePool(ArmResource options, ResourceIdentifier id) : base(options, id)
 {
     _clientDiagnostics          = new ClientDiagnostics(ClientOptions);
     _instancePoolsRestClient    = new InstancePoolsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
     _managedInstancesRestClient = new ManagedInstancesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
     _usagesRestClient           = new UsagesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
        internal InstancePoolCollection(ArmResource parent) : base(parent)
        {
            _instancePoolClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", InstancePool.ResourceType.Namespace, DiagnosticOptions);
            ArmClient.TryGetApiVersion(InstancePool.ResourceType, out string instancePoolApiVersion);
            _instancePoolRestClient = new InstancePoolsRestOperations(_instancePoolClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, instancePoolApiVersion);
#if DEBUG
            ValidateResourceId(Id);
#endif
        }
 internal InstancePool(ArmResource options, InstancePoolData resource) : base(options, resource.Id)
 {
     HasData                     = true;
     _data                       = resource;
     _clientDiagnostics          = new ClientDiagnostics(ClientOptions);
     _instancePoolsRestClient    = new InstancePoolsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
     _managedInstancesRestClient = new ManagedInstancesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
     _usagesRestClient           = new UsagesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
示例#5
0
        internal InstancePoolCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
        {
            _instancePoolClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", InstancePoolResource.ResourceType.Namespace, Diagnostics);
            TryGetApiVersion(InstancePoolResource.ResourceType, out string instancePoolApiVersion);
            _instancePoolRestClient = new InstancePoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, instancePoolApiVersion);
#if DEBUG
            ValidateResourceId(Id);
#endif
        }
示例#6
0
        internal InstancePool(ArmClient client, ResourceIdentifier id) : base(client, id)
        {
            _instancePoolClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ResourceType.Namespace, DiagnosticOptions);
            TryGetApiVersion(ResourceType, out string instancePoolApiVersion);
            _instancePoolRestClient           = new InstancePoolsRestOperations(Pipeline, DiagnosticOptions.ApplicationId, BaseUri, instancePoolApiVersion);
            _managedInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ManagedInstance.ResourceType.Namespace, DiagnosticOptions);
            TryGetApiVersion(ManagedInstance.ResourceType, out string managedInstanceApiVersion);
            _managedInstanceRestClient = new ManagedInstancesRestOperations(Pipeline, DiagnosticOptions.ApplicationId, BaseUri, managedInstanceApiVersion);
            _usagesClientDiagnostics   = new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, DiagnosticOptions);
            _usagesRestClient          = new UsagesRestOperations(Pipeline, DiagnosticOptions.ApplicationId, BaseUri);
#if DEBUG
            ValidateResourceId(Id);
#endif
        }
示例#7
0
 internal InstancePoolCollection(ArmResource parent) : base(parent)
 {
     _clientDiagnostics       = new ClientDiagnostics(ClientOptions);
     _instancePoolsRestClient = new InstancePoolsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
示例#8
0
 internal InstancePoolsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null)
 {
     RestClient         = new InstancePoolsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint);
     _clientDiagnostics = clientDiagnostics;
     _pipeline          = pipeline;
 }