vendor: update all dependencies to latest versions
This commit is contained in:
Generated
Vendored
+56
-18
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,30 +23,26 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// BackupEnginesClient is the client for the BackupEngines methods of the
|
||||
// Recoveryservicesbackup service.
|
||||
// BackupEnginesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type BackupEnginesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewBackupEnginesClient creates an instance of the BackupEnginesClient
|
||||
// client.
|
||||
// NewBackupEnginesClient creates an instance of the BackupEnginesClient client.
|
||||
func NewBackupEnginesClient(subscriptionID string) BackupEnginesClient {
|
||||
return NewBackupEnginesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewBackupEnginesClientWithBaseURI creates an instance of the
|
||||
// BackupEnginesClient client.
|
||||
// NewBackupEnginesClientWithBaseURI creates an instance of the BackupEnginesClient client.
|
||||
func NewBackupEnginesClientWithBaseURI(baseURI string, subscriptionID string) BackupEnginesClient {
|
||||
return BackupEnginesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get returns backup management server registered to Recovery Services Vault.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// backupEngineName is name of the backup management server. filter is oData
|
||||
// filter options. skipToken is skipToken Filter.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. backupEngineName is name of the backup management server. filter is oData filter
|
||||
// options. skipToken is skipToken Filter.
|
||||
func (client BackupEnginesClient) Get(vaultName string, resourceGroupName string, backupEngineName string, filter string, skipToken string) (result BackupEngineBaseResource, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName, backupEngineName, filter, skipToken)
|
||||
if err != nil {
|
||||
@@ -117,12 +112,10 @@ func (client BackupEnginesClient) GetResponder(resp *http.Response) (result Back
|
||||
return
|
||||
}
|
||||
|
||||
// List backup management servers registered to Recovery Services Vault.
|
||||
// Returns a pageable list of servers.
|
||||
// List backup management servers registered to Recovery Services Vault. Returns a pageable list of servers.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// filter is oData filter options. skipToken is skipToken Filter.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. filter is oData filter options. skipToken is skipToken Filter.
|
||||
func (client BackupEnginesClient) List(vaultName string, resourceGroupName string, filter string, skipToken string) (result BackupEngineBaseResourceList, err error) {
|
||||
req, err := client.ListPreparer(vaultName, resourceGroupName, filter, skipToken)
|
||||
if err != nil {
|
||||
@@ -214,3 +207,48 @@ func (client BackupEnginesClient) ListNextResults(lastResults BackupEngineBaseRe
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client BackupEnginesClient) ListComplete(vaultName string, resourceGroupName string, filter string, skipToken string, cancel <-chan struct{}) (<-chan BackupEngineBaseResource, <-chan error) {
|
||||
resultChan := make(chan BackupEngineBaseResource)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(vaultName, resourceGroupName, filter, skipToken)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
Generated
Vendored
+52
-11
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,8 +23,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// BackupJobsClient is the client for the BackupJobs methods of the
|
||||
// Recoveryservicesbackup service.
|
||||
// BackupJobsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type BackupJobsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,17 +33,15 @@ func NewBackupJobsClient(subscriptionID string) BackupJobsClient {
|
||||
return NewBackupJobsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewBackupJobsClientWithBaseURI creates an instance of the BackupJobsClient
|
||||
// client.
|
||||
// NewBackupJobsClientWithBaseURI creates an instance of the BackupJobsClient client.
|
||||
func NewBackupJobsClientWithBaseURI(baseURI string, subscriptionID string) BackupJobsClient {
|
||||
return BackupJobsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// List provides a pageable list of jobs.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// filter is oData filter options. skipToken is skipToken Filter.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. filter is oData filter options. skipToken is skipToken Filter.
|
||||
func (client BackupJobsClient) List(vaultName string, resourceGroupName string, filter string, skipToken string) (result JobResourceList, err error) {
|
||||
req, err := client.ListPreparer(vaultName, resourceGroupName, filter, skipToken)
|
||||
if err != nil {
|
||||
@@ -76,7 +72,7 @@ func (client BackupJobsClient) ListPreparer(vaultName string, resourceGroupName
|
||||
"vaultName": autorest.Encode("path", vaultName),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-12-01"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -137,3 +133,48 @@ func (client BackupJobsClient) ListNextResults(lastResults JobResourceList) (res
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client BackupJobsClient) ListComplete(vaultName string, resourceGroupName string, filter string, skipToken string, cancel <-chan struct{}) (<-chan JobResource, <-chan error) {
|
||||
resultChan := make(chan JobResource)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(vaultName, resourceGroupName, filter, skipToken)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
Generated
Vendored
+11
-18
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,34 +23,28 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// BackupOperationResultsClient is the client for the BackupOperationResults
|
||||
// methods of the Recoveryservicesbackup service.
|
||||
// BackupOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type BackupOperationResultsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewBackupOperationResultsClient creates an instance of the
|
||||
// BackupOperationResultsClient client.
|
||||
// NewBackupOperationResultsClient creates an instance of the BackupOperationResultsClient client.
|
||||
func NewBackupOperationResultsClient(subscriptionID string) BackupOperationResultsClient {
|
||||
return NewBackupOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewBackupOperationResultsClientWithBaseURI creates an instance of the
|
||||
// BackupOperationResultsClient client.
|
||||
// NewBackupOperationResultsClientWithBaseURI creates an instance of the BackupOperationResultsClient client.
|
||||
func NewBackupOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) BackupOperationResultsClient {
|
||||
return BackupOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get provides the status of the delete operations such as deleting backed up
|
||||
// item. Once the operation has started, the status code in the response would
|
||||
// be Accepted. It will continue to be in this state till it reaches
|
||||
// completion. On successful completion, the status code will be OK. This
|
||||
// method expects OperationID as an argument. OperationID is part of the
|
||||
// Location header of the operation response.
|
||||
// Get provides the status of the delete operations such as deleting backed up item. Once the operation has started,
|
||||
// the status code in the response would be Accepted. It will continue to be in this state till it reaches completion.
|
||||
// On successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is
|
||||
// part of the Location header of the operation response.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// operationID is operationID which represents the operation.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. operationID is operationID which represents the operation.
|
||||
func (client BackupOperationResultsClient) Get(vaultName string, resourceGroupName string, operationID string) (result autorest.Response, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName, operationID)
|
||||
if err != nil {
|
||||
|
||||
Generated
Vendored
+10
-17
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,33 +23,27 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// BackupOperationStatusesClient is the client for the BackupOperationStatuses
|
||||
// methods of the Recoveryservicesbackup service.
|
||||
// BackupOperationStatusesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type BackupOperationStatusesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewBackupOperationStatusesClient creates an instance of the
|
||||
// BackupOperationStatusesClient client.
|
||||
// NewBackupOperationStatusesClient creates an instance of the BackupOperationStatusesClient client.
|
||||
func NewBackupOperationStatusesClient(subscriptionID string) BackupOperationStatusesClient {
|
||||
return NewBackupOperationStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewBackupOperationStatusesClientWithBaseURI creates an instance of the
|
||||
// BackupOperationStatusesClient client.
|
||||
// NewBackupOperationStatusesClientWithBaseURI creates an instance of the BackupOperationStatusesClient client.
|
||||
func NewBackupOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) BackupOperationStatusesClient {
|
||||
return BackupOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get fetches the status of an operation such as triggering a backup, restore.
|
||||
// The status can be in progress, completed or failed. You can refer to the
|
||||
// OperationStatus enum for all the possible states of an operation. Some
|
||||
// operations create jobs. This method returns the list of jobs when the
|
||||
// operation is complete.
|
||||
// Get fetches the status of an operation such as triggering a backup, restore. The status can be in progress,
|
||||
// completed or failed. You can refer to the OperationStatus enum for all the possible states of an operation. Some
|
||||
// operations create jobs. This method returns the list of jobs when the operation is complete.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// operationID is operationID which represents the operation.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. operationID is operationID which represents the operation.
|
||||
func (client BackupOperationStatusesClient) Get(vaultName string, resourceGroupName string, operationID string) (result OperationStatus, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName, operationID)
|
||||
if err != nil {
|
||||
|
||||
Generated
Vendored
+54
-14
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,30 +23,26 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// BackupPoliciesClient is the client for the BackupPolicies methods of the
|
||||
// Recoveryservicesbackup service.
|
||||
// BackupPoliciesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type BackupPoliciesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewBackupPoliciesClient creates an instance of the BackupPoliciesClient
|
||||
// client.
|
||||
// NewBackupPoliciesClient creates an instance of the BackupPoliciesClient client.
|
||||
func NewBackupPoliciesClient(subscriptionID string) BackupPoliciesClient {
|
||||
return NewBackupPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewBackupPoliciesClientWithBaseURI creates an instance of the
|
||||
// BackupPoliciesClient client.
|
||||
// NewBackupPoliciesClientWithBaseURI creates an instance of the BackupPoliciesClient client.
|
||||
func NewBackupPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupPoliciesClient {
|
||||
return BackupPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// List lists of backup policies associated with Recovery Services Vault. API
|
||||
// provides pagination parameters to fetch scoped results.
|
||||
// List lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
|
||||
// scoped results.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// filter is oData filter options.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. filter is oData filter options.
|
||||
func (client BackupPoliciesClient) List(vaultName string, resourceGroupName string, filter string) (result ProtectionPolicyResourceList, err error) {
|
||||
req, err := client.ListPreparer(vaultName, resourceGroupName, filter)
|
||||
if err != nil {
|
||||
@@ -136,3 +131,48 @@ func (client BackupPoliciesClient) ListNextResults(lastResults ProtectionPolicyR
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client BackupPoliciesClient) ListComplete(vaultName string, resourceGroupName string, filter string, cancel <-chan struct{}) (<-chan ProtectionPolicyResource, <-chan error) {
|
||||
resultChan := make(chan ProtectionPolicyResource)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(vaultName, resourceGroupName, filter)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
Generated
Vendored
+54
-14
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,30 +23,26 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// BackupProtectableItemsClient is the client for the BackupProtectableItems
|
||||
// methods of the Recoveryservicesbackup service.
|
||||
// BackupProtectableItemsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type BackupProtectableItemsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewBackupProtectableItemsClient creates an instance of the
|
||||
// BackupProtectableItemsClient client.
|
||||
// NewBackupProtectableItemsClient creates an instance of the BackupProtectableItemsClient client.
|
||||
func NewBackupProtectableItemsClient(subscriptionID string) BackupProtectableItemsClient {
|
||||
return NewBackupProtectableItemsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewBackupProtectableItemsClientWithBaseURI creates an instance of the
|
||||
// BackupProtectableItemsClient client.
|
||||
// NewBackupProtectableItemsClientWithBaseURI creates an instance of the BackupProtectableItemsClient client.
|
||||
func NewBackupProtectableItemsClientWithBaseURI(baseURI string, subscriptionID string) BackupProtectableItemsClient {
|
||||
return BackupProtectableItemsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// List provides a pageable list of protectable objects within your
|
||||
// subscription according to the query filter and the pagination parameters.
|
||||
// List provides a pageable list of protectable objects within your subscription according to the query filter and the
|
||||
// pagination parameters.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// filter is oData filter options. skipToken is skipToken Filter.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. filter is oData filter options. skipToken is skipToken Filter.
|
||||
func (client BackupProtectableItemsClient) List(vaultName string, resourceGroupName string, filter string, skipToken string) (result WorkloadProtectableItemResourceList, err error) {
|
||||
req, err := client.ListPreparer(vaultName, resourceGroupName, filter, skipToken)
|
||||
if err != nil {
|
||||
@@ -139,3 +134,48 @@ func (client BackupProtectableItemsClient) ListNextResults(lastResults WorkloadP
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client BackupProtectableItemsClient) ListComplete(vaultName string, resourceGroupName string, filter string, skipToken string, cancel <-chan struct{}) (<-chan WorkloadProtectableItemResource, <-chan error) {
|
||||
resultChan := make(chan WorkloadProtectableItemResource)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(vaultName, resourceGroupName, filter, skipToken)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
Generated
Vendored
+53
-14
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,30 +23,25 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// BackupProtectedItemsClient is the client for the BackupProtectedItems
|
||||
// methods of the Recoveryservicesbackup service.
|
||||
// BackupProtectedItemsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type BackupProtectedItemsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewBackupProtectedItemsClient creates an instance of the
|
||||
// BackupProtectedItemsClient client.
|
||||
// NewBackupProtectedItemsClient creates an instance of the BackupProtectedItemsClient client.
|
||||
func NewBackupProtectedItemsClient(subscriptionID string) BackupProtectedItemsClient {
|
||||
return NewBackupProtectedItemsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewBackupProtectedItemsClientWithBaseURI creates an instance of the
|
||||
// BackupProtectedItemsClient client.
|
||||
// NewBackupProtectedItemsClientWithBaseURI creates an instance of the BackupProtectedItemsClient client.
|
||||
func NewBackupProtectedItemsClientWithBaseURI(baseURI string, subscriptionID string) BackupProtectedItemsClient {
|
||||
return BackupProtectedItemsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// List provides a pageable list of all items that can be backed up within a
|
||||
// subscription.
|
||||
// List provides a pageable list of all items that are backed up within a vault.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// filter is oData filter options. skipToken is skipToken Filter.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. filter is oData filter options. skipToken is skipToken Filter.
|
||||
func (client BackupProtectedItemsClient) List(vaultName string, resourceGroupName string, filter string, skipToken string) (result ProtectedItemResourceList, err error) {
|
||||
req, err := client.ListPreparer(vaultName, resourceGroupName, filter, skipToken)
|
||||
if err != nil {
|
||||
@@ -139,3 +133,48 @@ func (client BackupProtectedItemsClient) ListNextResults(lastResults ProtectedIt
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client BackupProtectedItemsClient) ListComplete(vaultName string, resourceGroupName string, filter string, skipToken string, cancel <-chan struct{}) (<-chan ProtectedItemResource, <-chan error) {
|
||||
resultChan := make(chan ProtectedItemResource)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(vaultName, resourceGroupName, filter, skipToken)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
Generated
Vendored
+52
-12
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,29 +23,25 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// BackupProtectionContainersClient is the client for the
|
||||
// BackupProtectionContainers methods of the Recoveryservicesbackup service.
|
||||
// BackupProtectionContainersClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type BackupProtectionContainersClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewBackupProtectionContainersClient creates an instance of the
|
||||
// BackupProtectionContainersClient client.
|
||||
// NewBackupProtectionContainersClient creates an instance of the BackupProtectionContainersClient client.
|
||||
func NewBackupProtectionContainersClient(subscriptionID string) BackupProtectionContainersClient {
|
||||
return NewBackupProtectionContainersClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewBackupProtectionContainersClientWithBaseURI creates an instance of the
|
||||
// BackupProtectionContainersClient client.
|
||||
// NewBackupProtectionContainersClientWithBaseURI creates an instance of the BackupProtectionContainersClient client.
|
||||
func NewBackupProtectionContainersClientWithBaseURI(baseURI string, subscriptionID string) BackupProtectionContainersClient {
|
||||
return BackupProtectionContainersClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// List lists the containers registered to Recovery Services Vault.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// filter is oData filter options.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. filter is oData filter options.
|
||||
func (client BackupProtectionContainersClient) List(vaultName string, resourceGroupName string, filter string) (result ProtectionContainerResourceList, err error) {
|
||||
req, err := client.ListPreparer(vaultName, resourceGroupName, filter)
|
||||
if err != nil {
|
||||
@@ -135,3 +130,48 @@ func (client BackupProtectionContainersClient) ListNextResults(lastResults Prote
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client BackupProtectionContainersClient) ListComplete(vaultName string, resourceGroupName string, filter string, cancel <-chan struct{}) (<-chan ProtectionContainerResource, <-chan error) {
|
||||
resultChan := make(chan ProtectionContainerResource)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(vaultName, resourceGroupName, filter)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
Generated
Vendored
+10
-13
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,28 +23,26 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// BackupResourceStorageConfigsClient is the client for the
|
||||
// BackupResourceStorageConfigs methods of the Recoveryservicesbackup service.
|
||||
// BackupResourceStorageConfigsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type BackupResourceStorageConfigsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewBackupResourceStorageConfigsClient creates an instance of the
|
||||
// BackupResourceStorageConfigsClient client.
|
||||
// NewBackupResourceStorageConfigsClient creates an instance of the BackupResourceStorageConfigsClient client.
|
||||
func NewBackupResourceStorageConfigsClient(subscriptionID string) BackupResourceStorageConfigsClient {
|
||||
return NewBackupResourceStorageConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewBackupResourceStorageConfigsClientWithBaseURI creates an instance of the
|
||||
// BackupResourceStorageConfigsClient client.
|
||||
// NewBackupResourceStorageConfigsClientWithBaseURI creates an instance of the BackupResourceStorageConfigsClient
|
||||
// client.
|
||||
func NewBackupResourceStorageConfigsClientWithBaseURI(baseURI string, subscriptionID string) BackupResourceStorageConfigsClient {
|
||||
return BackupResourceStorageConfigsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get fetches resource storage config.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present.
|
||||
func (client BackupResourceStorageConfigsClient) Get(vaultName string, resourceGroupName string) (result BackupResourceConfigResource, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName)
|
||||
if err != nil {
|
||||
@@ -110,8 +107,8 @@ func (client BackupResourceStorageConfigsClient) GetResponder(resp *http.Respons
|
||||
|
||||
// Update updates vault storage model type.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present.
|
||||
func (client BackupResourceStorageConfigsClient) Update(vaultName string, resourceGroupName string) (result autorest.Response, err error) {
|
||||
req, err := client.UpdatePreparer(vaultName, resourceGroupName)
|
||||
if err != nil {
|
||||
|
||||
Generated
Vendored
+10
-15
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,28 +23,25 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// BackupResourceVaultConfigsClient is the client for the
|
||||
// BackupResourceVaultConfigs methods of the Recoveryservicesbackup service.
|
||||
// BackupResourceVaultConfigsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type BackupResourceVaultConfigsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewBackupResourceVaultConfigsClient creates an instance of the
|
||||
// BackupResourceVaultConfigsClient client.
|
||||
// NewBackupResourceVaultConfigsClient creates an instance of the BackupResourceVaultConfigsClient client.
|
||||
func NewBackupResourceVaultConfigsClient(subscriptionID string) BackupResourceVaultConfigsClient {
|
||||
return NewBackupResourceVaultConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewBackupResourceVaultConfigsClientWithBaseURI creates an instance of the
|
||||
// BackupResourceVaultConfigsClient client.
|
||||
// NewBackupResourceVaultConfigsClientWithBaseURI creates an instance of the BackupResourceVaultConfigsClient client.
|
||||
func NewBackupResourceVaultConfigsClientWithBaseURI(baseURI string, subscriptionID string) BackupResourceVaultConfigsClient {
|
||||
return BackupResourceVaultConfigsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get fetches resource vault config.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present.
|
||||
func (client BackupResourceVaultConfigsClient) Get(vaultName string, resourceGroupName string) (result BackupResourceVaultConfigResource, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName)
|
||||
if err != nil {
|
||||
@@ -110,9 +106,8 @@ func (client BackupResourceVaultConfigsClient) GetResponder(resp *http.Response)
|
||||
|
||||
// Update updates vault security config.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// parameters is resource config request
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. parameters is resource config request
|
||||
func (client BackupResourceVaultConfigsClient) Update(vaultName string, resourceGroupName string, parameters BackupResourceVaultConfigResource) (result BackupResourceVaultConfigResource, err error) {
|
||||
req, err := client.UpdatePreparer(vaultName, resourceGroupName, parameters)
|
||||
if err != nil {
|
||||
@@ -170,7 +165,7 @@ func (client BackupResourceVaultConfigsClient) UpdateResponder(resp *http.Respon
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
|
||||
+9
-14
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,8 +23,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// BackupsClient is the client for the Backups methods of the
|
||||
// Recoveryservicesbackup service.
|
||||
// BackupsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type BackupsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -40,16 +38,13 @@ func NewBackupsClientWithBaseURI(baseURI string, subscriptionID string) BackupsC
|
||||
return BackupsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Trigger triggers backup for specified backed up item. This is an
|
||||
// asynchronous operation. To know the status of the operation, call
|
||||
// GetProtectedItemOperationResult API.
|
||||
// Trigger triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the
|
||||
// operation, call GetProtectedItemOperationResult API.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// fabricName is fabric name associated with the backup item. containerName is
|
||||
// container name associated with the backup item. protectedItemName is backup
|
||||
// item for which backup needs to be triggered. parameters is resource backup
|
||||
// request
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. fabricName is fabric name associated with the backup item. containerName is
|
||||
// container name associated with the backup item. protectedItemName is backup item for which backup needs to be
|
||||
// triggered. parameters is resource backup request
|
||||
func (client BackupsClient) Trigger(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters BackupRequestResource) (result autorest.Response, err error) {
|
||||
req, err := client.TriggerPreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters)
|
||||
if err != nil {
|
||||
|
||||
Generated
Vendored
+7
-12
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,29 +23,25 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// BackupUsageSummariesClient is the client for the BackupUsageSummaries
|
||||
// methods of the Recoveryservicesbackup service.
|
||||
// BackupUsageSummariesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type BackupUsageSummariesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewBackupUsageSummariesClient creates an instance of the
|
||||
// BackupUsageSummariesClient client.
|
||||
// NewBackupUsageSummariesClient creates an instance of the BackupUsageSummariesClient client.
|
||||
func NewBackupUsageSummariesClient(subscriptionID string) BackupUsageSummariesClient {
|
||||
return NewBackupUsageSummariesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewBackupUsageSummariesClientWithBaseURI creates an instance of the
|
||||
// BackupUsageSummariesClient client.
|
||||
// NewBackupUsageSummariesClientWithBaseURI creates an instance of the BackupUsageSummariesClient client.
|
||||
func NewBackupUsageSummariesClientWithBaseURI(baseURI string, subscriptionID string) BackupUsageSummariesClient {
|
||||
return BackupUsageSummariesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// List fetches the backup management usage summaries of the vault.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// filter is oData filter options. skipToken is skipToken Filter.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. filter is oData filter options. skipToken is skipToken Filter.
|
||||
func (client BackupUsageSummariesClient) List(vaultName string, resourceGroupName string, filter string, skipToken string) (result BackupManagementUsageList, err error) {
|
||||
req, err := client.ListPreparer(vaultName, resourceGroupName, filter, skipToken)
|
||||
if err != nil {
|
||||
|
||||
+4
-6
@@ -1,7 +1,6 @@
|
||||
// Package recoveryservicesbackup implements the Azure ARM
|
||||
// Recoveryservicesbackup service API version 2016-12-01.
|
||||
//
|
||||
// Package recoveryservicesbackup implements the Azure ARM Recoveryservicesbackup service API version .
|
||||
//
|
||||
// Open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
package recoveryservicesbackup
|
||||
|
||||
// Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
@@ -18,9 +17,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
||||
Generated
Vendored
+9
-15
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,32 +23,27 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ExportJobsOperationResultsClient is the client for the
|
||||
// ExportJobsOperationResults methods of the Recoveryservicesbackup service.
|
||||
// ExportJobsOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type ExportJobsOperationResultsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewExportJobsOperationResultsClient creates an instance of the
|
||||
// ExportJobsOperationResultsClient client.
|
||||
// NewExportJobsOperationResultsClient creates an instance of the ExportJobsOperationResultsClient client.
|
||||
func NewExportJobsOperationResultsClient(subscriptionID string) ExportJobsOperationResultsClient {
|
||||
return NewExportJobsOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewExportJobsOperationResultsClientWithBaseURI creates an instance of the
|
||||
// ExportJobsOperationResultsClient client.
|
||||
// NewExportJobsOperationResultsClientWithBaseURI creates an instance of the ExportJobsOperationResultsClient client.
|
||||
func NewExportJobsOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ExportJobsOperationResultsClient {
|
||||
return ExportJobsOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get gets the operation result of operation triggered by Export Jobs API. If
|
||||
// the operation is successful, then it also contains URL of a Blob and a SAS
|
||||
// key to access the same. The blob contains exported jobs in JSON serialized
|
||||
// Get gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it
|
||||
// also contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized
|
||||
// format.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// operationID is operationID which represents the export job.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. operationID is operationID which represents the export job.
|
||||
func (client ExportJobsOperationResultsClient) Get(vaultName string, resourceGroupName string, operationID string) (result OperationResultInfoBaseResource, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName, operationID)
|
||||
if err != nil {
|
||||
|
||||
Generated
Vendored
+21
-30
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,36 +23,31 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ItemLevelRecoveryConnectionsClient is the client for the
|
||||
// ItemLevelRecoveryConnections methods of the Recoveryservicesbackup service.
|
||||
// ItemLevelRecoveryConnectionsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type ItemLevelRecoveryConnectionsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewItemLevelRecoveryConnectionsClient creates an instance of the
|
||||
// ItemLevelRecoveryConnectionsClient client.
|
||||
// NewItemLevelRecoveryConnectionsClient creates an instance of the ItemLevelRecoveryConnectionsClient client.
|
||||
func NewItemLevelRecoveryConnectionsClient(subscriptionID string) ItemLevelRecoveryConnectionsClient {
|
||||
return NewItemLevelRecoveryConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewItemLevelRecoveryConnectionsClientWithBaseURI creates an instance of the
|
||||
// ItemLevelRecoveryConnectionsClient client.
|
||||
// NewItemLevelRecoveryConnectionsClientWithBaseURI creates an instance of the ItemLevelRecoveryConnectionsClient
|
||||
// client.
|
||||
func NewItemLevelRecoveryConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ItemLevelRecoveryConnectionsClient {
|
||||
return ItemLevelRecoveryConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Provision provisions a script which invokes an iSCSI connection to the
|
||||
// backup data. Executing this script opens a file explorer displaying all the
|
||||
// recoverable files and folders. This is an asynchronous operation. To know
|
||||
// the status of provisioning, call GetProtectedItemOperationResult API.
|
||||
// Provision provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a
|
||||
// file explorer displaying all the recoverable files and folders. This is an asynchronous operation. To know the
|
||||
// status of provisioning, call GetProtectedItemOperationResult API.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// fabricName is fabric name associated with the backed up items. containerName
|
||||
// is container name associated with the backed up items. protectedItemName is
|
||||
// backed up item name whose files/folders are to be restored. recoveryPointID
|
||||
// is recovery point ID which represents backed up data. iSCSI connection will
|
||||
// be provisioned for this backed up data. parameters is resource ILR request
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. fabricName is fabric name associated with the backed up items. containerName is
|
||||
// container name associated with the backed up items. protectedItemName is backed up item name whose files/folders are
|
||||
// to be restored. recoveryPointID is recovery point ID which represents backed up data. iSCSI connection will be
|
||||
// provisioned for this backed up data. parameters is resource ILR request
|
||||
func (client ItemLevelRecoveryConnectionsClient) Provision(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters ILRRequestResource) (result autorest.Response, err error) {
|
||||
req, err := client.ProvisionPreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters)
|
||||
if err != nil {
|
||||
@@ -121,17 +115,14 @@ func (client ItemLevelRecoveryConnectionsClient) ProvisionResponder(resp *http.R
|
||||
return
|
||||
}
|
||||
|
||||
// Revoke revokes an iSCSI connection which can be used to download a script.
|
||||
// Executing this script opens a file explorer displaying all recoverable files
|
||||
// and folders. This is an asynchronous operation.
|
||||
// Revoke revokes an iSCSI connection which can be used to download a script. Executing this script opens a file
|
||||
// explorer displaying all recoverable files and folders. This is an asynchronous operation.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// fabricName is fabric name associated with the backed up items. containerName
|
||||
// is container name associated with the backed up items. protectedItemName is
|
||||
// backed up item name whose files/folders are to be restored. recoveryPointID
|
||||
// is recovery point ID which represents backed up data. iSCSI connection will
|
||||
// be revoked for this backed up data.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. fabricName is fabric name associated with the backed up items. containerName is
|
||||
// container name associated with the backed up items. protectedItemName is backed up item name whose files/folders are
|
||||
// to be restored. recoveryPointID is recovery point ID which represents backed up data. iSCSI connection will be
|
||||
// revoked for this backed up data.
|
||||
func (client ItemLevelRecoveryConnectionsClient) Revoke(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string) (result autorest.Response, err error) {
|
||||
req, err := client.RevokePreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID)
|
||||
if err != nil {
|
||||
|
||||
Generated
Vendored
+9
-14
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,30 +23,26 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// JobCancellationsClient is the client for the JobCancellations methods of the
|
||||
// Recoveryservicesbackup service.
|
||||
// JobCancellationsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type JobCancellationsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewJobCancellationsClient creates an instance of the JobCancellationsClient
|
||||
// client.
|
||||
// NewJobCancellationsClient creates an instance of the JobCancellationsClient client.
|
||||
func NewJobCancellationsClient(subscriptionID string) JobCancellationsClient {
|
||||
return NewJobCancellationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewJobCancellationsClientWithBaseURI creates an instance of the
|
||||
// JobCancellationsClient client.
|
||||
// NewJobCancellationsClientWithBaseURI creates an instance of the JobCancellationsClient client.
|
||||
func NewJobCancellationsClientWithBaseURI(baseURI string, subscriptionID string) JobCancellationsClient {
|
||||
return JobCancellationsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Trigger cancels a job. This is an asynchronous operation. To know the status
|
||||
// of the cancellation, call GetCancelOperationResult API.
|
||||
// Trigger cancels a job. This is an asynchronous operation. To know the status of the cancellation, call
|
||||
// GetCancelOperationResult API.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// jobName is name of the job to cancel.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. jobName is name of the job to cancel.
|
||||
func (client JobCancellationsClient) Trigger(vaultName string, resourceGroupName string, jobName string) (result autorest.Response, err error) {
|
||||
req, err := client.TriggerPreparer(vaultName, resourceGroupName, jobName)
|
||||
if err != nil {
|
||||
|
||||
Generated
Vendored
+7
-11
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,8 +23,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// JobDetailsClient is the client for the JobDetails methods of the
|
||||
// Recoveryservicesbackup service.
|
||||
// JobDetailsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type JobDetailsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,17 +33,15 @@ func NewJobDetailsClient(subscriptionID string) JobDetailsClient {
|
||||
return NewJobDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewJobDetailsClientWithBaseURI creates an instance of the JobDetailsClient
|
||||
// client.
|
||||
// NewJobDetailsClientWithBaseURI creates an instance of the JobDetailsClient client.
|
||||
func NewJobDetailsClientWithBaseURI(baseURI string, subscriptionID string) JobDetailsClient {
|
||||
return JobDetailsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get gets exteded information associated with the job.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// jobName is name of the job whose details are to be fetched.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. jobName is name of the job whose details are to be fetched.
|
||||
func (client JobDetailsClient) Get(vaultName string, resourceGroupName string, jobName string) (result JobResource, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName, jobName)
|
||||
if err != nil {
|
||||
@@ -77,7 +73,7 @@ func (client JobDetailsClient) GetPreparer(vaultName string, resourceGroupName s
|
||||
"vaultName": autorest.Encode("path", vaultName),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-12-01"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
Generated
Vendored
+7
-12
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,20 +23,17 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// JobOperationResultsClient is the client for the JobOperationResults methods
|
||||
// of the Recoveryservicesbackup service.
|
||||
// JobOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type JobOperationResultsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewJobOperationResultsClient creates an instance of the
|
||||
// JobOperationResultsClient client.
|
||||
// NewJobOperationResultsClient creates an instance of the JobOperationResultsClient client.
|
||||
func NewJobOperationResultsClient(subscriptionID string) JobOperationResultsClient {
|
||||
return NewJobOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewJobOperationResultsClientWithBaseURI creates an instance of the
|
||||
// JobOperationResultsClient client.
|
||||
// NewJobOperationResultsClientWithBaseURI creates an instance of the JobOperationResultsClient client.
|
||||
func NewJobOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) JobOperationResultsClient {
|
||||
return JobOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
@@ -45,9 +41,8 @@ func NewJobOperationResultsClientWithBaseURI(baseURI string, subscriptionID stri
|
||||
// Get fetches the result of any operation.
|
||||
// the operation.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// jobName is job name whose operation result has to be fetched. operationID is
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. jobName is job name whose operation result has to be fetched. operationID is
|
||||
// operationID which represents the operation whose result has to be fetched.
|
||||
func (client JobOperationResultsClient) Get(vaultName string, resourceGroupName string, jobName string, operationID string) (result autorest.Response, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName, jobName, operationID)
|
||||
|
||||
+6
-10
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,8 +23,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// JobsClient is the client for the Jobs methods of the Recoveryservicesbackup
|
||||
// service.
|
||||
// JobsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type JobsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -40,12 +38,10 @@ func NewJobsClientWithBaseURI(baseURI string, subscriptionID string) JobsClient
|
||||
return JobsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Export triggers export of jobs specified by filters and returns an
|
||||
// OperationID to track.
|
||||
// Export triggers export of jobs specified by filters and returns an OperationID to track.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// filter is oData filter options.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. filter is oData filter options.
|
||||
func (client JobsClient) Export(vaultName string, resourceGroupName string, filter string) (result autorest.Response, err error) {
|
||||
req, err := client.ExportPreparer(vaultName, resourceGroupName, filter)
|
||||
if err != nil {
|
||||
|
||||
+3486
-642
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+57
-17
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,8 +23,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// OperationsClient is the client for the Operations methods of the
|
||||
// Recoveryservicesbackup service.
|
||||
// OperationsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type OperationsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,18 +33,14 @@ func NewOperationsClient(subscriptionID string) OperationsClient {
|
||||
return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient
|
||||
// client.
|
||||
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
|
||||
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
|
||||
return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// List returns the list of available operations.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group where the recovery
|
||||
// services vault is present.
|
||||
func (client OperationsClient) List(resourceGroupName string) (result ClientDiscoveryResponse, err error) {
|
||||
req, err := client.ListPreparer(resourceGroupName)
|
||||
func (client OperationsClient) List() (result ClientDiscoveryResponse, err error) {
|
||||
req, err := client.ListPreparer()
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "recoveryservicesbackup.OperationsClient", "List", nil, "Failure preparing request")
|
||||
return
|
||||
@@ -68,16 +62,17 @@ func (client OperationsClient) List(resourceGroupName string) (result ClientDisc
|
||||
}
|
||||
|
||||
// ListPreparer prepares the List request.
|
||||
func (client OperationsClient) ListPreparer(resourceGroupName string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
func (client OperationsClient) ListPreparer() (*http.Request, error) {
|
||||
const APIVersion = "2016-08-10"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/operations", pathParameters))
|
||||
autorest.WithPath("/providers/Microsoft.RecoveryServices/operations"),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
@@ -123,3 +118,48 @@ func (client OperationsClient) ListNextResults(lastResults ClientDiscoveryRespon
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan ClientDiscoveryValueForSingleAPI, <-chan error) {
|
||||
resultChan := make(chan ClientDiscoveryValueForSingleAPI)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List()
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protecteditemoperationresults.go
Generated
Vendored
+10
-15
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,32 +23,28 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ProtectedItemOperationResultsClient is the client for the
|
||||
// ProtectedItemOperationResults methods of the Recoveryservicesbackup service.
|
||||
// ProtectedItemOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type ProtectedItemOperationResultsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewProtectedItemOperationResultsClient creates an instance of the
|
||||
// ProtectedItemOperationResultsClient client.
|
||||
// NewProtectedItemOperationResultsClient creates an instance of the ProtectedItemOperationResultsClient client.
|
||||
func NewProtectedItemOperationResultsClient(subscriptionID string) ProtectedItemOperationResultsClient {
|
||||
return NewProtectedItemOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewProtectedItemOperationResultsClientWithBaseURI creates an instance of the
|
||||
// ProtectedItemOperationResultsClient client.
|
||||
// NewProtectedItemOperationResultsClientWithBaseURI creates an instance of the ProtectedItemOperationResultsClient
|
||||
// client.
|
||||
func NewProtectedItemOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemOperationResultsClient {
|
||||
return ProtectedItemOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get fetches the result of any operation on the backup item.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// fabricName is fabric name associated with the backup item. containerName is
|
||||
// container name associated with the backup item. protectedItemName is backup
|
||||
// item name whose details are to be fetched. operationID is operationID which
|
||||
// represents the operation whose result needs to be fetched.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. fabricName is fabric name associated with the backup item. containerName is
|
||||
// container name associated with the backup item. protectedItemName is backup item name whose details are to be
|
||||
// fetched. operationID is operationID which represents the operation whose result needs to be fetched.
|
||||
func (client ProtectedItemOperationResultsClient) Get(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string) (result ProtectedItemResource, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationID)
|
||||
if err != nil {
|
||||
|
||||
Generated
Vendored
+13
-21
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,37 +23,30 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ProtectedItemOperationStatusesClient is the client for the
|
||||
// ProtectedItemOperationStatuses methods of the Recoveryservicesbackup
|
||||
// service.
|
||||
// ProtectedItemOperationStatusesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type ProtectedItemOperationStatusesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewProtectedItemOperationStatusesClient creates an instance of the
|
||||
// ProtectedItemOperationStatusesClient client.
|
||||
// NewProtectedItemOperationStatusesClient creates an instance of the ProtectedItemOperationStatusesClient client.
|
||||
func NewProtectedItemOperationStatusesClient(subscriptionID string) ProtectedItemOperationStatusesClient {
|
||||
return NewProtectedItemOperationStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewProtectedItemOperationStatusesClientWithBaseURI creates an instance of
|
||||
// the ProtectedItemOperationStatusesClient client.
|
||||
// NewProtectedItemOperationStatusesClientWithBaseURI creates an instance of the ProtectedItemOperationStatusesClient
|
||||
// client.
|
||||
func NewProtectedItemOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemOperationStatusesClient {
|
||||
return ProtectedItemOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get fetches the status of an operation such as triggering a backup, restore.
|
||||
// The status can be in progress, completed or failed. You can refer to the
|
||||
// OperationStatus enum for all the possible states of the operation. Some
|
||||
// operations create jobs. This method returns the list of jobs associated with
|
||||
// the operation.
|
||||
// Get fetches the status of an operation such as triggering a backup, restore. The status can be in progress,
|
||||
// completed or failed. You can refer to the OperationStatus enum for all the possible states of the operation. Some
|
||||
// operations create jobs. This method returns the list of jobs associated with the operation.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// fabricName is fabric name associated with the backup item. containerName is
|
||||
// container name associated with the backup item. protectedItemName is backup
|
||||
// item name whose details are to be fetched. operationID is operationID
|
||||
// represents the operation whose status needs to be fetched.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. fabricName is fabric name associated with the backup item. containerName is
|
||||
// container name associated with the backup item. protectedItemName is backup item name whose details are to be
|
||||
// fetched. operationID is operationID represents the operation whose status needs to be fetched.
|
||||
func (client ProtectedItemOperationStatusesClient) Get(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string) (result OperationStatus, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationID)
|
||||
if err != nil {
|
||||
|
||||
Generated
Vendored
+22
-34
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,33 +23,28 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ProtectedItemsClient is the client for the ProtectedItems methods of the
|
||||
// Recoveryservicesbackup service.
|
||||
// ProtectedItemsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type ProtectedItemsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewProtectedItemsClient creates an instance of the ProtectedItemsClient
|
||||
// client.
|
||||
// NewProtectedItemsClient creates an instance of the ProtectedItemsClient client.
|
||||
func NewProtectedItemsClient(subscriptionID string) ProtectedItemsClient {
|
||||
return NewProtectedItemsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewProtectedItemsClientWithBaseURI creates an instance of the
|
||||
// ProtectedItemsClient client.
|
||||
// NewProtectedItemsClientWithBaseURI creates an instance of the ProtectedItemsClient client.
|
||||
func NewProtectedItemsClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemsClient {
|
||||
return ProtectedItemsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate enables backup of an item or to modifies the backup policy
|
||||
// information of an already backed up item. This is an asynchronous operation.
|
||||
// To know the status of the operation, call the GetItemOperationResult API.
|
||||
// CreateOrUpdate enables backup of an item or to modifies the backup policy information of an already backed up item.
|
||||
// This is an asynchronous operation. To know the status of the operation, call the GetItemOperationResult API.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// fabricName is fabric name associated with the backup item. containerName is
|
||||
// container name associated with the backup item. protectedItemName is item
|
||||
// name to be backed up. parameters is resource backed up item
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. fabricName is fabric name associated with the backup item. containerName is
|
||||
// container name associated with the backup item. protectedItemName is item name to be backed up. parameters is
|
||||
// resource backed up item
|
||||
func (client ProtectedItemsClient) CreateOrUpdate(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters ProtectedItemResource) (result autorest.Response, err error) {
|
||||
req, err := client.CreateOrUpdatePreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters)
|
||||
if err != nil {
|
||||
@@ -117,15 +111,12 @@ func (client ProtectedItemsClient) CreateOrUpdateResponder(resp *http.Response)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete used to disable backup of an item within a container. This is an
|
||||
// asynchronous operation. To know the status of the request, call the
|
||||
// GetItemOperationResult API.
|
||||
// Delete used to disable backup of an item within a container. This is an asynchronous operation. To know the status
|
||||
// of the request, call the GetItemOperationResult API.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// fabricName is fabric name associated with the backed up item. containerName
|
||||
// is container name associated with the backed up item. protectedItemName is
|
||||
// backed up item to be deleted.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. fabricName is fabric name associated with the backed up item. containerName is
|
||||
// container name associated with the backed up item. protectedItemName is backed up item to be deleted.
|
||||
func (client ProtectedItemsClient) Delete(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string) (result autorest.Response, err error) {
|
||||
req, err := client.DeletePreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName)
|
||||
if err != nil {
|
||||
@@ -190,16 +181,13 @@ func (client ProtectedItemsClient) DeleteResponder(resp *http.Response) (result
|
||||
return
|
||||
}
|
||||
|
||||
// Get provides the details of the backed up item. This is an asynchronous
|
||||
// operation. To know the status of the operation, call the
|
||||
// GetItemOperationResult API.
|
||||
// Get provides the details of the backed up item. This is an asynchronous operation. To know the status of the
|
||||
// operation, call the GetItemOperationResult API.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// fabricName is fabric name associated with the backed up item. containerName
|
||||
// is container name associated with the backed up item. protectedItemName is
|
||||
// backed up item name whose details are to be fetched. filter is oData filter
|
||||
// options.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. fabricName is fabric name associated with the backed up item. containerName is
|
||||
// container name associated with the backed up item. protectedItemName is backed up item name whose details are to be
|
||||
// fetched. filter is oData filter options.
|
||||
func (client ProtectedItemsClient) Get(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (result ProtectedItemResource, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, filter)
|
||||
if err != nil {
|
||||
|
||||
Generated
Vendored
+11
-15
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,32 +23,29 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ProtectionContainerOperationResultsClient is the client for the
|
||||
// ProtectionContainerOperationResults methods of the Recoveryservicesbackup
|
||||
// service.
|
||||
// ProtectionContainerOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type ProtectionContainerOperationResultsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewProtectionContainerOperationResultsClient creates an instance of the
|
||||
// ProtectionContainerOperationResultsClient client.
|
||||
// NewProtectionContainerOperationResultsClient creates an instance of the ProtectionContainerOperationResultsClient
|
||||
// client.
|
||||
func NewProtectionContainerOperationResultsClient(subscriptionID string) ProtectionContainerOperationResultsClient {
|
||||
return NewProtectionContainerOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewProtectionContainerOperationResultsClientWithBaseURI creates an instance
|
||||
// of the ProtectionContainerOperationResultsClient client.
|
||||
// NewProtectionContainerOperationResultsClientWithBaseURI creates an instance of the
|
||||
// ProtectionContainerOperationResultsClient client.
|
||||
func NewProtectionContainerOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainerOperationResultsClient {
|
||||
return ProtectionContainerOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get fetches the result of any operation on the container.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// fabricName is fabric name associated with the container. containerName is
|
||||
// container name whose information should be fetched. operationID is operation
|
||||
// ID which represents the operation whose result needs to be fetched.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. fabricName is fabric name associated with the container. containerName is
|
||||
// container name whose information should be fetched. operationID is operation ID which represents the operation whose
|
||||
// result needs to be fetched.
|
||||
func (client ProtectionContainerOperationResultsClient) Get(vaultName string, resourceGroupName string, fabricName string, containerName string, operationID string) (result ProtectionContainerResource, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName, fabricName, containerName, operationID)
|
||||
if err != nil {
|
||||
|
||||
Generated
Vendored
+10
-15
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,31 +23,27 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ProtectionContainerRefreshOperationResultsClient is the client for the
|
||||
// ProtectionContainerRefreshOperationResults methods of the
|
||||
// Recoveryservicesbackup service.
|
||||
// ProtectionContainerRefreshOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type ProtectionContainerRefreshOperationResultsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewProtectionContainerRefreshOperationResultsClient creates an instance of
|
||||
// the ProtectionContainerRefreshOperationResultsClient client.
|
||||
// NewProtectionContainerRefreshOperationResultsClient creates an instance of the
|
||||
// ProtectionContainerRefreshOperationResultsClient client.
|
||||
func NewProtectionContainerRefreshOperationResultsClient(subscriptionID string) ProtectionContainerRefreshOperationResultsClient {
|
||||
return NewProtectionContainerRefreshOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewProtectionContainerRefreshOperationResultsClientWithBaseURI creates an
|
||||
// instance of the ProtectionContainerRefreshOperationResultsClient client.
|
||||
// NewProtectionContainerRefreshOperationResultsClientWithBaseURI creates an instance of the
|
||||
// ProtectionContainerRefreshOperationResultsClient client.
|
||||
func NewProtectionContainerRefreshOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainerRefreshOperationResultsClient {
|
||||
return ProtectionContainerRefreshOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get provides the result of the refresh operation triggered by the
|
||||
// BeginRefresh operation.
|
||||
// Get provides the result of the refresh operation triggered by the BeginRefresh operation.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// fabricName is fabric name associated with the container. operationID is
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. fabricName is fabric name associated with the container. operationID is
|
||||
// operation ID associated with the operation whose result needs to be fetched.
|
||||
func (client ProtectionContainerRefreshOperationResultsClient) Get(vaultName string, resourceGroupName string, fabricName string, operationID string) (result autorest.Response, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName, fabricName, operationID)
|
||||
|
||||
Generated
Vendored
+13
-21
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,31 +23,26 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ProtectionContainersClient is the client for the ProtectionContainers
|
||||
// methods of the Recoveryservicesbackup service.
|
||||
// ProtectionContainersClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type ProtectionContainersClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewProtectionContainersClient creates an instance of the
|
||||
// ProtectionContainersClient client.
|
||||
// NewProtectionContainersClient creates an instance of the ProtectionContainersClient client.
|
||||
func NewProtectionContainersClient(subscriptionID string) ProtectionContainersClient {
|
||||
return NewProtectionContainersClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewProtectionContainersClientWithBaseURI creates an instance of the
|
||||
// ProtectionContainersClient client.
|
||||
// NewProtectionContainersClientWithBaseURI creates an instance of the ProtectionContainersClient client.
|
||||
func NewProtectionContainersClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainersClient {
|
||||
return ProtectionContainersClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get gets details of the specific container registered to your Recovery
|
||||
// Services Vault.
|
||||
// Get gets details of the specific container registered to your Recovery Services Vault.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// fabricName is name of the fabric where the container belongs. containerName
|
||||
// is name of the container whose details need to be fetched.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. fabricName is name of the fabric where the container belongs. containerName is
|
||||
// name of the container whose details need to be fetched.
|
||||
func (client ProtectionContainersClient) Get(vaultName string, resourceGroupName string, fabricName string, containerName string) (result ProtectionContainerResource, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName, fabricName, containerName)
|
||||
if err != nil {
|
||||
@@ -113,13 +107,11 @@ func (client ProtectionContainersClient) GetResponder(resp *http.Response) (resu
|
||||
return
|
||||
}
|
||||
|
||||
// Refresh discovers all the containers in the subscription that can be backed
|
||||
// up to Recovery Services Vault. This is an asynchronous operation. To know
|
||||
// the status of the operation, call GetRefreshOperationResult API.
|
||||
// Refresh discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is
|
||||
// an asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// fabricName is fabric name associated the container.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. fabricName is fabric name associated the container.
|
||||
func (client ProtectionContainersClient) Refresh(vaultName string, resourceGroupName string, fabricName string) (result autorest.Response, err error) {
|
||||
req, err := client.RefreshPreparer(vaultName, resourceGroupName, fabricName)
|
||||
if err != nil {
|
||||
|
||||
Generated
Vendored
+17
-28
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,32 +23,26 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ProtectionPoliciesClient is the client for the ProtectionPolicies methods of
|
||||
// the Recoveryservicesbackup service.
|
||||
// ProtectionPoliciesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type ProtectionPoliciesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewProtectionPoliciesClient creates an instance of the
|
||||
// ProtectionPoliciesClient client.
|
||||
// NewProtectionPoliciesClient creates an instance of the ProtectionPoliciesClient client.
|
||||
func NewProtectionPoliciesClient(subscriptionID string) ProtectionPoliciesClient {
|
||||
return NewProtectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewProtectionPoliciesClientWithBaseURI creates an instance of the
|
||||
// ProtectionPoliciesClient client.
|
||||
// NewProtectionPoliciesClientWithBaseURI creates an instance of the ProtectionPoliciesClient client.
|
||||
func NewProtectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPoliciesClient {
|
||||
return ProtectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate creates or modifies a backup policy. This is an asynchronous
|
||||
// operation. Status of the operation can be fetched using
|
||||
// GetPolicyOperationResult API.
|
||||
// CreateOrUpdate creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can
|
||||
// be fetched using GetPolicyOperationResult API.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// policyName is backup policy to be created. parameters is resource backup
|
||||
// policy
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. policyName is backup policy to be created. parameters is resource backup policy
|
||||
func (client ProtectionPoliciesClient) CreateOrUpdate(vaultName string, resourceGroupName string, policyName string, parameters ProtectionPolicyResource) (result ProtectionPolicyResource, err error) {
|
||||
req, err := client.CreateOrUpdatePreparer(vaultName, resourceGroupName, policyName, parameters)
|
||||
if err != nil {
|
||||
@@ -115,13 +108,11 @@ func (client ProtectionPoliciesClient) CreateOrUpdateResponder(resp *http.Respon
|
||||
return
|
||||
}
|
||||
|
||||
// Delete deletes specified backup policy from your Recovery Services Vault.
|
||||
// This is an asynchronous operation. Status of the operation can be fetched
|
||||
// using GetPolicyOperationResult API.
|
||||
// Delete deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status
|
||||
// of the operation can be fetched using GetPolicyOperationResult API.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// policyName is backup policy to be deleted.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. policyName is backup policy to be deleted.
|
||||
func (client ProtectionPoliciesClient) Delete(vaultName string, resourceGroupName string, policyName string) (result autorest.Response, err error) {
|
||||
req, err := client.DeletePreparer(vaultName, resourceGroupName, policyName)
|
||||
if err != nil {
|
||||
@@ -184,13 +175,11 @@ func (client ProtectionPoliciesClient) DeleteResponder(resp *http.Response) (res
|
||||
return
|
||||
}
|
||||
|
||||
// Get provides the details of the backup policies associated to Recovery
|
||||
// Services Vault. This is an asynchronous operation. Status of the operation
|
||||
// can be fetched using GetPolicyOperationResult API.
|
||||
// Get provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous
|
||||
// operation. Status of the operation can be fetched using GetPolicyOperationResult API.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// policyName is backup policy information to be fetched.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. policyName is backup policy information to be fetched.
|
||||
func (client ProtectionPoliciesClient) Get(vaultName string, resourceGroupName string, policyName string) (result ProtectionPolicyResource, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName, policyName)
|
||||
if err != nil {
|
||||
|
||||
Generated
Vendored
+9
-15
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,32 +23,27 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ProtectionPolicyOperationResultsClient is the client for the
|
||||
// ProtectionPolicyOperationResults methods of the Recoveryservicesbackup
|
||||
// service.
|
||||
// ProtectionPolicyOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type ProtectionPolicyOperationResultsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewProtectionPolicyOperationResultsClient creates an instance of the
|
||||
// ProtectionPolicyOperationResultsClient client.
|
||||
// NewProtectionPolicyOperationResultsClient creates an instance of the ProtectionPolicyOperationResultsClient client.
|
||||
func NewProtectionPolicyOperationResultsClient(subscriptionID string) ProtectionPolicyOperationResultsClient {
|
||||
return NewProtectionPolicyOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewProtectionPolicyOperationResultsClientWithBaseURI creates an instance of
|
||||
// the ProtectionPolicyOperationResultsClient client.
|
||||
// NewProtectionPolicyOperationResultsClientWithBaseURI creates an instance of the
|
||||
// ProtectionPolicyOperationResultsClient client.
|
||||
func NewProtectionPolicyOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPolicyOperationResultsClient {
|
||||
return ProtectionPolicyOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get provides the result of an operation.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// policyName is backup policy name whose operation's result needs to be
|
||||
// fetched. operationID is operation ID which represents the operation whose
|
||||
// result needs to be fetched.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. policyName is backup policy name whose operation's result needs to be fetched.
|
||||
// operationID is operation ID which represents the operation whose result needs to be fetched.
|
||||
func (client ProtectionPolicyOperationResultsClient) Get(vaultName string, resourceGroupName string, policyName string, operationID string) (result ProtectionPolicyResource, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName, policyName, operationID)
|
||||
if err != nil {
|
||||
|
||||
Generated
Vendored
+13
-20
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,36 +23,30 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ProtectionPolicyOperationStatusesClient is the client for the
|
||||
// ProtectionPolicyOperationStatuses methods of the Recoveryservicesbackup
|
||||
// service.
|
||||
// ProtectionPolicyOperationStatusesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type ProtectionPolicyOperationStatusesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewProtectionPolicyOperationStatusesClient creates an instance of the
|
||||
// ProtectionPolicyOperationStatusesClient client.
|
||||
// NewProtectionPolicyOperationStatusesClient creates an instance of the ProtectionPolicyOperationStatusesClient
|
||||
// client.
|
||||
func NewProtectionPolicyOperationStatusesClient(subscriptionID string) ProtectionPolicyOperationStatusesClient {
|
||||
return NewProtectionPolicyOperationStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewProtectionPolicyOperationStatusesClientWithBaseURI creates an instance of
|
||||
// the ProtectionPolicyOperationStatusesClient client.
|
||||
// NewProtectionPolicyOperationStatusesClientWithBaseURI creates an instance of the
|
||||
// ProtectionPolicyOperationStatusesClient client.
|
||||
func NewProtectionPolicyOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPolicyOperationStatusesClient {
|
||||
return ProtectionPolicyOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get provides the status of the asynchronous operations like backup, restore.
|
||||
// The status can be in progress, completed or failed. You can refer to the
|
||||
// Operation Status enum for all the possible states of an operation. Some
|
||||
// operations create jobs. This method returns the list of jobs associated with
|
||||
// operation.
|
||||
// Get provides the status of the asynchronous operations like backup, restore. The status can be in progress,
|
||||
// completed or failed. You can refer to the Operation Status enum for all the possible states of an operation. Some
|
||||
// operations create jobs. This method returns the list of jobs associated with operation.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// policyName is backup policy name whose operation's status needs to be
|
||||
// fetched. operationID is operation ID which represents an operation whose
|
||||
// status needs to be fetched.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. policyName is backup policy name whose operation's status needs to be fetched.
|
||||
// operationID is operation ID which represents an operation whose status needs to be fetched.
|
||||
func (client ProtectionPolicyOperationStatusesClient) Get(vaultName string, resourceGroupName string, policyName string, operationID string) (result OperationStatus, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName, policyName, operationID)
|
||||
if err != nil {
|
||||
|
||||
Generated
Vendored
+60
-24
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,34 +23,28 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// RecoveryPointsClient is the client for the RecoveryPoints methods of the
|
||||
// Recoveryservicesbackup service.
|
||||
// RecoveryPointsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type RecoveryPointsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewRecoveryPointsClient creates an instance of the RecoveryPointsClient
|
||||
// client.
|
||||
// NewRecoveryPointsClient creates an instance of the RecoveryPointsClient client.
|
||||
func NewRecoveryPointsClient(subscriptionID string) RecoveryPointsClient {
|
||||
return NewRecoveryPointsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewRecoveryPointsClientWithBaseURI creates an instance of the
|
||||
// RecoveryPointsClient client.
|
||||
// NewRecoveryPointsClientWithBaseURI creates an instance of the RecoveryPointsClient client.
|
||||
func NewRecoveryPointsClientWithBaseURI(baseURI string, subscriptionID string) RecoveryPointsClient {
|
||||
return RecoveryPointsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get provides the information of the backed up data identified using
|
||||
// RecoveryPointID. This is an asynchronous operation. To know the status of
|
||||
// the operation, call the GetProtectedItemOperationResult API.
|
||||
// Get provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous
|
||||
// operation. To know the status of the operation, call the GetProtectedItemOperationResult API.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// fabricName is fabric name associated with backed up item. containerName is
|
||||
// container name associated with backed up item. protectedItemName is backed
|
||||
// up item name whose backup data needs to be fetched. recoveryPointID is
|
||||
// recoveryPointID represents the backed up data to be fetched.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. fabricName is fabric name associated with backed up item. containerName is
|
||||
// container name associated with backed up item. protectedItemName is backed up item name whose backup data needs to
|
||||
// be fetched. recoveryPointID is recoveryPointID represents the backed up data to be fetched.
|
||||
func (client RecoveryPointsClient) Get(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string) (result RecoveryPointResource, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID)
|
||||
if err != nil {
|
||||
@@ -120,12 +113,10 @@ func (client RecoveryPointsClient) GetResponder(resp *http.Response) (result Rec
|
||||
|
||||
// List lists the backup copies for the backed up item.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// fabricName is fabric name associated with the backed up item. containerName
|
||||
// is container name associated with the backed up item. protectedItemName is
|
||||
// backed up item whose backup copies are to be fetched. filter is oData filter
|
||||
// options.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. fabricName is fabric name associated with the backed up item. containerName is
|
||||
// container name associated with the backed up item. protectedItemName is backed up item whose backup copies are to be
|
||||
// fetched. filter is oData filter options.
|
||||
func (client RecoveryPointsClient) List(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (result RecoveryPointResourceList, err error) {
|
||||
req, err := client.ListPreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, filter)
|
||||
if err != nil {
|
||||
@@ -217,3 +208,48 @@ func (client RecoveryPointsClient) ListNextResults(lastResults RecoveryPointReso
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client RecoveryPointsClient) ListComplete(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string, cancel <-chan struct{}) (<-chan RecoveryPointResource, <-chan error) {
|
||||
resultChan := make(chan RecoveryPointResource)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, filter)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
+11
-17
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,8 +23,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// RestoresClient is the client for the Restores methods of the
|
||||
// Recoveryservicesbackup service.
|
||||
// RestoresClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type RestoresClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,23 +33,19 @@ func NewRestoresClient(subscriptionID string) RestoresClient {
|
||||
return NewRestoresClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewRestoresClientWithBaseURI creates an instance of the RestoresClient
|
||||
// client.
|
||||
// NewRestoresClientWithBaseURI creates an instance of the RestoresClient client.
|
||||
func NewRestoresClientWithBaseURI(baseURI string, subscriptionID string) RestoresClient {
|
||||
return RestoresClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Trigger restores the specified backed up data. This is an asynchronous
|
||||
// operation. To know the status of this API call, use
|
||||
// GetProtectedItemOperationResult API.
|
||||
// Trigger restores the specified backed up data. This is an asynchronous operation. To know the status of this API
|
||||
// call, use GetProtectedItemOperationResult API.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// fabricName is fabric name associated with the backed up items. containerName
|
||||
// is container name associated with the backed up items. protectedItemName is
|
||||
// backed up item to be restored. recoveryPointID is recovery point ID which
|
||||
// represents the backed up data to be restored. parameters is resource restore
|
||||
// request
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. fabricName is fabric name associated with the backed up items. containerName is
|
||||
// container name associated with the backed up items. protectedItemName is backed up item to be restored.
|
||||
// recoveryPointID is recovery point ID which represents the backed up data to be restored. parameters is resource
|
||||
// restore request
|
||||
func (client RestoresClient) Trigger(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters RestoreRequestResource) (result autorest.Response, err error) {
|
||||
req, err := client.TriggerPreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters)
|
||||
if err != nil {
|
||||
|
||||
Generated
Vendored
+6
-9
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,8 +23,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// SecurityPINsClient is the client for the SecurityPINs methods of the
|
||||
// Recoveryservicesbackup service.
|
||||
// SecurityPINsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type SecurityPINsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,16 +33,15 @@ func NewSecurityPINsClient(subscriptionID string) SecurityPINsClient {
|
||||
return NewSecurityPINsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewSecurityPINsClientWithBaseURI creates an instance of the
|
||||
// SecurityPINsClient client.
|
||||
// NewSecurityPINsClientWithBaseURI creates an instance of the SecurityPINsClient client.
|
||||
func NewSecurityPINsClientWithBaseURI(baseURI string, subscriptionID string) SecurityPINsClient {
|
||||
return SecurityPINsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get get the security PIN.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present.
|
||||
func (client SecurityPINsClient) Get(vaultName string, resourceGroupName string) (result TokenInformation, err error) {
|
||||
req, err := client.GetPreparer(vaultName, resourceGroupName)
|
||||
if err != nil {
|
||||
|
||||
+4
-5
@@ -14,16 +14,15 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
// UserAgent returns the UserAgent string to use when sending http.Requests.
|
||||
func UserAgent() string {
|
||||
return "Azure-SDK-For-Go/v10.1.0-beta arm-recoveryservicesbackup/2016-12-01"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-recoveryservicesbackup/"
|
||||
}
|
||||
|
||||
// Version returns the semantic version (see http://semver.org) of the client.
|
||||
func Version() string {
|
||||
return "v10.1.0-beta"
|
||||
return "v11.0.0-beta"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user