public async Task <Versions> ListActiveGateAvailableVersionsAsync(WindowsUnixDeploymentOsTypes osType, CancellationToken cancellationToken = default) { var response = await GetDeploymentActiveGateUrl() .AppendPathSegment("versions") .AppendPathSegment(s_deploymentOsTypesConverter.ConvertToString(osType)) .GetJsonWithErrorCheckingAsync <Versions>(cancellationToken) .ConfigureAwait(false); return(response); }
public async Task <bool> DownloadActiveGateLatestAsync(WindowsUnixDeploymentOsTypes osType, string ifNoneMatchEtag = null, CancellationToken cancellationToken = default) { var response = await GetDeploymentActiveGateUrl() .WithHeader("If-None-Match", ifNoneMatchEtag) .AppendPathSegment(s_deploymentOsTypesConverter.ConvertToString(osType)) .AppendPathSegment("latest") .GetAsync(cancellationToken) .ConfigureAwait(false); return(response.IsSuccessStatusCode); }
public async Task <bool> DownloadBoshTarballsSpecificVersionAsync(WindowsUnixDeploymentOsTypes osType, string version, bool?skipMetadata = false, CancellationToken cancellationToken = default) { var response = await GetDeploymentBoshReleaseUrl() .AppendPathSegment("agent") .AppendPathSegment(s_deploymentOsTypesConverter.ConvertToString(osType)) .AppendPathSegment("version") .AppendPathSegment(version) .SetQueryParam(nameof(skipMetadata), skipMetadata) .GetAsync(cancellationToken) .ConfigureAwait(false); return(response.IsSuccessStatusCode); }
public async Task <BoshReleaseChecksum> GetBoshTarballChecksumAsync(WindowsUnixDeploymentOsTypes osType, string version, bool?skipMetadata = false, CancellationToken cancellationToken = default) { var response = await GetDeploymentBoshReleaseUrl() .AppendPathSegment("agent") .AppendPathSegment(s_deploymentOsTypesConverter.ConvertToString(osType)) .AppendPathSegment("version") .AppendPathSegment(version) .AppendPathSegment("checksum") .SetQueryParam(nameof(skipMetadata), skipMetadata) .GetJsonWithErrorCheckingAsync <BoshReleaseChecksum>(cancellationToken) .ConfigureAwait(false); return(response); }