Ejemplo n.º 1
0
        /// <summary>
        /// Filters the list of public IP addresses for this resource group represented as generic resources.
        /// </summary>
        /// <param name="filter"> The substring to filter by. </param>
        /// <param name="top"> The number of items to truncate by. </param>
        /// <param name="cancellationToken"> A token to allow the caller to cancel the call to the service. The default value is <see cref="P:System.Threading.CancellationToken.None" />. </param>
        /// <returns> A collection of <see cref="GenericResource"/> that may take multiple service requests to iterate over. </returns>
        public Pageable <GenericResource> ListByName(string filter, int?top = null, CancellationToken cancellationToken = default)
        {
            ResourceFilterCollection filters = new ResourceFilterCollection(PublicIPAddressData.ResourceType);

            filters.SubstringFilter = filter;
            return(ResourceListOperations.ListAtContext(Parent as ResourceGroupOperations, filters, top, cancellationToken));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Filters the list of VMs for a SubscriptionOperations represented as generic resources.
        /// </summary>
        /// <param name="subscription"> The <see cref="SubscriptionOperations" /> instance the method will execute against. </param>
        /// <param name="filter"> The string to filter the list. </param>
        /// <param name="top"> The number of results to return. </param>
        /// <param name="cancellationToken"> A token to allow the caller to cancel the call to the service. The default value is <see cref="P:System.Threading.CancellationToken.None" />. </param>
        /// <returns> A collection of resource operations that may take multiple service requests to iterate over. </returns>
        public static Pageable <GenericResource> ListVirtualMachinesByName(this SubscriptionOperations subscription, string filter, int?top = null, CancellationToken cancellationToken = default)
        {
            ResourceFilterCollection filters = new ResourceFilterCollection(VirtualMachineOperations.ResourceType);

            filters.SubstringFilter = filter;
            return(ResourceListOperations.ListAtContext(subscription, filters, top, cancellationToken));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Filters the list of virtual machines for this resource group represented as generic resources.
        /// </summary>
        /// <param name="filter"> The substring to filter by. </param>
        /// <param name="top"> The number of items to truncate by. </param>
        /// <param name="cancellationToken"> A token to allow the caller to cancel the call to the service. The default value is <see cref="P:System.Threading.CancellationToken.None" />. </param>
        /// <returns> A collection of <see cref="ArmResource"/> that may take multiple service requests to iterate over. </returns>
        public Pageable <ArmResource> ListByName(ArmSubstringFilter filter, int?top = null, CancellationToken cancellationToken = default)
        {
            ArmFilterCollection filters = new ArmFilterCollection(VirtualMachineOperations.ResourceType);

            filters.SubstringFilter = filter;
            return(ResourceListOperations.ListAtContext(ClientOptions, Id, filters, top, cancellationToken));
        }