internal NetworkSecurityGroup(ArmResource options, NetworkSecurityGroupData resource) : base(options, new ResourceIdentifier(resource.Id))
 {
     HasData            = true;
     _data              = resource;
     _clientDiagnostics = new ClientDiagnostics(ClientOptions);
     _networkSecurityGroupsRestClient = new NetworkSecurityGroupsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
 internal NetworkSecurityGroup(ArmResource options, NetworkSecurityGroupData resource) : base(options, resource.Id)
 {
     HasData            = true;
     _data              = resource;
     _clientDiagnostics = new ClientDiagnostics(ClientOptions);
     _restClient        = new NetworkSecurityGroupsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, Id.SubscriptionId, BaseUri);
     _defaultSecurityRulesRestClient = new DefaultSecurityRulesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, Id.SubscriptionId, BaseUri);
 }
示例#3
0
        internal NetworkSecurityGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id)
        {
            _networkSecurityGroupClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Network", ResourceType.Namespace, Diagnostics);
            TryGetApiVersion(ResourceType, out string networkSecurityGroupApiVersion);
            _networkSecurityGroupRestClient = new NetworkSecurityGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkSecurityGroupApiVersion);
#if DEBUG
            ValidateResourceId(Id);
#endif
        }
示例#4
0
        internal NetworkSecurityGroupCollection(ArmResource parent) : base(parent)
        {
            _networkSecurityGroupClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Network", NetworkSecurityGroup.ResourceType.Namespace, DiagnosticOptions);
            ArmClient.TryGetApiVersion(NetworkSecurityGroup.ResourceType, out string networkSecurityGroupApiVersion);
            _networkSecurityGroupRestClient = new NetworkSecurityGroupsRestOperations(_networkSecurityGroupClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, networkSecurityGroupApiVersion);
#if DEBUG
            ValidateResourceId(Id);
#endif
        }
 internal NetworkSecurityGroup(ArmClientOptions clientOptions, TokenCredential credential, Uri uri, HttpPipeline pipeline, ResourceIdentifier id) : base(clientOptions, credential, uri, pipeline, id)
 {
     _clientDiagnostics = new ClientDiagnostics(ClientOptions);
     _networkSecurityGroupsRestClient = new NetworkSecurityGroupsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
 internal NetworkSecurityGroup(ArmResource options, ResourceIdentifier id) : base(options, id)
 {
     _clientDiagnostics = new ClientDiagnostics(ClientOptions);
     _networkSecurityGroupsRestClient = new NetworkSecurityGroupsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
 internal NetworkSecurityGroupsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null)
 {
     RestClient         = new NetworkSecurityGroupsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint);
     _clientDiagnostics = clientDiagnostics;
     _pipeline          = pipeline;
 }
 internal NetworkSecurityGroup(ArmResource options, ResourceIdentifier id) : base(options, id)
 {
     _clientDiagnostics = new ClientDiagnostics(ClientOptions);
     _restClient        = new NetworkSecurityGroupsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, Id.SubscriptionId, BaseUri);
     _defaultSecurityRulesRestClient = new DefaultSecurityRulesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, Id.SubscriptionId, BaseUri);
 }
 internal NetworkSecurityGroupCollection(ArmResource parent) : base(parent)
 {
     _clientDiagnostics = new ClientDiagnostics(ClientOptions);
     _networkSecurityGroupsRestClient = new NetworkSecurityGroupsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
 internal NetworkSecurityGroupContainer(ArmResource parent) : base(parent)
 {
     _clientDiagnostics = new ClientDiagnostics(ClientOptions);
     _restClient        = new NetworkSecurityGroupsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, Id.SubscriptionId, BaseUri);
 }