/// <summary> /// Updates a token with the specified parameters. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to which the container registry belongs. /// </param> /// <param name='registryName'> /// The name of the container registry. /// </param> /// <param name='tokenName'> /// The name of the token. /// </param> /// <param name='tokenUpdateParameters'> /// The parameters for updating a token. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <Token> BeginUpdateAsync(this ITokensOperations operations, string resourceGroupName, string registryName, string tokenName, TokenUpdateParameters tokenUpdateParameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all the tokens for the specified container registry. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to which the container registry belongs. /// </param> /// <param name='registryName'> /// The name of the container registry. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <IPage <Token> > ListAsync(this ITokensOperations operations, string resourceGroupName, string registryName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, registryName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { ExportPipelines = new ExportPipelinesOperations(this); Registries = new RegistriesOperations(this); ImportPipelines = new ImportPipelinesOperations(this); Operations = new Operations(this); PipelineRuns = new PipelineRunsOperations(this); PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this); Replications = new ReplicationsOperations(this); Webhooks = new WebhooksOperations(this); AgentPools = new AgentPoolsOperations(this); Runs = new RunsOperations(this); TaskRuns = new TaskRunsOperations(this); Tasks = new TasksOperations(this); ScopeMaps = new ScopeMapsOperations(this); Tokens = new TokensOperations(this); BaseUri = new System.Uri("https://management.azure.com"); 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() } }; SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <RunRequest>("type")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <RunRequest>("type")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <TaskStepProperties>("type")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <TaskStepProperties>("type")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <TaskStepUpdateParameters>("type")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <TaskStepUpdateParameters>("type")); CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Registries = new RegistriesOperations(this); Operations = new Operations(this); Replications = new ReplicationsOperations(this); Webhooks = new WebhooksOperations(this); ScopeMaps = new ScopeMapsOperations(this); Tokens = new TokensOperations(this); BaseUri = new System.Uri("https://management.azure.com"); 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> /// Gets the properties of the specified token. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to which the container registry belongs. /// </param> /// <param name='registryName'> /// The name of the container registry. /// </param> /// <param name='tokenName'> /// The name of the token. /// </param> public static Token Get(this ITokensOperations operations, string resourceGroupName, string registryName, string tokenName) { return(operations.GetAsync(resourceGroupName, registryName, tokenName).GetAwaiter().GetResult()); }
/// <summary> /// Lists all the tokens for the specified container registry. /// </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 System.Threading.Tasks.Task <IPage <Token> > ListNextAsync(this ITokensOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all the tokens for the specified container registry. /// </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 <Token> ListNext(this ITokensOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Updates a token with the specified parameters. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to which the container registry belongs. /// </param> /// <param name='registryName'> /// The name of the container registry. /// </param> /// <param name='tokenName'> /// The name of the token. /// </param> /// <param name='tokenUpdateParameters'> /// The parameters for updating a token. /// </param> public static Token BeginUpdate(this ITokensOperations operations, string resourceGroupName, string registryName, string tokenName, TokenUpdateParameters tokenUpdateParameters) { return(operations.BeginUpdateAsync(resourceGroupName, registryName, tokenName, tokenUpdateParameters).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a token from a container registry. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to which the container registry belongs. /// </param> /// <param name='registryName'> /// The name of the container registry. /// </param> /// <param name='tokenName'> /// The name of the token. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task BeginDeleteAsync(this ITokensOperations operations, string resourceGroupName, string registryName, string tokenName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, registryName, tokenName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Lists all the tokens for the specified container registry. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to which the container registry belongs. /// </param> /// <param name='registryName'> /// The name of the container registry. /// </param> public static IPage <Token> List(this ITokensOperations operations, string resourceGroupName, string registryName) { return(operations.ListAsync(resourceGroupName, registryName).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a token from a container registry. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to which the container registry belongs. /// </param> /// <param name='registryName'> /// The name of the container registry. /// </param> /// <param name='tokenName'> /// The name of the token. /// </param> public static void BeginDelete(this ITokensOperations operations, string resourceGroupName, string registryName, string tokenName) { operations.BeginDeleteAsync(resourceGroupName, registryName, tokenName).GetAwaiter().GetResult(); }