Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add saved query cmdlets #13422

Merged
merged 15 commits into from
Dec 14, 2020
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions src/Az.autorest.hybrid.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<Project>

<Import Project="$(MSBuildThisFileDirectory)..\Repo.props" />
<Import Project="$(RepoTools)Common.Netcore.Dependencies.targets" />
<Import Project="$(MSBuildThisFileDirectory)Az.Shared.props" />

<!-- Build -->
<PropertyGroup>
<LangVersion>7.1</LangVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Az.$(PsModuleName).private</AssemblyName>
<RootNamespace>$(AzAssemblyPrefix)$(PsModuleName)</RootNamespace>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>$(RepoArtifacts)$(Configuration)\Az.$(PsModuleName)\$(PsModuleName).Autorest\bin</OutputPath>
<PublishDir>$(OutputPath)</PublishDir>
<!-- Some methods are marked async and don't have an await in them -->
<NoWarn>1998</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DelaySign>false</DelaySign>
<DefineConstants>TRACE;DEBUG;NETSTANDARD</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(RepoSrc)MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
<DefineConstants>TRACE;RELEASE;NETSTANDARD;SIGN</DefineConstants>
</PropertyGroup>

<!-- Resources -->
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>true</DesignTime>
<AutoGen>true</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

<!-- Assets -->
<ItemGroup>
<PackageReference Include="PowerShellStandard.Library" Version="5.1.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.4.1" />
</ItemGroup>

<ItemGroup>
<ModuleCustomFiles Include="$(MSBuildThisFileDirectory)$(PsModuleName)\$(PsModuleName).Autorest\custom\**\*.*"/>
<ModuleHelpFiles Include="$(MSBuildThisFileDirectory)$(PsModuleName)\$(PsModuleName).Autorest\help\**\*.*"/>
<ModuleGeneratedFiles Include="$(MSBuildThisFileDirectory)$(PsModuleName)\$(PsModuleName).Autorest\generated\**\*.*"/>
<ModuleTestFiles Include="$(MSBuildThisFileDirectory)$(PsModuleName)\$(PsModuleName).Autorest\test\**\*.*"/>
<UtilsFiles Include="$(MSBuildThisFileDirectory)$(PsModuleName)\$(PsModuleName).Autorest\utils\**\*.*"/>
</ItemGroup>

<Target Name="CopyFiles" AfterTargets="Build">
<Copy SourceFiles="Az.$(PsModuleName).psm1" DestinationFolder="$(RepoArtifacts)$(Configuration)\Az.$(PsModuleName)\$(PsModuleName).Autorest" />
<Copy SourceFiles="Az.$(PsModuleName).format.ps1xml" DestinationFolder="$(RepoArtifacts)$(Configuration)\Az.$(PsModuleName)\$(PsModuleName).Autorest" />
<Copy SourceFiles="check-dependencies.ps1" DestinationFolder="$(RepoArtifacts)$(Configuration)\Az.$(PsModuleName)\$(PsModuleName).Autorest" Condition="'$(Configuration)'=='Debug'"/>
<Copy SourceFiles="test-module.ps1" DestinationFolder="$(RepoArtifacts)$(Configuration)\Az.$(PsModuleName)\$(PsModuleName).Autorest" Condition="'$(Configuration)'=='Debug'"/>
<Copy SourceFiles="@(ModuleCustomFiles)" DestinationFiles="@(ModuleCustomFiles->'$(RepoArtifacts)$(Configuration)\Az.$(PsModuleName)\$(PsModuleName).Autorest\custom\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(ModuleHelpFiles)" DestinationFiles="@(ModuleHelpFiles->'$(RepoArtifacts)$(Configuration)\Az.$(PsModuleName)\$(PsModuleName).Autorest\help\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(ModuleGeneratedFiles)" DestinationFiles="@(ModuleGeneratedFiles->'$(RepoArtifacts)$(Configuration)\Az.$(PsModuleName)\$(PsModuleName).Autorest\generated\%(RecursiveDir)%(Filename)%(Extension)')" Condition="'$(Configuration)'=='Debug'"/>
<Copy SourceFiles="@(ModuleTestFiles)" DestinationFiles="@(ModuleTestFiles->'$(RepoArtifacts)$(Configuration)\Az.$(PsModuleName)\$(PsModuleName).Autorest\test\%(RecursiveDir)%(Filename)%(Extension)')" Condition="'$(Configuration)'=='Debug'"/>
<Copy SourceFiles="exports\ProxyCmdletDefinitions.ps1" DestinationFolder="$(RepoArtifacts)$(Configuration)\Az.$(PsModuleName)\$(PsModuleName).Autorest\exports" />
<Copy SourceFiles="internal\ProxyCmdletDefinitions.ps1" DestinationFolder="$(RepoArtifacts)$(Configuration)\Az.$(PsModuleName)\$(PsModuleName).Autorest\internal" Condition="Exists('internal\ProxyCmdletDefinitions.ps1')" />
<Copy SourceFiles="internal\Az.$(PsModuleName).internal.psm1" DestinationFolder="$(RepoArtifacts)$(Configuration)\Az.$(PsModuleName)\$(PsModuleName).Autorest\internal" />
<Copy SourceFiles="@(UtilsFiles)" DestinationFiles="@(UtilsFiles->'$(RepoArtifacts)$(Configuration)\Az.$(PsModuleName)\$(PsModuleName).Autorest\utils\%(RecursiveDir)%(Filename)%(Extension)')" Condition="Exists('utils')"/>
</Target>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PsModuleName>ResourceGraph</PsModuleName>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)..\..\Az.autorest.hybrid.props" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,303 @@
<?xml version="1.0" encoding="utf-16"?>
<Configuration>
<ViewDefinitions>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.ResourceGraphIdentity</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.ResourceGraphIdentity</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>ResourceGroupName</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>ResourceName</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>SubscriptionId</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>ResourceGroupName</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>ResourceName</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>SubscriptionId</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.ErrorFieldContract</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.ErrorFieldContract</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>Code</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Message</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Target</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Code</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Message</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Target</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.GraphQueryError</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.GraphQueryError</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>Code</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Message</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Code</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Message</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.GraphQueryListResult</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.GraphQueryListResult</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>NextLink</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>NextLink</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.GraphQueryProperties</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.GraphQueryProperties</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>Description</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Query</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>ResultKind</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>TimeModified</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Description</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Query</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>ResultKind</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>TimeModified</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.GraphQueryPropertiesUpdateParameters</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.GraphQueryPropertiesUpdateParameters</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>Description</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Query</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Description</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Query</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.GraphQueryResource</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.GraphQueryResource</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>Location</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Name</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Type</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Location</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Name</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Type</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.GraphQueryUpdateParametersTags</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.GraphQueryUpdateParametersTags</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>Item</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Item</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.Resource</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.Resource</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>Location</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Name</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Type</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Location</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Name</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Type</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.ResourceTags</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.ResourceTags</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>Item</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Item</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
</ViewDefinitions>
</Configuration>
Loading