/// <summary>
 /// Get the Container App SourceControls in a given resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='containerAppName'>
 /// Name of the Container App.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <SourceControl> > ListByContainerAppAsync(this IContainerAppsSourceControlsOperations operations, string resourceGroupName, string containerAppName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByContainerAppWithHttpMessagesAsync(resourceGroupName, containerAppName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Create or update the SourceControl for a Container App.
 /// </summary>
 /// <remarks>
 /// Description for Create or update the SourceControl for a Container App.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='containerAppName'>
 /// Name of the Container App.
 /// </param>
 /// <param name='name'>
 /// Name of the Container App SourceControl.
 /// </param>
 /// <param name='sourceControlEnvelope'>
 /// Properties used to create a Container App SourceControl
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SourceControl> BeginCreateOrUpdateAsync(this IContainerAppsSourceControlsOperations operations, string resourceGroupName, string containerAppName, string name, SourceControl sourceControlEnvelope, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, containerAppName, name, sourceControlEnvelope, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #3
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     ContainerAppsAuthConfigs      = new ContainerAppsAuthConfigsOperations(this);
     ContainerApps                 = new ContainerAppsOperations(this);
     ContainerAppsRevisions        = new ContainerAppsRevisionsOperations(this);
     ContainerAppsRevisionReplicas = new ContainerAppsRevisionReplicasOperations(this);
     DaprComponents                = new DaprComponentsOperations(this);
     Operations                  = new Operations(this);
     ManagedEnvironments         = new ManagedEnvironmentsOperations(this);
     Certificates                = new CertificatesOperations(this);
     Namespaces                  = new NamespacesOperations(this);
     ManagedEnvironmentsStorages = new ManagedEnvironmentsStoragesOperations(this);
     ContainerAppsSourceControls = new ContainerAppsSourceControlsOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2022-03-01";
     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>
 /// Get a SourceControl of a Container App.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='containerAppName'>
 /// Name of the Container App.
 /// </param>
 /// <param name='name'>
 /// Name of the Container App SourceControl.
 /// </param>
 public static SourceControl Get(this IContainerAppsSourceControlsOperations operations, string resourceGroupName, string containerAppName, string name)
 {
     return(operations.GetAsync(resourceGroupName, containerAppName, name).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get the Container App SourceControls in a given resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='containerAppName'>
 /// Name of the Container App.
 /// </param>
 public static IPage <SourceControl> ListByContainerApp(this IContainerAppsSourceControlsOperations operations, string resourceGroupName, string containerAppName)
 {
     return(operations.ListByContainerAppAsync(resourceGroupName, containerAppName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get the Container App SourceControls in a given resource group.
 /// </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 <SourceControl> ListByContainerAppNext(this IContainerAppsSourceControlsOperations operations, string nextPageLink)
 {
     return(operations.ListByContainerAppNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete a Container App SourceControl.
 /// </summary>
 /// <remarks>
 /// Description for Delete a Container App SourceControl.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='containerAppName'>
 /// Name of the Container App.
 /// </param>
 /// <param name='name'>
 /// Name of the Container App SourceControl.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IContainerAppsSourceControlsOperations operations, string resourceGroupName, string containerAppName, string name, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, containerAppName, name, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Delete a Container App SourceControl.
 /// </summary>
 /// <remarks>
 /// Description for Delete a Container App SourceControl.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='containerAppName'>
 /// Name of the Container App.
 /// </param>
 /// <param name='name'>
 /// Name of the Container App SourceControl.
 /// </param>
 public static void BeginDelete(this IContainerAppsSourceControlsOperations operations, string resourceGroupName, string containerAppName, string name)
 {
     operations.BeginDeleteAsync(resourceGroupName, containerAppName, name).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Create or update the SourceControl for a Container App.
 /// </summary>
 /// <remarks>
 /// Description for Create or update the SourceControl for a Container App.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='containerAppName'>
 /// Name of the Container App.
 /// </param>
 /// <param name='name'>
 /// Name of the Container App SourceControl.
 /// </param>
 /// <param name='sourceControlEnvelope'>
 /// Properties used to create a Container App SourceControl
 /// </param>
 public static SourceControl BeginCreateOrUpdate(this IContainerAppsSourceControlsOperations operations, string resourceGroupName, string containerAppName, string name, SourceControl sourceControlEnvelope)
 {
     return(operations.BeginCreateOrUpdateAsync(resourceGroupName, containerAppName, name, sourceControlEnvelope).GetAwaiter().GetResult());
 }