| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | | using System.Threading; |
| | 10 | | using System.Threading.Tasks; |
| | 11 | | using Azure; |
| | 12 | | using Azure.Core; |
| | 13 | | using Azure.Core.Pipeline; |
| | 14 | | using Azure.ResourceManager.Resources.Models; |
| | 15 | |
|
| | 16 | | namespace Azure.ResourceManager.Resources |
| | 17 | | { |
| | 18 | | /// <summary> The DeploymentScripts service client. </summary> |
| | 19 | | public partial class DeploymentScriptsOperations |
| | 20 | | { |
| | 21 | | private readonly ClientDiagnostics _clientDiagnostics; |
| | 22 | | private readonly HttpPipeline _pipeline; |
| 110 | 23 | | internal DeploymentScriptsRestOperations RestClient { get; } |
| | 24 | | /// <summary> Initializes a new instance of DeploymentScriptsOperations for mocking. </summary> |
| 256 | 25 | | protected DeploymentScriptsOperations() |
| | 26 | | { |
| 256 | 27 | | } |
| | 28 | | /// <summary> Initializes a new instance of DeploymentScriptsOperations. </summary> |
| | 29 | | /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param> |
| | 30 | | /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param> |
| | 31 | | /// <param name="subscriptionId"> The ID of the target subscription. </param> |
| | 32 | | /// <param name="endpoint"> server parameter. </param> |
| 256 | 33 | | internal DeploymentScriptsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscrip |
| | 34 | | { |
| 256 | 35 | | RestClient = new DeploymentScriptsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint); |
| 256 | 36 | | _clientDiagnostics = clientDiagnostics; |
| 256 | 37 | | _pipeline = pipeline; |
| 256 | 38 | | } |
| | 39 | |
|
| | 40 | | /// <summary> Updates deployment script tags with specified values. </summary> |
| | 41 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 42 | | /// <param name="scriptName"> Name of the deployment script. </param> |
| | 43 | | /// <param name="deploymentScript"> Deployment script resource with the tags to be updated. </param> |
| | 44 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 45 | | public virtual async Task<Response<DeploymentScript>> UpdateAsync(string resourceGroupName, string scriptName, D |
| | 46 | | { |
| 0 | 47 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.Update"); |
| 0 | 48 | | scope.Start(); |
| | 49 | | try |
| | 50 | | { |
| 0 | 51 | | return await RestClient.UpdateAsync(resourceGroupName, scriptName, deploymentScript, cancellationToken). |
| | 52 | | } |
| 0 | 53 | | catch (Exception e) |
| | 54 | | { |
| 0 | 55 | | scope.Failed(e); |
| 0 | 56 | | throw; |
| | 57 | | } |
| 0 | 58 | | } |
| | 59 | |
|
| | 60 | | /// <summary> Updates deployment script tags with specified values. </summary> |
| | 61 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 62 | | /// <param name="scriptName"> Name of the deployment script. </param> |
| | 63 | | /// <param name="deploymentScript"> Deployment script resource with the tags to be updated. </param> |
| | 64 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 65 | | public virtual Response<DeploymentScript> Update(string resourceGroupName, string scriptName, DeploymentScriptUp |
| | 66 | | { |
| 0 | 67 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.Update"); |
| 0 | 68 | | scope.Start(); |
| | 69 | | try |
| | 70 | | { |
| 0 | 71 | | return RestClient.Update(resourceGroupName, scriptName, deploymentScript, cancellationToken); |
| | 72 | | } |
| 0 | 73 | | catch (Exception e) |
| | 74 | | { |
| 0 | 75 | | scope.Failed(e); |
| 0 | 76 | | throw; |
| | 77 | | } |
| 0 | 78 | | } |
| | 79 | |
|
| | 80 | | /// <summary> Gets a deployment script with a given name. </summary> |
| | 81 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 82 | | /// <param name="scriptName"> Name of the deployment script. </param> |
| | 83 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 84 | | public virtual async Task<Response<DeploymentScript>> GetAsync(string resourceGroupName, string scriptName, Canc |
| | 85 | | { |
| 24 | 86 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.Get"); |
| 24 | 87 | | scope.Start(); |
| | 88 | | try |
| | 89 | | { |
| 24 | 90 | | return await RestClient.GetAsync(resourceGroupName, scriptName, cancellationToken).ConfigureAwait(false) |
| | 91 | | } |
| 0 | 92 | | catch (Exception e) |
| | 93 | | { |
| 0 | 94 | | scope.Failed(e); |
| 0 | 95 | | throw; |
| | 96 | | } |
| 24 | 97 | | } |
| | 98 | |
|
| | 99 | | /// <summary> Gets a deployment script with a given name. </summary> |
| | 100 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 101 | | /// <param name="scriptName"> Name of the deployment script. </param> |
| | 102 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 103 | | public virtual Response<DeploymentScript> Get(string resourceGroupName, string scriptName, CancellationToken can |
| | 104 | | { |
| 22 | 105 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.Get"); |
| 22 | 106 | | scope.Start(); |
| | 107 | | try |
| | 108 | | { |
| 22 | 109 | | return RestClient.Get(resourceGroupName, scriptName, cancellationToken); |
| | 110 | | } |
| 0 | 111 | | catch (Exception e) |
| | 112 | | { |
| 0 | 113 | | scope.Failed(e); |
| 0 | 114 | | throw; |
| | 115 | | } |
| 22 | 116 | | } |
| | 117 | |
|
| | 118 | | /// <summary> Deletes a deployment script. When operation completes, status code 200 returned without content. < |
| | 119 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 120 | | /// <param name="scriptName"> Name of the deployment script. </param> |
| | 121 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 122 | | public virtual async Task<Response> DeleteAsync(string resourceGroupName, string scriptName, CancellationToken c |
| | 123 | | { |
| 6 | 124 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.Delete"); |
| 6 | 125 | | scope.Start(); |
| | 126 | | try |
| | 127 | | { |
| 6 | 128 | | return await RestClient.DeleteAsync(resourceGroupName, scriptName, cancellationToken).ConfigureAwait(fal |
| | 129 | | } |
| 0 | 130 | | catch (Exception e) |
| | 131 | | { |
| 0 | 132 | | scope.Failed(e); |
| 0 | 133 | | throw; |
| | 134 | | } |
| 6 | 135 | | } |
| | 136 | |
|
| | 137 | | /// <summary> Deletes a deployment script. When operation completes, status code 200 returned without content. < |
| | 138 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 139 | | /// <param name="scriptName"> Name of the deployment script. </param> |
| | 140 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 141 | | public virtual Response Delete(string resourceGroupName, string scriptName, CancellationToken cancellationToken |
| | 142 | | { |
| 6 | 143 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.Delete"); |
| 6 | 144 | | scope.Start(); |
| | 145 | | try |
| | 146 | | { |
| 6 | 147 | | return RestClient.Delete(resourceGroupName, scriptName, cancellationToken); |
| | 148 | | } |
| 0 | 149 | | catch (Exception e) |
| | 150 | | { |
| 0 | 151 | | scope.Failed(e); |
| 0 | 152 | | throw; |
| | 153 | | } |
| 6 | 154 | | } |
| | 155 | |
|
| | 156 | | /// <summary> Gets deployment script logs for a given deployment script name. </summary> |
| | 157 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 158 | | /// <param name="scriptName"> Name of the deployment script. </param> |
| | 159 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 160 | | public virtual async Task<Response<ScriptLogsList>> GetLogsAsync(string resourceGroupName, string scriptName, Ca |
| | 161 | | { |
| 0 | 162 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.GetLogs"); |
| 0 | 163 | | scope.Start(); |
| | 164 | | try |
| | 165 | | { |
| 0 | 166 | | return await RestClient.GetLogsAsync(resourceGroupName, scriptName, cancellationToken).ConfigureAwait(fa |
| | 167 | | } |
| 0 | 168 | | catch (Exception e) |
| | 169 | | { |
| 0 | 170 | | scope.Failed(e); |
| 0 | 171 | | throw; |
| | 172 | | } |
| 0 | 173 | | } |
| | 174 | |
|
| | 175 | | /// <summary> Gets deployment script logs for a given deployment script name. </summary> |
| | 176 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 177 | | /// <param name="scriptName"> Name of the deployment script. </param> |
| | 178 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 179 | | public virtual Response<ScriptLogsList> GetLogs(string resourceGroupName, string scriptName, CancellationToken c |
| | 180 | | { |
| 0 | 181 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.GetLogs"); |
| 0 | 182 | | scope.Start(); |
| | 183 | | try |
| | 184 | | { |
| 0 | 185 | | return RestClient.GetLogs(resourceGroupName, scriptName, cancellationToken); |
| | 186 | | } |
| 0 | 187 | | catch (Exception e) |
| | 188 | | { |
| 0 | 189 | | scope.Failed(e); |
| 0 | 190 | | throw; |
| | 191 | | } |
| 0 | 192 | | } |
| | 193 | |
|
| | 194 | | /// <summary> Gets deployment script logs for a given deployment script name. </summary> |
| | 195 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 196 | | /// <param name="scriptName"> Name of the deployment script. </param> |
| | 197 | | /// <param name="tail"> The number of lines to show from the tail of the deployment script log. Valid value is a |
| | 198 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 199 | | public virtual async Task<Response<ScriptLog>> GetLogsDefaultAsync(string resourceGroupName, string scriptName, |
| | 200 | | { |
| 2 | 201 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.GetLogsDefault"); |
| 2 | 202 | | scope.Start(); |
| | 203 | | try |
| | 204 | | { |
| 2 | 205 | | return await RestClient.GetLogsDefaultAsync(resourceGroupName, scriptName, tail, cancellationToken).Conf |
| | 206 | | } |
| 0 | 207 | | catch (Exception e) |
| | 208 | | { |
| 0 | 209 | | scope.Failed(e); |
| 0 | 210 | | throw; |
| | 211 | | } |
| 2 | 212 | | } |
| | 213 | |
|
| | 214 | | /// <summary> Gets deployment script logs for a given deployment script name. </summary> |
| | 215 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 216 | | /// <param name="scriptName"> Name of the deployment script. </param> |
| | 217 | | /// <param name="tail"> The number of lines to show from the tail of the deployment script log. Valid value is a |
| | 218 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 219 | | public virtual Response<ScriptLog> GetLogsDefault(string resourceGroupName, string scriptName, int? tail = null, |
| | 220 | | { |
| 2 | 221 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.GetLogsDefault"); |
| 2 | 222 | | scope.Start(); |
| | 223 | | try |
| | 224 | | { |
| 2 | 225 | | return RestClient.GetLogsDefault(resourceGroupName, scriptName, tail, cancellationToken); |
| | 226 | | } |
| 0 | 227 | | catch (Exception e) |
| | 228 | | { |
| 0 | 229 | | scope.Failed(e); |
| 0 | 230 | | throw; |
| | 231 | | } |
| 2 | 232 | | } |
| | 233 | |
|
| | 234 | | /// <summary> Lists all deployment scripts for a given subscription. </summary> |
| | 235 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 236 | | public virtual AsyncPageable<DeploymentScript> ListBySubscriptionAsync(CancellationToken cancellationToken = def |
| | 237 | | { |
| | 238 | | async Task<Page<DeploymentScript>> FirstPageFunc(int? pageSizeHint) |
| | 239 | | { |
| 4 | 240 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.ListBySubscription"); |
| 4 | 241 | | scope.Start(); |
| | 242 | | try |
| | 243 | | { |
| 4 | 244 | | var response = await RestClient.ListBySubscriptionAsync(cancellationToken).ConfigureAwait(false); |
| 4 | 245 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 246 | | } |
| 0 | 247 | | catch (Exception e) |
| | 248 | | { |
| 0 | 249 | | scope.Failed(e); |
| 0 | 250 | | throw; |
| | 251 | | } |
| 4 | 252 | | } |
| | 253 | | async Task<Page<DeploymentScript>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 254 | | { |
| 0 | 255 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.ListBySubscription"); |
| 0 | 256 | | scope.Start(); |
| | 257 | | try |
| | 258 | | { |
| 0 | 259 | | var response = await RestClient.ListBySubscriptionNextPageAsync(nextLink, cancellationToken).Configu |
| 0 | 260 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 261 | | } |
| 0 | 262 | | catch (Exception e) |
| | 263 | | { |
| 0 | 264 | | scope.Failed(e); |
| 0 | 265 | | throw; |
| | 266 | | } |
| 0 | 267 | | } |
| 4 | 268 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 269 | | } |
| | 270 | |
|
| | 271 | | /// <summary> Lists all deployment scripts for a given subscription. </summary> |
| | 272 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 273 | | public virtual Pageable<DeploymentScript> ListBySubscription(CancellationToken cancellationToken = default) |
| | 274 | | { |
| | 275 | | Page<DeploymentScript> FirstPageFunc(int? pageSizeHint) |
| | 276 | | { |
| 4 | 277 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.ListBySubscription"); |
| 4 | 278 | | scope.Start(); |
| | 279 | | try |
| | 280 | | { |
| 4 | 281 | | var response = RestClient.ListBySubscription(cancellationToken); |
| 4 | 282 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 283 | | } |
| 0 | 284 | | catch (Exception e) |
| | 285 | | { |
| 0 | 286 | | scope.Failed(e); |
| 0 | 287 | | throw; |
| | 288 | | } |
| 4 | 289 | | } |
| | 290 | | Page<DeploymentScript> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 291 | | { |
| 0 | 292 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.ListBySubscription"); |
| 0 | 293 | | scope.Start(); |
| | 294 | | try |
| | 295 | | { |
| 0 | 296 | | var response = RestClient.ListBySubscriptionNextPage(nextLink, cancellationToken); |
| 0 | 297 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 298 | | } |
| 0 | 299 | | catch (Exception e) |
| | 300 | | { |
| 0 | 301 | | scope.Failed(e); |
| 0 | 302 | | throw; |
| | 303 | | } |
| 0 | 304 | | } |
| 4 | 305 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 306 | | } |
| | 307 | |
|
| | 308 | | /// <summary> Lists deployments scripts. </summary> |
| | 309 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 310 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 311 | | public virtual AsyncPageable<DeploymentScript> ListByResourceGroupAsync(string resourceGroupName, CancellationTo |
| | 312 | | { |
| 8 | 313 | | if (resourceGroupName == null) |
| | 314 | | { |
| 0 | 315 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 316 | | } |
| | 317 | |
|
| | 318 | | async Task<Page<DeploymentScript>> FirstPageFunc(int? pageSizeHint) |
| | 319 | | { |
| 8 | 320 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.ListByResourceGroup"); |
| 8 | 321 | | scope.Start(); |
| | 322 | | try |
| | 323 | | { |
| 8 | 324 | | var response = await RestClient.ListByResourceGroupAsync(resourceGroupName, cancellationToken).Confi |
| 8 | 325 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 326 | | } |
| 0 | 327 | | catch (Exception e) |
| | 328 | | { |
| 0 | 329 | | scope.Failed(e); |
| 0 | 330 | | throw; |
| | 331 | | } |
| 8 | 332 | | } |
| | 333 | | async Task<Page<DeploymentScript>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 334 | | { |
| 0 | 335 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.ListByResourceGroup"); |
| 0 | 336 | | scope.Start(); |
| | 337 | | try |
| | 338 | | { |
| 0 | 339 | | var response = await RestClient.ListByResourceGroupNextPageAsync(nextLink, resourceGroupName, cancel |
| 0 | 340 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 341 | | } |
| 0 | 342 | | catch (Exception e) |
| | 343 | | { |
| 0 | 344 | | scope.Failed(e); |
| 0 | 345 | | throw; |
| | 346 | | } |
| 0 | 347 | | } |
| 8 | 348 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 349 | | } |
| | 350 | |
|
| | 351 | | /// <summary> Lists deployments scripts. </summary> |
| | 352 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 353 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 354 | | public virtual Pageable<DeploymentScript> ListByResourceGroup(string resourceGroupName, CancellationToken cancel |
| | 355 | | { |
| 8 | 356 | | if (resourceGroupName == null) |
| | 357 | | { |
| 0 | 358 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 359 | | } |
| | 360 | |
|
| | 361 | | Page<DeploymentScript> FirstPageFunc(int? pageSizeHint) |
| | 362 | | { |
| 8 | 363 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.ListByResourceGroup"); |
| 8 | 364 | | scope.Start(); |
| | 365 | | try |
| | 366 | | { |
| 8 | 367 | | var response = RestClient.ListByResourceGroup(resourceGroupName, cancellationToken); |
| 8 | 368 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 369 | | } |
| 0 | 370 | | catch (Exception e) |
| | 371 | | { |
| 0 | 372 | | scope.Failed(e); |
| 0 | 373 | | throw; |
| | 374 | | } |
| 8 | 375 | | } |
| | 376 | | Page<DeploymentScript> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 377 | | { |
| 0 | 378 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.ListByResourceGroup"); |
| 0 | 379 | | scope.Start(); |
| | 380 | | try |
| | 381 | | { |
| 0 | 382 | | var response = RestClient.ListByResourceGroupNextPage(nextLink, resourceGroupName, cancellationToken |
| 0 | 383 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 384 | | } |
| 0 | 385 | | catch (Exception e) |
| | 386 | | { |
| 0 | 387 | | scope.Failed(e); |
| 0 | 388 | | throw; |
| | 389 | | } |
| 0 | 390 | | } |
| 8 | 391 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 392 | | } |
| | 393 | |
|
| | 394 | | /// <summary> Creates a deployment script. </summary> |
| | 395 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 396 | | /// <param name="scriptName"> Name of the deployment script. </param> |
| | 397 | | /// <param name="deploymentScript"> Deployment script supplied to the operation. </param> |
| | 398 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 399 | | public virtual async Task<DeploymentScriptsCreateOperation> StartCreateAsync(string resourceGroupName, string sc |
| | 400 | | { |
| 6 | 401 | | if (resourceGroupName == null) |
| | 402 | | { |
| 0 | 403 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 404 | | } |
| 6 | 405 | | if (scriptName == null) |
| | 406 | | { |
| 0 | 407 | | throw new ArgumentNullException(nameof(scriptName)); |
| | 408 | | } |
| 6 | 409 | | if (deploymentScript == null) |
| | 410 | | { |
| 0 | 411 | | throw new ArgumentNullException(nameof(deploymentScript)); |
| | 412 | | } |
| | 413 | |
|
| 6 | 414 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.StartCreate"); |
| 6 | 415 | | scope.Start(); |
| | 416 | | try |
| | 417 | | { |
| 6 | 418 | | var originalResponse = await RestClient.CreateAsync(resourceGroupName, scriptName, deploymentScript, can |
| 6 | 419 | | return new DeploymentScriptsCreateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateReques |
| | 420 | | } |
| 0 | 421 | | catch (Exception e) |
| | 422 | | { |
| 0 | 423 | | scope.Failed(e); |
| 0 | 424 | | throw; |
| | 425 | | } |
| 6 | 426 | | } |
| | 427 | |
|
| | 428 | | /// <summary> Creates a deployment script. </summary> |
| | 429 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 430 | | /// <param name="scriptName"> Name of the deployment script. </param> |
| | 431 | | /// <param name="deploymentScript"> Deployment script supplied to the operation. </param> |
| | 432 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 433 | | public virtual DeploymentScriptsCreateOperation StartCreate(string resourceGroupName, string scriptName, Deploym |
| | 434 | | { |
| 6 | 435 | | if (resourceGroupName == null) |
| | 436 | | { |
| 0 | 437 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 438 | | } |
| 6 | 439 | | if (scriptName == null) |
| | 440 | | { |
| 0 | 441 | | throw new ArgumentNullException(nameof(scriptName)); |
| | 442 | | } |
| 6 | 443 | | if (deploymentScript == null) |
| | 444 | | { |
| 0 | 445 | | throw new ArgumentNullException(nameof(deploymentScript)); |
| | 446 | | } |
| | 447 | |
|
| 6 | 448 | | using var scope = _clientDiagnostics.CreateScope("DeploymentScriptsOperations.StartCreate"); |
| 6 | 449 | | scope.Start(); |
| | 450 | | try |
| | 451 | | { |
| 6 | 452 | | var originalResponse = RestClient.Create(resourceGroupName, scriptName, deploymentScript, cancellationTo |
| 6 | 453 | | return new DeploymentScriptsCreateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateReques |
| | 454 | | } |
| 0 | 455 | | catch (Exception e) |
| | 456 | | { |
| 0 | 457 | | scope.Failed(e); |
| 0 | 458 | | throw; |
| | 459 | | } |
| 6 | 460 | | } |
| | 461 | | } |
| | 462 | | } |