public async override Task <ArmResponse <VirtualNetwork> > GetAsync(CancellationToken cancellationToken = default)
 {
     return(new PhArmResponse <VirtualNetwork, Azure.ResourceManager.Network.Models.VirtualNetwork>(await Operations.GetAsync(Id.ResourceGroup, Id.Name, null, cancellationToken),
                                                                                                    n =>
     {
         Resource = new VirtualNetworkData(n);
         return new VirtualNetwork(ClientOptions, Resource as VirtualNetworkData);
     }));
 }
 public override ArmResponse <VirtualNetwork> Get()
 {
     return(new PhArmResponse <VirtualNetwork, Azure.ResourceManager.Network.Models.VirtualNetwork>(Operations.Get(Id.ResourceGroup, Id.Name),
                                                                                                    n =>
     {
         Resource = new VirtualNetworkData(n);
         return new VirtualNetwork(ClientOptions, Resource as VirtualNetworkData);
     }));
 }
        public async Task <ArmOperation <VirtualNetwork> > StartAddTagAsync(string key, string value, CancellationToken cancellationToken = default)
        {
            var patchable = new TagsObject();

            patchable.Tags[key] = value;
            return(new PhArmOperation <VirtualNetwork, Azure.ResourceManager.Network.Models.VirtualNetwork>(await Operations.UpdateTagsAsync(Id.ResourceGroup, Id.Name, patchable, cancellationToken),
                                                                                                            n =>
            {
                Resource = new VirtualNetworkData(n);
                return new VirtualNetwork(ClientOptions, Resource as VirtualNetworkData);
            }));
        }
        public ArmOperation <VirtualNetwork> StartAddTag(string key, string value)
        {
            var patchable = new TagsObject();

            patchable.Tags[key] = value;
            return(new PhArmOperation <VirtualNetwork, Azure.ResourceManager.Network.Models.VirtualNetwork>(Operations.UpdateTags(Id.ResourceGroup, Id.Name, patchable),
                                                                                                            n =>
            {
                Resource = new VirtualNetworkData(n);
                return new VirtualNetwork(ClientOptions, Resource as VirtualNetworkData);
            }));
        }
示例#5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VirtualNetwork"/> class.
 /// </summary>
 /// <param name="options"> The client parameters to use in these operations. </param>
 /// <param name="resource"> The resource that is the target of operations. </param>
 public VirtualNetwork(AzureResourceManagerClientOptions options, VirtualNetworkData resource)
     : base(options, resource.Id)
 {
     Data = resource;
 }
 internal SubnetContainer(AzureResourceManagerClientOptions options, VirtualNetworkData virtualNetwork)
     : base(options, virtualNetwork)
 {
 }
示例#7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VirtualNetwork"/> class.
 /// </summary>
 /// <param name="options"> The client parameters to use in these operations. </param>
 /// <param name="resource"> The resource that is the target of operations. </param>
 internal VirtualNetwork(ResourceOperationsBase options, VirtualNetworkData resource)
     : base(options, resource.Id)
 {
     Data = resource;
 }
 public static VirtualNetwork VirtualNetwork(this ResourceGroup resourceGroup, VirtualNetworkData virtualNetwork)
 {
     return(new VirtualNetwork(resourceGroup.ClientOptions, virtualNetwork));
 }