private static TenantResourceExtensionClient GetExtensionClient(TenantResource tenantResource) { return(tenantResource.GetCachedClient((client) => { return new TenantResourceExtensionClient(client, tenantResource.Id); } )); }
public static Response <TemplateHashResult> CalculateDeploymentTemplateHash(this TenantResource tenantResource, BinaryData template, CancellationToken cancellationToken = default) { Argument.AssertNotNull(template, nameof(template)); return(GetExtensionClient(tenantResource).CalculateDeploymentTemplateHash(template, cancellationToken)); }
public static async Task <Response <TemplateHashResult> > CalculateDeploymentTemplateHashAsync(this TenantResource tenantResource, BinaryData template, CancellationToken cancellationToken = default) { Argument.AssertNotNull(template, nameof(template)); return(await GetExtensionClient(tenantResource).CalculateDeploymentTemplateHashAsync(template, cancellationToken).ConfigureAwait(false)); }
public static Response <ArmDeploymentResource> GetArmDeployment(this TenantResource tenantResource, string deploymentName, CancellationToken cancellationToken = default) { return(tenantResource.GetArmDeployments().Get(deploymentName, cancellationToken)); }
public static async Task <Response <ArmDeploymentResource> > GetArmDeploymentAsync(this TenantResource tenantResource, string deploymentName, CancellationToken cancellationToken = default) { return(await tenantResource.GetArmDeployments().GetAsync(deploymentName, cancellationToken).ConfigureAwait(false)); }
public static ArmDeploymentCollection GetArmDeployments(this TenantResource tenantResource) { return(GetExtensionClient(tenantResource).GetArmDeployments()); }