/// <summary>
 /// Lists existing AzureFrontDoor secrets.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Secret> > ListByProfileNextAsync(this ISecretsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByProfileNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// List secrets in a given user profile.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='userName'>
 /// The name of the user profile.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Secret> > ListAsync(this ISecretsOperations operations, string resourceGroupName, string labName, string userName, ODataQuery <Secret> odataQuery = default(ODataQuery <Secret>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, labName, userName, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists existing AzureFrontDoor secrets.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='profileName'>
 /// Name of the CDN profile which is unique within the resource group.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Secret> > ListByProfileAsync(this ISecretsOperations operations, string resourceGroupName, string profileName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByProfileWithHttpMessagesAsync(resourceGroupName, profileName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Updates an existing Secret within a profile.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='profileName'>
 /// Name of the CDN profile which is unique within the resource group.
 /// </param>
 /// <param name='secretName'>
 /// Name of the Secret under the profile.
 /// </param>
 /// <param name='parameters'>
 /// object which contains secret parameters
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Secret> BeginUpdateAsync(this ISecretsOperations operations, string resourceGroupName, string profileName, string secretName, SecretParameters parameters = default(SecretParameters), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, profileName, secretName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Get secret.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='userName'>
 /// The name of the user profile.
 /// </param>
 /// <param name='name'>
 /// The name of the secret.
 /// </param>
 /// <param name='expand'>
 /// Specify the $expand query. Example: 'properties($select=value)'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Secret> GetAsync(this ISecretsOperations operations, string resourceGroupName, string labName, string userName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, userName, name, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Create or replace an existing secret. This operation can take a while to
 /// complete.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='userName'>
 /// The name of the user profile.
 /// </param>
 /// <param name='name'>
 /// The name of the secret.
 /// </param>
 /// <param name='secret'>
 /// A secret.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Secret> BeginCreateOrUpdateAsync(this ISecretsOperations operations, string resourceGroupName, string labName, string userName, string name, Secret secret, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, labName, userName, name, secret, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#7
0
 public TestHooks(ILogTracer log, IConfigOperations configOps, IEvents events, IServiceConfig config, ISecretsOperations secretOps, ILogAnalytics logAnalytics)
 {
     _log          = log;
     _configOps    = configOps;
     _events       = events;
     _config       = config;
     _secretOps    = secretOps;
     _logAnalytics = logAnalytics;
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Keys   = new KeysOperations(this);
     Vaults = new VaultsOperations(this);
     PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this);
     PrivateLinkResources       = new PrivateLinkResourcesOperations(this);
     ManagedHsms = new ManagedHsmsOperations(this);
     MHSMPrivateEndpointConnections = new MHSMPrivateEndpointConnectionsOperations(this);
     MHSMPrivateLinkResources       = new MHSMPrivateLinkResourcesOperations(this);
     Operations     = new Operations(this);
     Secrets        = new SecretsOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2021-06-01-preview";
     AcceptLanguage = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
 /// <summary>
 /// Deletes an existing Secret within profile.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='profileName'>
 /// Name of the CDN profile which is unique within the resource group.
 /// </param>
 /// <param name='secretName'>
 /// Name of the Secret under the profile.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this ISecretsOperations operations, string resourceGroupName, string profileName, string secretName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, profileName, secretName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Deletes an existing Secret within profile.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='profileName'>
 /// Name of the CDN profile which is unique within the resource group.
 /// </param>
 /// <param name='secretName'>
 /// Name of the Secret under the profile.
 /// </param>
 public static void BeginDelete(this ISecretsOperations operations, string resourceGroupName, string profileName, string secretName)
 {
     operations.BeginDeleteAsync(resourceGroupName, profileName, secretName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Lists existing AzureFrontDoor secrets.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='profileName'>
 /// Name of the CDN profile which is unique within the resource group.
 /// </param>
 public static IPage <Secret> ListByProfile(this ISecretsOperations operations, string resourceGroupName, string profileName)
 {
     return(operations.ListByProfileAsync(resourceGroupName, profileName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Updates an existing Secret within a profile.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='profileName'>
 /// Name of the CDN profile which is unique within the resource group.
 /// </param>
 /// <param name='secretName'>
 /// Name of the Secret under the profile.
 /// </param>
 /// <param name='parameters'>
 /// object which contains secret parameters
 /// </param>
 public static Secret BeginUpdate(this ISecretsOperations operations, string resourceGroupName, string profileName, string secretName, SecretParameters parameters = default(SecretParameters))
 {
     return(operations.BeginUpdateAsync(resourceGroupName, profileName, secretName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get secret.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='userName'>
 /// The name of the user profile.
 /// </param>
 /// <param name='name'>
 /// The name of the secret.
 /// </param>
 /// <param name='expand'>
 /// Specify the $expand query. Example: 'properties($select=value)'
 /// </param>
 public static Secret Get(this ISecretsOperations operations, string resourceGroupName, string labName, string userName, string name, string expand = default(string))
 {
     return(operations.GetAsync(resourceGroupName, labName, userName, name, expand).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Create or replace an existing secret. This operation can take a while to
 /// complete.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='userName'>
 /// The name of the user profile.
 /// </param>
 /// <param name='name'>
 /// The name of the secret.
 /// </param>
 /// <param name='secret'>
 /// A secret.
 /// </param>
 public static Secret BeginCreateOrUpdate(this ISecretsOperations operations, string resourceGroupName, string labName, string userName, string name, Secret secret)
 {
     return(operations.BeginCreateOrUpdateAsync(resourceGroupName, labName, userName, name, secret).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete secret.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='userName'>
 /// The name of the user profile.
 /// </param>
 /// <param name='name'>
 /// The name of the secret.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this ISecretsOperations operations, string resourceGroupName, string labName, string userName, string name, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, labName, userName, name, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Delete secret.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='userName'>
 /// The name of the user profile.
 /// </param>
 /// <param name='name'>
 /// The name of the secret.
 /// </param>
 public static void Delete(this ISecretsOperations operations, string resourceGroupName, string labName, string userName, string name)
 {
     operations.DeleteAsync(resourceGroupName, labName, userName, name).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Lists existing AzureFrontDoor secrets.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <Secret> ListByProfileNext(this ISecretsOperations operations, string nextPageLink)
 {
     return(operations.ListByProfileNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List secrets in a given user profile.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='userName'>
 /// The name of the user profile.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <Secret> List(this ISecretsOperations operations, string resourceGroupName, string labName, string userName, ODataQuery <Secret> odataQuery = default(ODataQuery <Secret>))
 {
     return(operations.ListAsync(resourceGroupName, labName, userName, odataQuery).GetAwaiter().GetResult());
 }
示例#19
0
 /// <summary>
 /// Update a secret in the specified subscription.  NOTE: This API is intended
 /// for internal use in ARM deployments.  Users should use the data-plane REST
 /// service for interaction with vault secrets.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the Resource Group to which the vault belongs.
 /// </param>
 /// <param name='vaultName'>
 /// Name of the vault
 /// </param>
 /// <param name='secretName'>
 /// Name of the secret
 /// </param>
 /// <param name='parameters'>
 /// Parameters to patch the secret
 /// </param>
 public static Secret Update(this ISecretsOperations operations, string resourceGroupName, string vaultName, string secretName, SecretPatchParameters parameters)
 {
     return(operations.UpdateAsync(resourceGroupName, vaultName, secretName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets an existing Secret within a profile.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='profileName'>
 /// Name of the CDN profile which is unique within the resource group.
 /// </param>
 /// <param name='secretName'>
 /// Name of the Secret under the profile.
 /// </param>
 public static Secret Get(this ISecretsOperations operations, string resourceGroupName, string profileName, string secretName)
 {
     return(operations.GetAsync(resourceGroupName, profileName, secretName).GetAwaiter().GetResult());
 }
示例#21
0
 /// <summary>
 /// The List operation gets information about the secrets in a vault.  NOTE:
 /// This API is intended for internal use in ARM deployments. Users should use
 /// the data-plane REST service for interaction with vault secrets.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the Resource Group to which the vault belongs.
 /// </param>
 /// <param name='vaultName'>
 /// The name of the vault.
 /// </param>
 /// <param name='top'>
 /// Maximum number of results to return.
 /// </param>
 public static IPage <Secret> List(this ISecretsOperations operations, string resourceGroupName, string vaultName, int?top = default(int?))
 {
     return(operations.ListAsync(resourceGroupName, vaultName, top).GetAwaiter().GetResult());
 }