-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial AccessControlClient for Azure.Security.KeyVault.Administration (
#12480) * poc of generated client * cleanup * implement the rest * export api * tests * recorded tests * regen client * fix version * xml comments * pr comments * pr comments * diagnostic scopes * model factory * adjust diagnostic scopes * change assignment name to Guid * make RoleAssignmentListResult internal * rename file * pr comments * remove commented shared import * add xml docs for ArgumentNullExceptions
- Loading branch information
1 parent
cf89dc1
commit bcdf665
Showing
52 changed files
with
5,374 additions
and
2 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Release History | ||
|
||
## 4.1.0-preview.1 (Unreleased) | ||
|
||
### Added | ||
|
||
- Add `KeyVaultAccessControlClient`. |
97 changes: 97 additions & 0 deletions
97
...rity.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
namespace Azure.Security.KeyVault.Administration | ||
{ | ||
public partial class KeyVaultAccessControlClient | ||
{ | ||
protected KeyVaultAccessControlClient() { } | ||
public KeyVaultAccessControlClient(System.Uri vaultUri, Azure.Core.TokenCredential credential) { } | ||
public KeyVaultAccessControlClient(System.Uri vaultUri, Azure.Core.TokenCredential credential, Azure.Security.KeyVault.Administration.KeyVaultAccessControlClientOptions options) { } | ||
public virtual System.Uri VaultUri { get { throw null; } } | ||
public virtual Azure.Response<Azure.Security.KeyVault.Administration.Models.RoleAssignment> CreateRoleAssignment(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, Azure.Security.KeyVault.Administration.Models.RoleAssignmentProperties properties, System.Guid name = default(System.Guid), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Security.KeyVault.Administration.Models.RoleAssignment>> CreateRoleAssignmentAsync(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, Azure.Security.KeyVault.Administration.Models.RoleAssignmentProperties properties, System.Guid name = default(System.Guid), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
public virtual Azure.Response<Azure.Security.KeyVault.Administration.Models.RoleAssignment> DeleteRoleAssignment(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Security.KeyVault.Administration.Models.RoleAssignment>> DeleteRoleAssignmentAsync(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
public virtual Azure.Response<Azure.Security.KeyVault.Administration.Models.RoleAssignment> GetRoleAssignment(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Security.KeyVault.Administration.Models.RoleAssignment>> GetRoleAssignmentAsync(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
public virtual Azure.Pageable<Azure.Security.KeyVault.Administration.Models.RoleAssignment> GetRoleAssignments(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
public virtual Azure.AsyncPageable<Azure.Security.KeyVault.Administration.Models.RoleAssignment> GetRoleAssignmentsAsync(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
public virtual Azure.Pageable<Azure.Security.KeyVault.Administration.Models.RoleDefinition> GetRoleDefinitions(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
public virtual Azure.AsyncPageable<Azure.Security.KeyVault.Administration.Models.RoleDefinition> GetRoleDefinitionsAsync(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
} | ||
public partial class KeyVaultAccessControlClientOptions : Azure.Core.ClientOptions | ||
{ | ||
public KeyVaultAccessControlClientOptions(Azure.Security.KeyVault.Administration.KeyVaultAccessControlClientOptions.ServiceVersion version = Azure.Security.KeyVault.Administration.KeyVaultAccessControlClientOptions.ServiceVersion.V7_2_Preview) { } | ||
public Azure.Security.KeyVault.Administration.KeyVaultAccessControlClientOptions.ServiceVersion Version { get { throw null; } } | ||
public enum ServiceVersion | ||
{ | ||
V7_2_Preview = 1, | ||
} | ||
} | ||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] | ||
public readonly partial struct RoleAssignmentScope : System.IEquatable<Azure.Security.KeyVault.Administration.RoleAssignmentScope> | ||
{ | ||
private readonly object _dummy; | ||
private readonly int _dummyPrimitive; | ||
public RoleAssignmentScope(string value) { throw null; } | ||
public RoleAssignmentScope(System.Uri ResourceId) { throw null; } | ||
public static Azure.Security.KeyVault.Administration.RoleAssignmentScope Global { get { throw null; } } | ||
public static Azure.Security.KeyVault.Administration.RoleAssignmentScope Keys { get { throw null; } } | ||
public bool Equals(Azure.Security.KeyVault.Administration.RoleAssignmentScope other) { throw null; } | ||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] | ||
public override bool Equals(object obj) { throw null; } | ||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] | ||
public override int GetHashCode() { throw null; } | ||
public static bool operator ==(Azure.Security.KeyVault.Administration.RoleAssignmentScope left, Azure.Security.KeyVault.Administration.RoleAssignmentScope right) { throw null; } | ||
public static implicit operator Azure.Security.KeyVault.Administration.RoleAssignmentScope (string value) { throw null; } | ||
public static bool operator !=(Azure.Security.KeyVault.Administration.RoleAssignmentScope left, Azure.Security.KeyVault.Administration.RoleAssignmentScope right) { throw null; } | ||
public override string ToString() { throw null; } | ||
} | ||
} | ||
namespace Azure.Security.KeyVault.Administration.Models | ||
{ | ||
public static partial class KeyVaultModelFactory | ||
{ | ||
public static Azure.Security.KeyVault.Administration.Models.RoleAssignment RoleAssignment(string id, string name, string type, Azure.Security.KeyVault.Administration.Models.RoleAssignmentPropertiesWithScope properties) { throw null; } | ||
public static Azure.Security.KeyVault.Administration.Models.RoleDefinition RoleDefinition(string id, string name, string type, string roleName, string description, string roleType, System.Collections.Generic.IReadOnlyList<Azure.Security.KeyVault.Administration.Models.KeyVaultPermission> permissions, System.Collections.Generic.IReadOnlyList<string> assignableScopes) { throw null; } | ||
} | ||
public partial class KeyVaultPermission | ||
{ | ||
internal KeyVaultPermission() { } | ||
public System.Collections.Generic.IReadOnlyList<string> Actions { get { throw null; } } | ||
public System.Collections.Generic.IReadOnlyList<string> DataActions { get { throw null; } } | ||
public System.Collections.Generic.IReadOnlyList<string> NotActions { get { throw null; } } | ||
public System.Collections.Generic.IReadOnlyList<string> NotDataActions { get { throw null; } } | ||
} | ||
public partial class RoleAssignment | ||
{ | ||
internal RoleAssignment() { } | ||
public string Id { get { throw null; } } | ||
public string Name { get { throw null; } } | ||
public Azure.Security.KeyVault.Administration.Models.RoleAssignmentPropertiesWithScope Properties { get { throw null; } } | ||
public string Type { get { throw null; } } | ||
} | ||
public partial class RoleAssignmentProperties | ||
{ | ||
public RoleAssignmentProperties(string roleDefinitionId, string principalId) { } | ||
public string PrincipalId { get { throw null; } } | ||
public string RoleDefinitionId { get { throw null; } } | ||
} | ||
public partial class RoleAssignmentPropertiesWithScope | ||
{ | ||
internal RoleAssignmentPropertiesWithScope() { } | ||
public string PrincipalId { get { throw null; } } | ||
public string RoleDefinitionId { get { throw null; } } | ||
public string Scope { get { throw null; } } | ||
} | ||
public partial class RoleDefinition | ||
{ | ||
internal RoleDefinition() { } | ||
public System.Collections.Generic.IReadOnlyList<string> AssignableScopes { get { throw null; } } | ||
public string Description { get { throw null; } } | ||
public string Id { get { throw null; } } | ||
public string Name { get { throw null; } } | ||
public System.Collections.Generic.IReadOnlyList<Azure.Security.KeyVault.Administration.Models.KeyVaultPermission> Permissions { get { throw null; } } | ||
public string RoleName { get { throw null; } } | ||
public string RoleType { get { throw null; } } | ||
public string Type { get { throw null; } } | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Azure KeyVault Administration client library for .NET | ||
|
||
Content forthcoming | ||
|
||
## Getting started | ||
|
||
Content forthcoming | ||
|
||
### Prerequisites | ||
|
||
Content forthcoming | ||
|
||
### Install the package | ||
|
||
Content forthcoming | ||
|
||
### Authenticate the client | ||
|
||
Content forthcoming | ||
|
||
## Key concepts | ||
|
||
Content forthcoming | ||
|
||
## Examples | ||
|
||
Content forthcoming | ||
|
||
## Troubleshooting | ||
|
||
Content forthcoming | ||
|
||
## Next steps | ||
|
||
Content forthcoming | ||
|
||
## Contributing | ||
|
||
This project welcomes contributions and suggestions. Most contributions require | ||
you to agree to a Contributor License Agreement (CLA) declaring that you have | ||
the right to, and actually do, grant us the rights to use your contribution. For | ||
details, visit [cla.microsoft.com][cla]. | ||
|
||
This project has adopted the [Microsoft Open Source Code of Conduct][coc]. | ||
For more information see the [Code of Conduct FAQ][coc_faq] | ||
or contact [opencode@microsoft.com][coc_contact] with any | ||
additional questions or comments. | ||
|
||
<!-- LINKS --> | ||
|
||
 |
45 changes: 45 additions & 0 deletions
45
.../Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<Description>This is the Microsoft Azure Key Vault Administration client library</Description> | ||
<AssemblyTitle>Microsoft Azure.Security.KeyVault.Administration client library</AssemblyTitle> | ||
<Version>4.1.0-preview.1</Version> | ||
<PackageTags>Microsoft Azure Key Vault Administration;$(PackageCommonTags)</PackageTags> | ||
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks> | ||
<EnableApiCompat>false</EnableApiCompat> | ||
<NoWarn>$(NoWarn);3021;CA1812</NoWarn> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="System.Text.Json" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<!-- Include just the few items we need from Azure.Security.KeyVault.Shared --> | ||
<Compile Include="$(MSBuildThisFileDirectory)\..\..\Azure.Security.KeyVault.Shared\src\ChallengeBasedAuthenticationPolicy.cs" /> | ||
<Compile Include="$(MSBuildThisFileDirectory)\..\..\Azure.Security.KeyVault.Shared\src\ClientOptionsExtensions.cs" /> | ||
<Compile Include="$(MSBuildThisFileDirectory)\..\..\Azure.Security.KeyVault.Shared\src\IJsonSerializable.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="$(AzureCoreSharedSources)NoBodyResponse{T}.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
<Compile Include="$(AzureCoreSharedSources)ForwardsClientCallsAttribute.cs" Link="Shared\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="$(AzureCoreSharedSources)Argument.cs" Link="Shared\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
<Compile Include="$(AzureCoreSharedSources)ArrayBufferWriter.cs" Link="Shared\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
<Compile Include="$(AzureCoreSharedSources)AzureKeyCredentialPolicy.cs" Link="Shared\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
<Compile Include="$(AzureCoreSharedSources)AzureResourceProviderNamespaceAttribute.cs" Link="Shared\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
<Compile Include="$(AzureCoreSharedSources)ClientDiagnostics.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
<Compile Include="$(AzureCoreSharedSources)ContentTypeUtilities.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
<Compile Include="$(AzureCoreSharedSources)DiagnosticScope.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
<Compile Include="$(AzureCoreSharedSources)DiagnosticScopeFactory.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
<Compile Include="$(AzureCoreSharedSources)HashCodeBuilder.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
<Compile Include="$(AzureCoreSharedSources)HttpMessageSanitizer.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
<Compile Include="$(AzureCoreSharedSources)OperationHelpers.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
<Compile Include="$(AzureCoreSharedSources)TaskExtensions.cs" Link="Shared\Core\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
</ItemGroup> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)..\..\..\core\Azure.Core\src\Azure.Core.props" /> | ||
</Project> |
53 changes: 53 additions & 0 deletions
53
...yvault/Azure.Security.KeyVault.Administration/src/Generated/Models/Error.Serialization.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/Error.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
...zure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultError.Serialization.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultError.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.