public async Task <VeeamPagedResult <OneDrive> > GetOneDrivesAsync(string restoreSessionId,
                                                                           int?limit            = null,
                                                                           int?offset           = null,
                                                                           CancellationToken ct = default)
        {
            ParameterValidator.ValidateNotNull(restoreSessionId, nameof(restoreSessionId));

            var parameters = new QueryParameters()
                             .AddOptionalParameter("limit", limit)
                             .AddOptionalParameter("offset", offset);

            var url = $"restoresessions/{restoreSessionId}/organization/onedrives";

            return(await _baseClient.GetAsync <VeeamPagedResult <OneDrive> >(url, parameters, ct));
        }
        public async Task <BackupRepository> GetBackupRepositoryAsync(string repositoryId, CancellationToken ct = default)
        {
            ParameterValidator.ValidateNotNull(repositoryId, nameof(repositoryId));
            var url = $"backuprepositories/{repositoryId}";

            return(await _baseClient.GetAsync <BackupRepository>(url, null, ct));
        }
예제 #3
0
        public async Task <VeeamPagedResult <OrganizationSite> > GetSitesOfOrganizationAsync(string organizationId,
                                                                                             int?limit            = null,
                                                                                             int?offset           = null,
                                                                                             string setId         = null,
                                                                                             CancellationToken ct = default)
        {
            ParameterValidator.ValidateNotNull(organizationId, nameof(organizationId));

            var parameters = new QueryParameters()
                             .AddOptionalParameter("limit", limit)
                             .AddOptionalParameter("offset", offset)
                             .AddOptionalParameter("setId", setId);

            var url = $"organizations/{organizationId}/sites";

            return(await _baseClient.GetAsync <VeeamPagedResult <OrganizationSite> >(url, parameters, ct));
        }
예제 #4
0
        public async Task <VeeamPagedResult <LicensedUser> > GetLicensedUsersAsync(string organizationId = null,
                                                                                   string name           = null,
                                                                                   int?limit             = null,
                                                                                   int?offset            = null,
                                                                                   CancellationToken ct  = default)
        {
            var parameters = new QueryParameters()
                             .AddOptionalParameter("organizationId", organizationId)
                             .AddOptionalParameter("name", name)
                             .AddOptionalParameter("limit", limit)
                             .AddOptionalParameter("offset", offset);

            var url = "licensedusers";

            return(await _baseClient.GetAsync <VeeamPagedResult <LicensedUser> >(url, parameters, ct));
        }
예제 #5
0
        public async Task <VeeamCollectionResult <Organization> > GetOrganizationsAsync(CancellationToken ct = default)
        {
            var url = "organizations";

            return(await _baseClient.GetAsync <VeeamCollectionResult <Organization> >(url, null, ct));
        }
예제 #6
0
        public async Task <VeeamCollectionResult <Job> > GetJobsAsync(CancellationToken ct = default)
        {
            var url = "jobs";

            return(await _baseClient.GetAsync <VeeamCollectionResult <Job> >(url, null, ct));
        }