diff --git a/azurerm/config.go b/azurerm/config.go index 3ca35312b99c..4805bc678551 100644 --- a/azurerm/config.go +++ b/azurerm/config.go @@ -31,6 +31,7 @@ import ( "github.com/Azure/azure-sdk-for-go/services/operationalinsights/mgmt/2015-11-01-preview/operationalinsights" "github.com/Azure/azure-sdk-for-go/services/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement" "github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-04-30-preview/postgresql" + "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices" "github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2016-04-01/redis" "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions" "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/locks" @@ -157,6 +158,9 @@ type ArmClient struct { vnetPeeringsClient network.VirtualNetworkPeeringsClient watcherClient network.WatchersClient + // Recovery Services + recoveryServicesVaultsClient recoveryservices.VaultsClient + // Resources managementLocksClient locks.ManagementLocksClient deploymentsClient resources.DeploymentsClient @@ -358,6 +362,7 @@ func getArmClient(c *authentication.Config) (*ArmClient, error) { client.registerMonitorClients(endpoint, c.SubscriptionID, auth, sender) client.registerNetworkingClients(endpoint, c.SubscriptionID, auth, sender) client.registerOperationalInsightsClients(endpoint, c.SubscriptionID, auth, sender) + client.registerRecoveryServiceClients(endpoint, c.SubscriptionID, auth) client.registerRedisClients(endpoint, c.SubscriptionID, auth, sender) client.registerResourcesClients(endpoint, c.SubscriptionID, auth) client.registerSearchClients(endpoint, c.SubscriptionID, auth) @@ -748,6 +753,12 @@ func (c *ArmClient) registerOperationalInsightsClients(endpoint, subscriptionId c.solutionsClient = solutionsClient } +func (c *ArmClient) registerRecoveryServiceClients(endpoint, subscriptionId string, auth autorest.Authorizer) { + vaultsClient := recoveryservices.NewVaultsClientWithBaseURI(endpoint, subscriptionId) + c.configureClient(&vaultsClient.Client, auth) + c.recoveryServicesVaultsClient = vaultsClient +} + func (c *ArmClient) registerRedisClients(endpoint, subscriptionId string, auth autorest.Authorizer, sender autorest.Sender) { redisClient := redis.NewClientWithBaseURI(endpoint, subscriptionId) c.configureClient(&redisClient.Client, auth) diff --git a/azurerm/data_source_recovery_services_vault.go b/azurerm/data_source_recovery_services_vault.go new file mode 100644 index 000000000000..0f3bffb1a512 --- /dev/null +++ b/azurerm/data_source_recovery_services_vault.go @@ -0,0 +1,68 @@ +package azurerm + +import ( + "fmt" + "log" + + "github.com/hashicorp/terraform/helper/schema" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" +) + +func dataSourceArmRecoveryServicesVault() *schema.Resource { + return &schema.Resource{ + Read: dataSourceArmRecoveryServicesVaultRead, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + + "location": locationForDataSourceSchema(), + + "resource_group_name": resourceGroupNameForDataSourceSchema(), + + "tags": tagsForDataSourceSchema(), + + "sku": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceArmRecoveryServicesVaultRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*ArmClient).recoveryServicesVaultsClient + ctx := meta.(*ArmClient).StopContext + + name := d.Get("name").(string) + resourceGroup := d.Get("resource_group_name").(string) + + log.Printf("[DEBUG] Reading Recovery Service Vault %q (resource group %q)", name, resourceGroup) + + vault, err := client.Get(ctx, resourceGroup, name) + if err != nil { + if utils.ResponseWasNotFound(vault.Response) { + d.SetId("") + return nil + } + + return fmt.Errorf("Error making Read request on Recovery Service Vault %q (Resource Group %q): %+v", name, resourceGroup, err) + } + + d.SetId(*vault.ID) + d.Set("name", vault.Name) + d.Set("location", azureRMNormalizeLocation(*vault.Location)) + d.Set("resource_group_name", resourceGroup) + flattenAndSetTags(d, &vault.Tags) + + if sku := vault.Sku; sku != nil { + d.Set("sku", string(sku.Name)) + } + + return nil +} diff --git a/azurerm/data_source_recovery_services_vault_test.go b/azurerm/data_source_recovery_services_vault_test.go new file mode 100644 index 000000000000..b151ad66da01 --- /dev/null +++ b/azurerm/data_source_recovery_services_vault_test.go @@ -0,0 +1,36 @@ +package azurerm + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccDataSourceAzureRMRecoveryServicesVault_basic(t *testing.T) { + dataSourceName := "data.azurerm_recovery_services_vault.test" + ri := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceRecoveryServicesVault_basic(ri, testLocation()), + Check: checkAccAzureRMRecoveryServicesVault_basic(dataSourceName), + }, + }, + }) +} + +func testAccDataSourceRecoveryServicesVault_basic(rInt int, location string) string { + return fmt.Sprintf(` +%s + +data "azurerm_recovery_services_vault" "test" { + name = "${azurerm_recovery_services_vault.test.name}" + resource_group_name = "${azurerm_resource_group.test.name}" +} +`, testAccAzureRMRecoveryServicesVault_basic(rInt, location)) +} diff --git a/azurerm/provider.go b/azurerm/provider.go index f807e9a3f113..99b7cbd628d2 100644 --- a/azurerm/provider.go +++ b/azurerm/provider.go @@ -92,6 +92,7 @@ func Provider() terraform.ResourceProvider { "azurerm_platform_image": dataSourceArmPlatformImage(), "azurerm_public_ip": dataSourceArmPublicIP(), "azurerm_public_ips": dataSourceArmPublicIPs(), + "azurerm_recovery_services_vault": dataSourceArmRecoveryServicesVault(), "azurerm_resource_group": dataSourceArmResourceGroup(), "azurerm_role_definition": dataSourceArmRoleDefinition(), "azurerm_storage_account": dataSourceArmStorageAccount(), @@ -169,6 +170,7 @@ func Provider() terraform.ResourceProvider { "azurerm_postgresql_firewall_rule": resourceArmPostgreSQLFirewallRule(), "azurerm_postgresql_server": resourceArmPostgreSQLServer(), "azurerm_public_ip": resourceArmPublicIp(), + "azurerm_recovery_services_vault": resourceArmRecoveryServicesVault(), "azurerm_redis_cache": resourceArmRedisCache(), "azurerm_redis_firewall_rule": resourceArmRedisFirewallRule(), "azurerm_resource_group": resourceArmResourceGroup(), diff --git a/azurerm/resource_arm_recovery_services_vault.go b/azurerm/resource_arm_recovery_services_vault.go new file mode 100644 index 000000000000..3bf7907af31e --- /dev/null +++ b/azurerm/resource_arm_recovery_services_vault.go @@ -0,0 +1,146 @@ +package azurerm + +import ( + "fmt" + "log" + "regexp" + + "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices" + + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" +) + +func resourceArmRecoveryServicesVault() *schema.Resource { + return &schema.Resource{ + Create: resourceArmRecoveryServicesVaultCreateUpdate, + Read: resourceArmRecoveryServicesVaultRead, + Update: resourceArmRecoveryServicesVaultCreateUpdate, + Delete: resourceArmRecoveryServicesVaultDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringMatch( + regexp.MustCompile("^[a-zA-Z][-a-zA-Z0-9]{1,49}$"), + "Recovery Service Vault name must be 2 - 50 characters long, start with a letter, contain only letters, numbers and hyphens.", + ), + }, + + "location": locationSchema(), + + "resource_group_name": resourceGroupNameSchema(), + + "tags": tagsSchema(), + + "sku": { + Type: schema.TypeString, + Required: true, + DiffSuppressFunc: ignoreCaseDiffSuppressFunc, + ValidateFunc: validation.StringInSlice([]string{ + string(recoveryservices.RS0), + string(recoveryservices.Standard), + }, true), + }, + }, + } +} + +func resourceArmRecoveryServicesVaultCreateUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*ArmClient).recoveryServicesVaultsClient + ctx := meta.(*ArmClient).StopContext + + name := d.Get("name").(string) + location := d.Get("location").(string) + resourceGroup := d.Get("resource_group_name").(string) + tags := d.Get("tags").(map[string]interface{}) + + log.Printf("[DEBUG] Creating/updating Recovery Service Vault %q (resource group %q)", name, resourceGroup) + + //build vault struct + vault := recoveryservices.Vault{ + Location: utils.String(location), + Tags: *expandTags(tags), + Sku: &recoveryservices.Sku{ + Name: recoveryservices.SkuName(d.Get("sku").(string)), + }, + Properties: &recoveryservices.VaultProperties{}, + } + + //create recovery services vault + collection, err := client.CreateOrUpdate(ctx, resourceGroup, name, vault) + if err != nil { + return fmt.Errorf("Error creating/updating Recovery Service Vault %q (Resource Group %q): %+v", name, resourceGroup, err) + } + + d.SetId(*collection.ID) + + return resourceArmRecoveryServicesVaultRead(d, meta) +} + +func resourceArmRecoveryServicesVaultRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*ArmClient).recoveryServicesVaultsClient + ctx := meta.(*ArmClient).StopContext + + id, err := parseAzureResourceID(d.Id()) + if err != nil { + return err + } + + name := id.Path["vaults"] + resourceGroup := id.ResourceGroup + + log.Printf("[DEBUG] Reading Recovery Service Vault %q (resource group %q)", name, resourceGroup) + + vault, err := client.Get(ctx, resourceGroup, name) + if err != nil { + if utils.ResponseWasNotFound(vault.Response) { + d.SetId("") + return nil + } + + return fmt.Errorf("Error making Read request on Recovery Service Vault %q (Resource Group %q): %+v", name, resourceGroup, err) + } + + d.Set("name", vault.Name) + d.Set("location", azureRMNormalizeLocation(*vault.Location)) + d.Set("resource_group_name", resourceGroup) + flattenAndSetTags(d, &vault.Tags) + + if sku := vault.Sku; sku != nil { + d.Set("sku", string(sku.Name)) + } + + return nil +} + +func resourceArmRecoveryServicesVaultDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*ArmClient).recoveryServicesVaultsClient + ctx := meta.(*ArmClient).StopContext + + id, err := parseAzureResourceID(d.Id()) + if err != nil { + return err + } + + name := id.Path["vaults"] + resourceGroup := id.ResourceGroup + + log.Printf("[DEBUG] Deleting Recovery Service Vault %q (resource group %q)", name, resourceGroup) + + resp, err := client.Delete(ctx, resourceGroup, name) + if err != nil { + if !utils.ResponseWasNotFound(resp) { + return fmt.Errorf("Error issuing delete request for Recovery Service Vault %q (Resource Group %q): %+v", name, resourceGroup, err) + } + } + + return nil +} diff --git a/azurerm/resource_arm_recovery_services_vault_test.go b/azurerm/resource_arm_recovery_services_vault_test.go new file mode 100644 index 000000000000..16db8854d000 --- /dev/null +++ b/azurerm/resource_arm_recovery_services_vault_test.go @@ -0,0 +1,118 @@ +package azurerm + +import ( + "fmt" + "testing" + + "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" +) + +func TestAccAzureRMRecoveryServicesVault_basic(t *testing.T) { + ri := acctest.RandInt() + + resourceName := "azurerm_recovery_services_vault.test" + config := testAccAzureRMRecoveryServicesVault_basic(ri, testLocation()) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testCheckAzureRMRecoveryServicesVaultDestroy, + Steps: []resource.TestStep{ + { + Config: config, + Check: checkAccAzureRMRecoveryServicesVault_basic(resourceName), + }, + }, + }) +} + +func testCheckAzureRMRecoveryServicesVaultDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "azurerm_recovery_services_vault" { + continue + } + + name := rs.Primary.Attributes["name"] + resourceGroup := rs.Primary.Attributes["resource_group_name"] + + client := testAccProvider.Meta().(*ArmClient).recoveryServicesVaultsClient + ctx := testAccProvider.Meta().(*ArmClient).StopContext + + resp, err := client.Get(ctx, resourceGroup, name) + + if err != nil { + if utils.ResponseWasNotFound(resp.Response) { + return nil + } + + return err + } + + return fmt.Errorf("Recovery Services Vault still exists:\n%#v", resp) + } + + return nil +} + +func testCheckAzureRMRecoveryServicesVaultExists(name string) resource.TestCheckFunc { + return func(s *terraform.State) error { + // Ensure we have enough information in state to look up in API + rs, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("Not found: %q", name) + } + + name := rs.Primary.Attributes["name"] + resourceGroup, hasResourceGroup := rs.Primary.Attributes["resource_group_name"] + if !hasResourceGroup { + return fmt.Errorf("Bad: no resource group found in state for Recovery Services Vault: %q", name) + } + + client := testAccProvider.Meta().(*ArmClient).recoveryServicesVaultsClient + ctx := testAccProvider.Meta().(*ArmClient).StopContext + resp, err := client.Get(ctx, resourceGroup, name) + + if err != nil { + if utils.ResponseWasNotFound(resp.Response) { + return fmt.Errorf("Recovery Services Vault %q (resource group: %q) was not found: %+v", name, resourceGroup, err) + } + + return fmt.Errorf("Bad: Get on recoveryServicesVaultsClient: %+v", err) + } + + return nil + } +} + +func testAccAzureRMRecoveryServicesVault_basic(rInt int, location string) string { + return fmt.Sprintf(` +resource "azurerm_resource_group" "test" { + name = "acctestRG-%d" + location = "%s" +} + +resource "azurerm_recovery_services_vault" "test" { + name = "acctest-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + sku = "Standard" +} + +`, rInt, location, rInt) +} + +func checkAccAzureRMRecoveryServicesVault_basic(resourceName string) resource.TestCheckFunc { + return resource.ComposeTestCheckFunc( + testCheckAzureRMRecoveryServicesVaultExists(resourceName), + resource.TestCheckResourceAttrSet(resourceName, "name"), + resource.TestCheckResourceAttrSet(resourceName, "location"), + resource.TestCheckResourceAttrSet(resourceName, "resource_group_name"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + resource.TestCheckResourceAttr(resourceName, "sku", string(recoveryservices.Standard)), + ) +} diff --git a/examples/recoveryservice-vault/main.tf b/examples/recoveryservice-vault/main.tf new file mode 100644 index 000000000000..b54ef863e64e --- /dev/null +++ b/examples/recoveryservice-vault/main.tf @@ -0,0 +1,12 @@ + +resource "azurerm_resource_group" "rg" { + name = "${var.resource_group_name}" + location = "${var.resource_group_location}" +} + +resource "azurerm_recovery_services_vault" "vault" { + name = "example-recovery-vault" + location = "${azurerm_resource_group.rg.location}" + resource_group_name = "${azurerm_resource_group.rg.name}" + sku = "Standard" +} diff --git a/examples/recoveryservice-vault/outputs.tf b/examples/recoveryservice-vault/outputs.tf new file mode 100644 index 000000000000..1e18aee70d71 --- /dev/null +++ b/examples/recoveryservice-vault/outputs.tf @@ -0,0 +1,4 @@ + +output "vault-id" { + value = "${azurerm_recovery_services_vault.vault.id}" +} \ No newline at end of file diff --git a/examples/recoveryservice-vault/variables.tf b/examples/recoveryservice-vault/variables.tf new file mode 100644 index 000000000000..bbec5d88f6b5 --- /dev/null +++ b/examples/recoveryservice-vault/variables.tf @@ -0,0 +1,11 @@ +variable "resource_group_name" { + type = "string" + description = "Name of the azure resource group." + default = "tfex-recovery_vault" +} + +variable "resource_group_location" { + type = "string" + description = "Location of the azure resource group." + default = "westus" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/client.go new file mode 100644 index 000000000000..221b1dd05edb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/client.go @@ -0,0 +1,51 @@ +// Package recoveryservices implements the Azure ARM Recoveryservices service API version 2016-06-01. +// +// Recovery Services Client +package recoveryservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// 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" +) + +const ( + // DefaultBaseURI is the default URI used for the service Recoveryservices + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Recoveryservices. +type BaseClient struct { + autorest.Client + BaseURI string + SubscriptionID string +} + +// New creates an instance of the BaseClient client. +func New(subscriptionID string) BaseClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWithBaseURI creates an instance of the BaseClient client. +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/models.go new file mode 100644 index 000000000000..cb6381c8c63b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/models.go @@ -0,0 +1,1133 @@ +package recoveryservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/to" + "net/http" +) + +// AuthType enumerates the values for auth type. +type AuthType string + +const ( + // AAD ... + AAD AuthType = "AAD" + // AccessControlService ... + AccessControlService AuthType = "AccessControlService" + // ACS ... + ACS AuthType = "ACS" + // AzureActiveDirectory ... + AzureActiveDirectory AuthType = "AzureActiveDirectory" + // Invalid ... + Invalid AuthType = "Invalid" +) + +// AuthTypeBasicResourceCertificateDetails enumerates the values for auth type basic resource certificate +// details. +type AuthTypeBasicResourceCertificateDetails string + +const ( + // AuthTypeAccessControlService ... + AuthTypeAccessControlService AuthTypeBasicResourceCertificateDetails = "AccessControlService" + // AuthTypeAzureActiveDirectory ... + AuthTypeAzureActiveDirectory AuthTypeBasicResourceCertificateDetails = "AzureActiveDirectory" + // AuthTypeResourceCertificateDetails ... + AuthTypeResourceCertificateDetails AuthTypeBasicResourceCertificateDetails = "ResourceCertificateDetails" +) + +// SkuName enumerates the values for sku name. +type SkuName string + +const ( + // RS0 ... + RS0 SkuName = "RS0" + // Standard ... + Standard SkuName = "Standard" +) + +// TriggerType enumerates the values for trigger type. +type TriggerType string + +const ( + // ForcedUpgrade ... + ForcedUpgrade TriggerType = "ForcedUpgrade" + // UserTriggered ... + UserTriggered TriggerType = "UserTriggered" +) + +// UsagesUnit enumerates the values for usages unit. +type UsagesUnit string + +const ( + // Bytes ... + Bytes UsagesUnit = "Bytes" + // BytesPerSecond ... + BytesPerSecond UsagesUnit = "BytesPerSecond" + // Count ... + Count UsagesUnit = "Count" + // CountPerSecond ... + CountPerSecond UsagesUnit = "CountPerSecond" + // Percent ... + Percent UsagesUnit = "Percent" + // Seconds ... + Seconds UsagesUnit = "Seconds" +) + +// VaultUpgradeState enumerates the values for vault upgrade state. +type VaultUpgradeState string + +const ( + // Failed ... + Failed VaultUpgradeState = "Failed" + // InProgress ... + InProgress VaultUpgradeState = "InProgress" + // Unknown ... + Unknown VaultUpgradeState = "Unknown" + // Upgraded ... + Upgraded VaultUpgradeState = "Upgraded" +) + +// CertificateRequest details of the certificate to be uploaded to the vault. +type CertificateRequest struct { + Properties *RawCertificateData `json:"properties,omitempty"` +} + +// ClientDiscoveryDisplay localized display information of an operation. +type ClientDiscoveryDisplay struct { + // Provider - Name of the provider for display purposes + Provider *string `json:"provider,omitempty"` + // Resource - ResourceType for which this Operation can be performed. + Resource *string `json:"resource,omitempty"` + // Operation - Operations Name itself. + Operation *string `json:"operation,omitempty"` + // Description - Description of the operation having details of what operation is about. + Description *string `json:"description,omitempty"` +} + +// ClientDiscoveryForLogSpecification class to represent shoebox log specification in json client discovery. +type ClientDiscoveryForLogSpecification struct { + // Name - Name of the log. + Name *string `json:"name,omitempty"` + // DisplayName - Localized display name + DisplayName *string `json:"displayName,omitempty"` + // BlobDuration - Blobs created in customer storage account per hour + BlobDuration *string `json:"blobDuration,omitempty"` +} + +// ClientDiscoveryForProperties class to represent shoebox properties in json client discovery. +type ClientDiscoveryForProperties struct { + // ServiceSpecification - Operation properties. + ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"` +} + +// ClientDiscoveryForServiceSpecification class to represent shoebox service specification in json client +// discovery. +type ClientDiscoveryForServiceSpecification struct { + // LogSpecifications - List of log specifications of this operation. + LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"` +} + +// ClientDiscoveryResponse operations List response which contains list of available APIs. +type ClientDiscoveryResponse struct { + autorest.Response `json:"-"` + // Value - List of available operationss. + Value *[]ClientDiscoveryValueForSingleAPI `json:"value,omitempty"` + // NextLink - Link to the next chunk of the response + NextLink *string `json:"nextLink,omitempty"` +} + +// ClientDiscoveryResponseIterator provides access to a complete listing of ClientDiscoveryValueForSingleAPI +// values. +type ClientDiscoveryResponseIterator struct { + i int + page ClientDiscoveryResponsePage +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ClientDiscoveryResponseIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err := iter.page.Next() + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ClientDiscoveryResponseIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ClientDiscoveryResponseIterator) Response() ClientDiscoveryResponse { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ClientDiscoveryResponseIterator) Value() ClientDiscoveryValueForSingleAPI { + if !iter.page.NotDone() { + return ClientDiscoveryValueForSingleAPI{} + } + return iter.page.Values()[iter.i] +} + +// IsEmpty returns true if the ListResult contains no values. +func (cdr ClientDiscoveryResponse) IsEmpty() bool { + return cdr.Value == nil || len(*cdr.Value) == 0 +} + +// clientDiscoveryResponsePreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (cdr ClientDiscoveryResponse) clientDiscoveryResponsePreparer() (*http.Request, error) { + if cdr.NextLink == nil || len(to.String(cdr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(cdr.NextLink))) +} + +// ClientDiscoveryResponsePage contains a page of ClientDiscoveryValueForSingleAPI values. +type ClientDiscoveryResponsePage struct { + fn func(ClientDiscoveryResponse) (ClientDiscoveryResponse, error) + cdr ClientDiscoveryResponse +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ClientDiscoveryResponsePage) Next() error { + next, err := page.fn(page.cdr) + if err != nil { + return err + } + page.cdr = next + return nil +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ClientDiscoveryResponsePage) NotDone() bool { + return !page.cdr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ClientDiscoveryResponsePage) Response() ClientDiscoveryResponse { + return page.cdr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ClientDiscoveryResponsePage) Values() []ClientDiscoveryValueForSingleAPI { + if page.cdr.IsEmpty() { + return nil + } + return *page.cdr.Value +} + +// ClientDiscoveryValueForSingleAPI available operation details. +type ClientDiscoveryValueForSingleAPI struct { + // Name - Name of the Operation. + Name *string `json:"name,omitempty"` + // Display - Contains the localized display information for this particular operation + Display *ClientDiscoveryDisplay `json:"display,omitempty"` + // Origin - The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX + Origin *string `json:"origin,omitempty"` + // Properties - ShoeBox properties for the given operation. + Properties *ClientDiscoveryForProperties `json:"properties,omitempty"` +} + +// JobsSummary summary of the replication job data for this vault. +type JobsSummary struct { + // FailedJobs - Count of failed jobs. + FailedJobs *int32 `json:"failedJobs,omitempty"` + // SuspendedJobs - Count of suspended jobs. + SuspendedJobs *int32 `json:"suspendedJobs,omitempty"` + // InProgressJobs - Count of in-progress jobs. + InProgressJobs *int32 `json:"inProgressJobs,omitempty"` +} + +// MonitoringSummary summary of the replication monitoring data for this vault. +type MonitoringSummary struct { + // UnHealthyVMCount - Count of unhealthy VMs. + UnHealthyVMCount *int32 `json:"unHealthyVmCount,omitempty"` + // UnHealthyProviderCount - Count of unhealthy replication providers. + UnHealthyProviderCount *int32 `json:"unHealthyProviderCount,omitempty"` + // EventsCount - Count of all critical warnings. + EventsCount *int32 `json:"eventsCount,omitempty"` + // DeprecatedProviderCount - Count of all deprecated recovery service providers. + DeprecatedProviderCount *int32 `json:"deprecatedProviderCount,omitempty"` + // SupportedProviderCount - Count of all the supported recovery service providers. + SupportedProviderCount *int32 `json:"supportedProviderCount,omitempty"` + // UnsupportedProviderCount - Count of all the unsupported recovery service providers. + UnsupportedProviderCount *int32 `json:"unsupportedProviderCount,omitempty"` +} + +// NameInfo the name of usage. +type NameInfo struct { + // Value - Value of usage. + Value *string `json:"value,omitempty"` + // LocalizedValue - Localized value of usage. + LocalizedValue *string `json:"localizedValue,omitempty"` +} + +// PatchTrackedResource tracked resource with location. +type PatchTrackedResource struct { + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ID - Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for PatchTrackedResource. +func (ptr PatchTrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ptr.Location != nil { + objectMap["location"] = ptr.Location + } + if ptr.Tags != nil { + objectMap["tags"] = ptr.Tags + } + if ptr.ID != nil { + objectMap["id"] = ptr.ID + } + if ptr.Name != nil { + objectMap["name"] = ptr.Name + } + if ptr.Type != nil { + objectMap["type"] = ptr.Type + } + if ptr.ETag != nil { + objectMap["eTag"] = ptr.ETag + } + return json.Marshal(objectMap) +} + +// PatchVault patch Resource information, as returned by the resource provider. +type PatchVault struct { + Properties *VaultProperties `json:"properties,omitempty"` + Sku *Sku `json:"sku,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ID - Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for PatchVault. +func (pv PatchVault) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pv.Properties != nil { + objectMap["properties"] = pv.Properties + } + if pv.Sku != nil { + objectMap["sku"] = pv.Sku + } + if pv.Location != nil { + objectMap["location"] = pv.Location + } + if pv.Tags != nil { + objectMap["tags"] = pv.Tags + } + if pv.ID != nil { + objectMap["id"] = pv.ID + } + if pv.Name != nil { + objectMap["name"] = pv.Name + } + if pv.Type != nil { + objectMap["type"] = pv.Type + } + if pv.ETag != nil { + objectMap["eTag"] = pv.ETag + } + return json.Marshal(objectMap) +} + +// RawCertificateData raw certificate data. +type RawCertificateData struct { + // AuthType - Specifies the authentication type. Possible values include: 'Invalid', 'ACS', 'AAD', 'AccessControlService', 'AzureActiveDirectory' + AuthType AuthType `json:"authType,omitempty"` + // Certificate - The base64 encoded certificate raw data string + Certificate *[]byte `json:"certificate,omitempty"` +} + +// ReplicationUsage replication usages of a vault. +type ReplicationUsage struct { + // MonitoringSummary - Summary of the replication monitoring data for this vault. + MonitoringSummary *MonitoringSummary `json:"monitoringSummary,omitempty"` + // JobsSummary - Summary of the replication jobs data for this vault. + JobsSummary *JobsSummary `json:"jobsSummary,omitempty"` + // ProtectedItemCount - Number of replication protected items for this vault. + ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"` + // RecoveryPlanCount - Number of replication recovery plans for this vault. + RecoveryPlanCount *int32 `json:"recoveryPlanCount,omitempty"` + // RegisteredServersCount - Number of servers registered to this vault. + RegisteredServersCount *int32 `json:"registeredServersCount,omitempty"` + // RecoveryServicesProviderAuthType - The authentication type of recovery service providers in the vault. + RecoveryServicesProviderAuthType *int32 `json:"recoveryServicesProviderAuthType,omitempty"` +} + +// ReplicationUsageList replication usages for vault. +type ReplicationUsageList struct { + autorest.Response `json:"-"` + // Value - The list of replication usages for the given vault. + Value *[]ReplicationUsage `json:"value,omitempty"` +} + +// Resource ARM Resource. +type Resource struct { + // ID - Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// ResourceCertificateAndAadDetails certificate details representing the Vault credentials for AAD. +type ResourceCertificateAndAadDetails struct { + // AadAuthority - AAD tenant authority. + AadAuthority *string `json:"aadAuthority,omitempty"` + // AadTenantID - AAD tenant Id. + AadTenantID *string `json:"aadTenantId,omitempty"` + // ServicePrincipalClientID - AAD service principal clientId. + ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"` + // ServicePrincipalObjectID - AAD service principal ObjectId. + ServicePrincipalObjectID *string `json:"servicePrincipalObjectId,omitempty"` + // AzureManagementEndpointAudience - Azure Management Endpoint Audience. + AzureManagementEndpointAudience *string `json:"azureManagementEndpointAudience,omitempty"` + // Certificate - The base64 encoded certificate raw data string. + Certificate *[]byte `json:"certificate,omitempty"` + // FriendlyName - Certificate friendlyname. + FriendlyName *string `json:"friendlyName,omitempty"` + // Issuer - Certificate issuer. + Issuer *string `json:"issuer,omitempty"` + // ResourceID - Resource ID of the vault. + ResourceID *int64 `json:"resourceId,omitempty"` + // Subject - Certificate Subject Name. + Subject *string `json:"subject,omitempty"` + // Thumbprint - Certificate thumbprint. + Thumbprint *string `json:"thumbprint,omitempty"` + // ValidFrom - Certificate Validity start Date time. + ValidFrom *date.Time `json:"validFrom,omitempty"` + // ValidTo - Certificate Validity End Date time. + ValidTo *date.Time `json:"validTo,omitempty"` + // AuthType - Possible values include: 'AuthTypeResourceCertificateDetails', 'AuthTypeAzureActiveDirectory', 'AuthTypeAccessControlService' + AuthType AuthTypeBasicResourceCertificateDetails `json:"authType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceCertificateAndAadDetails. +func (rcaad ResourceCertificateAndAadDetails) MarshalJSON() ([]byte, error) { + rcaad.AuthType = AuthTypeAzureActiveDirectory + objectMap := make(map[string]interface{}) + if rcaad.AadAuthority != nil { + objectMap["aadAuthority"] = rcaad.AadAuthority + } + if rcaad.AadTenantID != nil { + objectMap["aadTenantId"] = rcaad.AadTenantID + } + if rcaad.ServicePrincipalClientID != nil { + objectMap["servicePrincipalClientId"] = rcaad.ServicePrincipalClientID + } + if rcaad.ServicePrincipalObjectID != nil { + objectMap["servicePrincipalObjectId"] = rcaad.ServicePrincipalObjectID + } + if rcaad.AzureManagementEndpointAudience != nil { + objectMap["azureManagementEndpointAudience"] = rcaad.AzureManagementEndpointAudience + } + if rcaad.Certificate != nil { + objectMap["certificate"] = rcaad.Certificate + } + if rcaad.FriendlyName != nil { + objectMap["friendlyName"] = rcaad.FriendlyName + } + if rcaad.Issuer != nil { + objectMap["issuer"] = rcaad.Issuer + } + if rcaad.ResourceID != nil { + objectMap["resourceId"] = rcaad.ResourceID + } + if rcaad.Subject != nil { + objectMap["subject"] = rcaad.Subject + } + if rcaad.Thumbprint != nil { + objectMap["thumbprint"] = rcaad.Thumbprint + } + if rcaad.ValidFrom != nil { + objectMap["validFrom"] = rcaad.ValidFrom + } + if rcaad.ValidTo != nil { + objectMap["validTo"] = rcaad.ValidTo + } + objectMap["authType"] = rcaad.AuthType + return json.Marshal(objectMap) +} + +// AsResourceCertificateAndAadDetails is the BasicResourceCertificateDetails implementation for ResourceCertificateAndAadDetails. +func (rcaad ResourceCertificateAndAadDetails) AsResourceCertificateAndAadDetails() (*ResourceCertificateAndAadDetails, bool) { + return &rcaad, true +} + +// AsResourceCertificateAndAcsDetails is the BasicResourceCertificateDetails implementation for ResourceCertificateAndAadDetails. +func (rcaad ResourceCertificateAndAadDetails) AsResourceCertificateAndAcsDetails() (*ResourceCertificateAndAcsDetails, bool) { + return nil, false +} + +// AsResourceCertificateDetails is the BasicResourceCertificateDetails implementation for ResourceCertificateAndAadDetails. +func (rcaad ResourceCertificateAndAadDetails) AsResourceCertificateDetails() (*ResourceCertificateDetails, bool) { + return nil, false +} + +// AsBasicResourceCertificateDetails is the BasicResourceCertificateDetails implementation for ResourceCertificateAndAadDetails. +func (rcaad ResourceCertificateAndAadDetails) AsBasicResourceCertificateDetails() (BasicResourceCertificateDetails, bool) { + return &rcaad, true +} + +// ResourceCertificateAndAcsDetails certificate details representing the Vault credentials for ACS. +type ResourceCertificateAndAcsDetails struct { + // GlobalAcsNamespace - ACS namespace name - tenant for our service. + GlobalAcsNamespace *string `json:"globalAcsNamespace,omitempty"` + // GlobalAcsHostName - Acs mgmt host name to connect to. + GlobalAcsHostName *string `json:"globalAcsHostName,omitempty"` + // GlobalAcsRPRealm - Global ACS namespace RP realm. + GlobalAcsRPRealm *string `json:"globalAcsRPRealm,omitempty"` + // Certificate - The base64 encoded certificate raw data string. + Certificate *[]byte `json:"certificate,omitempty"` + // FriendlyName - Certificate friendlyname. + FriendlyName *string `json:"friendlyName,omitempty"` + // Issuer - Certificate issuer. + Issuer *string `json:"issuer,omitempty"` + // ResourceID - Resource ID of the vault. + ResourceID *int64 `json:"resourceId,omitempty"` + // Subject - Certificate Subject Name. + Subject *string `json:"subject,omitempty"` + // Thumbprint - Certificate thumbprint. + Thumbprint *string `json:"thumbprint,omitempty"` + // ValidFrom - Certificate Validity start Date time. + ValidFrom *date.Time `json:"validFrom,omitempty"` + // ValidTo - Certificate Validity End Date time. + ValidTo *date.Time `json:"validTo,omitempty"` + // AuthType - Possible values include: 'AuthTypeResourceCertificateDetails', 'AuthTypeAzureActiveDirectory', 'AuthTypeAccessControlService' + AuthType AuthTypeBasicResourceCertificateDetails `json:"authType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceCertificateAndAcsDetails. +func (rcaad ResourceCertificateAndAcsDetails) MarshalJSON() ([]byte, error) { + rcaad.AuthType = AuthTypeAccessControlService + objectMap := make(map[string]interface{}) + if rcaad.GlobalAcsNamespace != nil { + objectMap["globalAcsNamespace"] = rcaad.GlobalAcsNamespace + } + if rcaad.GlobalAcsHostName != nil { + objectMap["globalAcsHostName"] = rcaad.GlobalAcsHostName + } + if rcaad.GlobalAcsRPRealm != nil { + objectMap["globalAcsRPRealm"] = rcaad.GlobalAcsRPRealm + } + if rcaad.Certificate != nil { + objectMap["certificate"] = rcaad.Certificate + } + if rcaad.FriendlyName != nil { + objectMap["friendlyName"] = rcaad.FriendlyName + } + if rcaad.Issuer != nil { + objectMap["issuer"] = rcaad.Issuer + } + if rcaad.ResourceID != nil { + objectMap["resourceId"] = rcaad.ResourceID + } + if rcaad.Subject != nil { + objectMap["subject"] = rcaad.Subject + } + if rcaad.Thumbprint != nil { + objectMap["thumbprint"] = rcaad.Thumbprint + } + if rcaad.ValidFrom != nil { + objectMap["validFrom"] = rcaad.ValidFrom + } + if rcaad.ValidTo != nil { + objectMap["validTo"] = rcaad.ValidTo + } + objectMap["authType"] = rcaad.AuthType + return json.Marshal(objectMap) +} + +// AsResourceCertificateAndAadDetails is the BasicResourceCertificateDetails implementation for ResourceCertificateAndAcsDetails. +func (rcaad ResourceCertificateAndAcsDetails) AsResourceCertificateAndAadDetails() (*ResourceCertificateAndAadDetails, bool) { + return nil, false +} + +// AsResourceCertificateAndAcsDetails is the BasicResourceCertificateDetails implementation for ResourceCertificateAndAcsDetails. +func (rcaad ResourceCertificateAndAcsDetails) AsResourceCertificateAndAcsDetails() (*ResourceCertificateAndAcsDetails, bool) { + return &rcaad, true +} + +// AsResourceCertificateDetails is the BasicResourceCertificateDetails implementation for ResourceCertificateAndAcsDetails. +func (rcaad ResourceCertificateAndAcsDetails) AsResourceCertificateDetails() (*ResourceCertificateDetails, bool) { + return nil, false +} + +// AsBasicResourceCertificateDetails is the BasicResourceCertificateDetails implementation for ResourceCertificateAndAcsDetails. +func (rcaad ResourceCertificateAndAcsDetails) AsBasicResourceCertificateDetails() (BasicResourceCertificateDetails, bool) { + return &rcaad, true +} + +// BasicResourceCertificateDetails certificate details representing the Vault credentials. +type BasicResourceCertificateDetails interface { + AsResourceCertificateAndAadDetails() (*ResourceCertificateAndAadDetails, bool) + AsResourceCertificateAndAcsDetails() (*ResourceCertificateAndAcsDetails, bool) + AsResourceCertificateDetails() (*ResourceCertificateDetails, bool) +} + +// ResourceCertificateDetails certificate details representing the Vault credentials. +type ResourceCertificateDetails struct { + // Certificate - The base64 encoded certificate raw data string. + Certificate *[]byte `json:"certificate,omitempty"` + // FriendlyName - Certificate friendlyname. + FriendlyName *string `json:"friendlyName,omitempty"` + // Issuer - Certificate issuer. + Issuer *string `json:"issuer,omitempty"` + // ResourceID - Resource ID of the vault. + ResourceID *int64 `json:"resourceId,omitempty"` + // Subject - Certificate Subject Name. + Subject *string `json:"subject,omitempty"` + // Thumbprint - Certificate thumbprint. + Thumbprint *string `json:"thumbprint,omitempty"` + // ValidFrom - Certificate Validity start Date time. + ValidFrom *date.Time `json:"validFrom,omitempty"` + // ValidTo - Certificate Validity End Date time. + ValidTo *date.Time `json:"validTo,omitempty"` + // AuthType - Possible values include: 'AuthTypeResourceCertificateDetails', 'AuthTypeAzureActiveDirectory', 'AuthTypeAccessControlService' + AuthType AuthTypeBasicResourceCertificateDetails `json:"authType,omitempty"` +} + +func unmarshalBasicResourceCertificateDetails(body []byte) (BasicResourceCertificateDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["authType"] { + case string(AuthTypeAzureActiveDirectory): + var rcaad ResourceCertificateAndAadDetails + err := json.Unmarshal(body, &rcaad) + return rcaad, err + case string(AuthTypeAccessControlService): + var rcaad ResourceCertificateAndAcsDetails + err := json.Unmarshal(body, &rcaad) + return rcaad, err + default: + var rcd ResourceCertificateDetails + err := json.Unmarshal(body, &rcd) + return rcd, err + } +} +func unmarshalBasicResourceCertificateDetailsArray(body []byte) ([]BasicResourceCertificateDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rcdArray := make([]BasicResourceCertificateDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rcd, err := unmarshalBasicResourceCertificateDetails(*rawMessage) + if err != nil { + return nil, err + } + rcdArray[index] = rcd + } + return rcdArray, nil +} + +// MarshalJSON is the custom marshaler for ResourceCertificateDetails. +func (rcd ResourceCertificateDetails) MarshalJSON() ([]byte, error) { + rcd.AuthType = AuthTypeResourceCertificateDetails + objectMap := make(map[string]interface{}) + if rcd.Certificate != nil { + objectMap["certificate"] = rcd.Certificate + } + if rcd.FriendlyName != nil { + objectMap["friendlyName"] = rcd.FriendlyName + } + if rcd.Issuer != nil { + objectMap["issuer"] = rcd.Issuer + } + if rcd.ResourceID != nil { + objectMap["resourceId"] = rcd.ResourceID + } + if rcd.Subject != nil { + objectMap["subject"] = rcd.Subject + } + if rcd.Thumbprint != nil { + objectMap["thumbprint"] = rcd.Thumbprint + } + if rcd.ValidFrom != nil { + objectMap["validFrom"] = rcd.ValidFrom + } + if rcd.ValidTo != nil { + objectMap["validTo"] = rcd.ValidTo + } + objectMap["authType"] = rcd.AuthType + return json.Marshal(objectMap) +} + +// AsResourceCertificateAndAadDetails is the BasicResourceCertificateDetails implementation for ResourceCertificateDetails. +func (rcd ResourceCertificateDetails) AsResourceCertificateAndAadDetails() (*ResourceCertificateAndAadDetails, bool) { + return nil, false +} + +// AsResourceCertificateAndAcsDetails is the BasicResourceCertificateDetails implementation for ResourceCertificateDetails. +func (rcd ResourceCertificateDetails) AsResourceCertificateAndAcsDetails() (*ResourceCertificateAndAcsDetails, bool) { + return nil, false +} + +// AsResourceCertificateDetails is the BasicResourceCertificateDetails implementation for ResourceCertificateDetails. +func (rcd ResourceCertificateDetails) AsResourceCertificateDetails() (*ResourceCertificateDetails, bool) { + return &rcd, true +} + +// AsBasicResourceCertificateDetails is the BasicResourceCertificateDetails implementation for ResourceCertificateDetails. +func (rcd ResourceCertificateDetails) AsBasicResourceCertificateDetails() (BasicResourceCertificateDetails, bool) { + return &rcd, true +} + +// Sku identifies the unique system identifier for each Azure resource. +type Sku struct { + // Name - The Sku name. Possible values include: 'Standard', 'RS0' + Name SkuName `json:"name,omitempty"` +} + +// TrackedResource tracked resource with location. +type TrackedResource struct { + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ID - Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for TrackedResource. +func (tr TrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tr.Location != nil { + objectMap["location"] = tr.Location + } + if tr.Tags != nil { + objectMap["tags"] = tr.Tags + } + if tr.ID != nil { + objectMap["id"] = tr.ID + } + if tr.Name != nil { + objectMap["name"] = tr.Name + } + if tr.Type != nil { + objectMap["type"] = tr.Type + } + if tr.ETag != nil { + objectMap["eTag"] = tr.ETag + } + return json.Marshal(objectMap) +} + +// UpgradeDetails details for upgrading vault. +type UpgradeDetails struct { + // OperationID - ID of the vault upgrade operation. + OperationID *string `json:"operationId,omitempty"` + // StartTimeUtc - UTC time at which the upgrade operation has started. + StartTimeUtc *date.Time `json:"startTimeUtc,omitempty"` + // LastUpdatedTimeUtc - UTC time at which the upgrade operation status was last updated. + LastUpdatedTimeUtc *date.Time `json:"lastUpdatedTimeUtc,omitempty"` + // EndTimeUtc - UTC time at which the upgrade operation has ended. + EndTimeUtc *date.Time `json:"endTimeUtc,omitempty"` + // Status - Status of the vault upgrade operation. Possible values include: 'Unknown', 'InProgress', 'Upgraded', 'Failed' + Status VaultUpgradeState `json:"status,omitempty"` + // Message - Message to the user containing information about the upgrade operation. + Message *string `json:"message,omitempty"` + // TriggerType - The way the vault upgradation was triggered. Possible values include: 'UserTriggered', 'ForcedUpgrade' + TriggerType TriggerType `json:"triggerType,omitempty"` + // UpgradedResourceID - Resource ID of the upgraded vault. + UpgradedResourceID *string `json:"upgradedResourceId,omitempty"` + // PreviousResourceID - Resource ID of the vault before the upgrade. + PreviousResourceID *string `json:"previousResourceId,omitempty"` +} + +// Vault resource information, as returned by the resource provider. +type Vault struct { + autorest.Response `json:"-"` + Properties *VaultProperties `json:"properties,omitempty"` + Sku *Sku `json:"sku,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ID - Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for Vault. +func (vVar Vault) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vVar.Properties != nil { + objectMap["properties"] = vVar.Properties + } + if vVar.Sku != nil { + objectMap["sku"] = vVar.Sku + } + if vVar.Location != nil { + objectMap["location"] = vVar.Location + } + if vVar.Tags != nil { + objectMap["tags"] = vVar.Tags + } + if vVar.ID != nil { + objectMap["id"] = vVar.ID + } + if vVar.Name != nil { + objectMap["name"] = vVar.Name + } + if vVar.Type != nil { + objectMap["type"] = vVar.Type + } + if vVar.ETag != nil { + objectMap["eTag"] = vVar.ETag + } + return json.Marshal(objectMap) +} + +// VaultCertificateResponse certificate corresponding to a vault that can be used by clients to register themselves +// with the vault. +type VaultCertificateResponse struct { + autorest.Response `json:"-"` + // Name - Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // ID - Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + Properties BasicResourceCertificateDetails `json:"properties,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for VaultCertificateResponse struct. +func (vcr *VaultCertificateResponse) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vcr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vcr.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vcr.ID = &ID + } + case "properties": + if v != nil { + properties, err := unmarshalBasicResourceCertificateDetails(*v) + if err != nil { + return err + } + vcr.Properties = properties + } + } + } + + return nil +} + +// VaultExtendedInfo vault extended information. +type VaultExtendedInfo struct { + // IntegrityKey - Integrity key. + IntegrityKey *string `json:"integrityKey,omitempty"` + // EncryptionKey - Encryption key. + EncryptionKey *string `json:"encryptionKey,omitempty"` + // EncryptionKeyThumbprint - Encryption key thumbprint. + EncryptionKeyThumbprint *string `json:"encryptionKeyThumbprint,omitempty"` + // Algorithm - Algorithm for Vault ExtendedInfo + Algorithm *string `json:"algorithm,omitempty"` +} + +// VaultExtendedInfoResource vault extended information. +type VaultExtendedInfoResource struct { + autorest.Response `json:"-"` + *VaultExtendedInfo `json:"properties,omitempty"` + // ID - Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for VaultExtendedInfoResource struct. +func (veir *VaultExtendedInfoResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var vaultExtendedInfo VaultExtendedInfo + err = json.Unmarshal(*v, &vaultExtendedInfo) + if err != nil { + return err + } + veir.VaultExtendedInfo = &vaultExtendedInfo + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + veir.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + veir.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + veir.Type = &typeVar + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + veir.ETag = &eTag + } + } + } + + return nil +} + +// VaultList the response model for a list of Vaults. +type VaultList struct { + autorest.Response `json:"-"` + Value *[]Vault `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// VaultListIterator provides access to a complete listing of Vault values. +type VaultListIterator struct { + i int + page VaultListPage +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *VaultListIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err := iter.page.Next() + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VaultListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter VaultListIterator) Response() VaultList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter VaultListIterator) Value() Vault { + if !iter.page.NotDone() { + return Vault{} + } + return iter.page.Values()[iter.i] +} + +// IsEmpty returns true if the ListResult contains no values. +func (vl VaultList) IsEmpty() bool { + return vl.Value == nil || len(*vl.Value) == 0 +} + +// vaultListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vl VaultList) vaultListPreparer() (*http.Request, error) { + if vl.NextLink == nil || len(to.String(vl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vl.NextLink))) +} + +// VaultListPage contains a page of Vault values. +type VaultListPage struct { + fn func(VaultList) (VaultList, error) + vl VaultList +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *VaultListPage) Next() error { + next, err := page.fn(page.vl) + if err != nil { + return err + } + page.vl = next + return nil +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VaultListPage) NotDone() bool { + return !page.vl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VaultListPage) Response() VaultList { + return page.vl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VaultListPage) Values() []Vault { + if page.vl.IsEmpty() { + return nil + } + return *page.vl.Value +} + +// VaultProperties properties of the vault. +type VaultProperties struct { + // ProvisioningState - Provisioning State. + ProvisioningState *string `json:"provisioningState,omitempty"` + UpgradeDetails *UpgradeDetails `json:"upgradeDetails,omitempty"` +} + +// VaultUsage usages of a vault. +type VaultUsage struct { + // Unit - Unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + Unit UsagesUnit `json:"unit,omitempty"` + // QuotaPeriod - Quota period of usage. + QuotaPeriod *string `json:"quotaPeriod,omitempty"` + // NextResetTime - Next reset time of usage. + NextResetTime *date.Time `json:"nextResetTime,omitempty"` + // CurrentValue - Current value of usage. + CurrentValue *int64 `json:"currentValue,omitempty"` + // Limit - Limit of usage. + Limit *int64 `json:"limit,omitempty"` + // Name - Name of usage. + Name *NameInfo `json:"name,omitempty"` +} + +// VaultUsageList usage for vault. +type VaultUsageList struct { + autorest.Response `json:"-"` + // Value - The list of usages for the given vault. + Value *[]VaultUsage `json:"value,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/operations.go new file mode 100644 index 000000000000..33cc200f0112 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/operations.go @@ -0,0 +1,126 @@ +package recoveryservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// OperationsClient is the recovery Services Client +type OperationsClient struct { + BaseClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// 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. +func (client OperationsClient) List(ctx context.Context) (result ClientDiscoveryResponsePage, err error) { + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.cdr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.OperationsClient", "List", resp, "Failure sending request") + return + } + + result.cdr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2016-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.RecoveryServices/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result ClientDiscoveryResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client OperationsClient) listNextResults(lastResults ClientDiscoveryResponse) (result ClientDiscoveryResponse, err error) { + req, err := lastResults.clientDiscoveryResponsePreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "recoveryservices.OperationsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "recoveryservices.OperationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.OperationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client OperationsClient) ListComplete(ctx context.Context) (result ClientDiscoveryResponseIterator, err error) { + result.page, err = client.List(ctx) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/registeredidentities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/registeredidentities.go new file mode 100644 index 000000000000..fbcb373245b1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/registeredidentities.go @@ -0,0 +1,107 @@ +package recoveryservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// RegisteredIdentitiesClient is the recovery Services Client +type RegisteredIdentitiesClient struct { + BaseClient +} + +// NewRegisteredIdentitiesClient creates an instance of the RegisteredIdentitiesClient client. +func NewRegisteredIdentitiesClient(subscriptionID string) RegisteredIdentitiesClient { + return NewRegisteredIdentitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRegisteredIdentitiesClientWithBaseURI creates an instance of the RegisteredIdentitiesClient client. +func NewRegisteredIdentitiesClientWithBaseURI(baseURI string, subscriptionID string) RegisteredIdentitiesClient { + return RegisteredIdentitiesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Delete unregisters the given container from your 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. identityName is name of the protection container to unregister. +func (client RegisteredIdentitiesClient) Delete(ctx context.Context, resourceGroupName string, vaultName string, identityName string) (result autorest.Response, err error) { + req, err := client.DeletePreparer(ctx, resourceGroupName, vaultName, identityName) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.RegisteredIdentitiesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "recoveryservices.RegisteredIdentitiesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.RegisteredIdentitiesClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client RegisteredIdentitiesClient) DeletePreparer(ctx context.Context, resourceGroupName string, vaultName string, identityName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "identityName": autorest.Encode("path", identityName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/registeredIdentities/{identityName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client RegisteredIdentitiesClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client RegisteredIdentitiesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/replicationusages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/replicationusages.go new file mode 100644 index 000000000000..49a1080905de --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/replicationusages.go @@ -0,0 +1,107 @@ +package recoveryservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ReplicationUsagesClient is the recovery Services Client +type ReplicationUsagesClient struct { + BaseClient +} + +// NewReplicationUsagesClient creates an instance of the ReplicationUsagesClient client. +func NewReplicationUsagesClient(subscriptionID string) ReplicationUsagesClient { + return NewReplicationUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewReplicationUsagesClientWithBaseURI creates an instance of the ReplicationUsagesClient client. +func NewReplicationUsagesClientWithBaseURI(baseURI string, subscriptionID string) ReplicationUsagesClient { + return ReplicationUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List fetches the replication usages of the 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. +func (client ReplicationUsagesClient) List(ctx context.Context, resourceGroupName string, vaultName string) (result ReplicationUsageList, err error) { + req, err := client.ListPreparer(ctx, resourceGroupName, vaultName) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.ReplicationUsagesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.ReplicationUsagesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.ReplicationUsagesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationUsagesClient) ListPreparer(ctx context.Context, resourceGroupName string, vaultName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-06-01" + 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/vaults/{vaultName}/replicationUsages", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationUsagesClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationUsagesClient) ListResponder(resp *http.Response) (result ReplicationUsageList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/usages.go new file mode 100644 index 000000000000..ab0ffa61edbc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/usages.go @@ -0,0 +1,107 @@ +package recoveryservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// UsagesClient is the recovery Services Client +type UsagesClient struct { + BaseClient +} + +// NewUsagesClient creates an instance of the UsagesClient client. +func NewUsagesClient(subscriptionID string) UsagesClient { + return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesClient { + return UsagesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListByVaults fetches the usages of the 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. +func (client UsagesClient) ListByVaults(ctx context.Context, resourceGroupName string, vaultName string) (result VaultUsageList, err error) { + req, err := client.ListByVaultsPreparer(ctx, resourceGroupName, vaultName) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.UsagesClient", "ListByVaults", nil, "Failure preparing request") + return + } + + resp, err := client.ListByVaultsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.UsagesClient", "ListByVaults", resp, "Failure sending request") + return + } + + result, err = client.ListByVaultsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.UsagesClient", "ListByVaults", resp, "Failure responding to request") + } + + return +} + +// ListByVaultsPreparer prepares the ListByVaults request. +func (client UsagesClient) ListByVaultsPreparer(ctx context.Context, resourceGroupName string, vaultName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-06-01" + 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/vaults/{vaultName}/usages", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByVaultsSender sends the ListByVaults request. The method will close the +// http.Response Body if it receives an error. +func (client UsagesClient) ListByVaultsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListByVaultsResponder handles the response to the ListByVaults request. The method always +// closes the http.Response Body. +func (client UsagesClient) ListByVaultsResponder(resp *http.Response) (result VaultUsageList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaultcertificates.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaultcertificates.go new file mode 100644 index 000000000000..74a6dcec6591 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaultcertificates.go @@ -0,0 +1,111 @@ +package recoveryservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// VaultCertificatesClient is the recovery Services Client +type VaultCertificatesClient struct { + BaseClient +} + +// NewVaultCertificatesClient creates an instance of the VaultCertificatesClient client. +func NewVaultCertificatesClient(subscriptionID string) VaultCertificatesClient { + return NewVaultCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVaultCertificatesClientWithBaseURI creates an instance of the VaultCertificatesClient client. +func NewVaultCertificatesClientWithBaseURI(baseURI string, subscriptionID string) VaultCertificatesClient { + return VaultCertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create uploads a certificate for a resource. +// +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is +// the name of the recovery services vault. certificateName is certificate friendly name. certificateRequest is +// input parameters for uploading the vault certificate. +func (client VaultCertificatesClient) Create(ctx context.Context, resourceGroupName string, vaultName string, certificateName string, certificateRequest CertificateRequest) (result VaultCertificateResponse, err error) { + req, err := client.CreatePreparer(ctx, resourceGroupName, vaultName, certificateName, certificateRequest) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultCertificatesClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.VaultCertificatesClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultCertificatesClient", "Create", resp, "Failure responding to request") + } + + return +} + +// CreatePreparer prepares the Create request. +func (client VaultCertificatesClient) CreatePreparer(ctx context.Context, resourceGroupName string, vaultName string, certificateName string, certificateRequest CertificateRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "certificateName": autorest.Encode("path", certificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/certificates/{certificateName}", pathParameters), + autorest.WithJSON(certificateRequest), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client VaultCertificatesClient) CreateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client VaultCertificatesClient) CreateResponder(resp *http.Response) (result VaultCertificateResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaultextendedinfo.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaultextendedinfo.go new file mode 100644 index 000000000000..26f645789681 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaultextendedinfo.go @@ -0,0 +1,245 @@ +package recoveryservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// VaultExtendedInfoClient is the recovery Services Client +type VaultExtendedInfoClient struct { + BaseClient +} + +// NewVaultExtendedInfoClient creates an instance of the VaultExtendedInfoClient client. +func NewVaultExtendedInfoClient(subscriptionID string) VaultExtendedInfoClient { + return NewVaultExtendedInfoClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVaultExtendedInfoClientWithBaseURI creates an instance of the VaultExtendedInfoClient client. +func NewVaultExtendedInfoClientWithBaseURI(baseURI string, subscriptionID string) VaultExtendedInfoClient { + return VaultExtendedInfoClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create vault extended info. +// +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is +// the name of the recovery services vault. resourceResourceExtendedInfoDetails is details of ResourceExtendedInfo +func (client VaultExtendedInfoClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, resourceResourceExtendedInfoDetails VaultExtendedInfoResource) (result VaultExtendedInfoResource, err error) { + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, vaultName, resourceResourceExtendedInfoDetails) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultExtendedInfoClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.VaultExtendedInfoClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultExtendedInfoClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VaultExtendedInfoClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, vaultName string, resourceResourceExtendedInfoDetails VaultExtendedInfoResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo", pathParameters), + autorest.WithJSON(resourceResourceExtendedInfoDetails), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client VaultExtendedInfoClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VaultExtendedInfoClient) CreateOrUpdateResponder(resp *http.Response) (result VaultExtendedInfoResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get the vault extended info. +// +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is +// the name of the recovery services vault. +func (client VaultExtendedInfoClient) Get(ctx context.Context, resourceGroupName string, vaultName string) (result VaultExtendedInfoResource, err error) { + req, err := client.GetPreparer(ctx, resourceGroupName, vaultName) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultExtendedInfoClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.VaultExtendedInfoClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultExtendedInfoClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client VaultExtendedInfoClient) GetPreparer(ctx context.Context, resourceGroupName string, vaultName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-06-01" + 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/vaults/{vaultName}/extendedInformation/vaultExtendedInfo", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client VaultExtendedInfoClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VaultExtendedInfoClient) GetResponder(resp *http.Response) (result VaultExtendedInfoResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update update vault extended info. +// +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is +// the name of the recovery services vault. resourceResourceExtendedInfoDetails is details of ResourceExtendedInfo +func (client VaultExtendedInfoClient) Update(ctx context.Context, resourceGroupName string, vaultName string, resourceResourceExtendedInfoDetails VaultExtendedInfoResource) (result VaultExtendedInfoResource, err error) { + req, err := client.UpdatePreparer(ctx, resourceGroupName, vaultName, resourceResourceExtendedInfoDetails) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultExtendedInfoClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.VaultExtendedInfoClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultExtendedInfoClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client VaultExtendedInfoClient) UpdatePreparer(ctx context.Context, resourceGroupName string, vaultName string, resourceResourceExtendedInfoDetails VaultExtendedInfoResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo", pathParameters), + autorest.WithJSON(resourceResourceExtendedInfoDetails), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client VaultExtendedInfoClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client VaultExtendedInfoClient) UpdateResponder(resp *http.Response) (result VaultExtendedInfoResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaults.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaults.go new file mode 100644 index 000000000000..313d79df3033 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaults.go @@ -0,0 +1,494 @@ +package recoveryservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// VaultsClient is the recovery Services Client +type VaultsClient struct { + BaseClient +} + +// NewVaultsClient creates an instance of the VaultsClient client. +func NewVaultsClient(subscriptionID string) VaultsClient { + return NewVaultsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVaultsClientWithBaseURI creates an instance of the VaultsClient client. +func NewVaultsClientWithBaseURI(baseURI string, subscriptionID string) VaultsClient { + return VaultsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a 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. vault is recovery Services Vault to be created. +func (client VaultsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, vault Vault) (result Vault, err error) { + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, vaultName, vault) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VaultsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, vaultName string, vault Vault) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}", pathParameters), + autorest.WithJSON(vault), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client VaultsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VaultsClient) CreateOrUpdateResponder(resp *http.Response) (result Vault, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a 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. +func (client VaultsClient) Delete(ctx context.Context, resourceGroupName string, vaultName string) (result autorest.Response, err error) { + req, err := client.DeletePreparer(ctx, resourceGroupName, vaultName) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VaultsClient) DeletePreparer(ctx context.Context, resourceGroupName string, vaultName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client VaultsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VaultsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get the Vault details. +// +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is +// the name of the recovery services vault. +func (client VaultsClient) Get(ctx context.Context, resourceGroupName string, vaultName string) (result Vault, err error) { + req, err := client.GetPreparer(ctx, resourceGroupName, vaultName) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client VaultsClient) GetPreparer(ctx context.Context, resourceGroupName string, vaultName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-06-01" + 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/vaults/{vaultName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client VaultsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VaultsClient) GetResponder(resp *http.Response) (result Vault, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup retrieve a list of Vaults. +// +// resourceGroupName is the name of the resource group where the recovery services vault is present. +func (client VaultsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result VaultListPage, err error) { + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.vl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.vl, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client VaultsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-06-01" + 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/vaults", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client VaultsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VaultsClient) ListByResourceGroupResponder(resp *http.Response) (result VaultList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client VaultsClient) listByResourceGroupNextResults(lastResults VaultList) (result VaultList, err error) { + req, err := lastResults.vaultListPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client VaultsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result VaultListIterator, err error) { + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) + return +} + +// ListBySubscriptionID fetches all the resources of the specified type in the subscription. +func (client VaultsClient) ListBySubscriptionID(ctx context.Context) (result VaultListPage, err error) { + result.fn = client.listBySubscriptionIDNextResults + req, err := client.ListBySubscriptionIDPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "ListBySubscriptionID", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionIDSender(req) + if err != nil { + result.vl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "ListBySubscriptionID", resp, "Failure sending request") + return + } + + result.vl, err = client.ListBySubscriptionIDResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "ListBySubscriptionID", resp, "Failure responding to request") + } + + return +} + +// ListBySubscriptionIDPreparer prepares the ListBySubscriptionID request. +func (client VaultsClient) ListBySubscriptionIDPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/vaults", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBySubscriptionIDSender sends the ListBySubscriptionID request. The method will close the +// http.Response Body if it receives an error. +func (client VaultsClient) ListBySubscriptionIDSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySubscriptionIDResponder handles the response to the ListBySubscriptionID request. The method always +// closes the http.Response Body. +func (client VaultsClient) ListBySubscriptionIDResponder(resp *http.Response) (result VaultList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBySubscriptionIDNextResults retrieves the next set of results, if any. +func (client VaultsClient) listBySubscriptionIDNextResults(lastResults VaultList) (result VaultList, err error) { + req, err := lastResults.vaultListPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "listBySubscriptionIDNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListBySubscriptionIDSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "listBySubscriptionIDNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionIDResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "listBySubscriptionIDNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionIDComplete enumerates all values, automatically crossing page boundaries as required. +func (client VaultsClient) ListBySubscriptionIDComplete(ctx context.Context) (result VaultListIterator, err error) { + result.page, err = client.ListBySubscriptionID(ctx) + return +} + +// Update updates the 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. vault is recovery Services Vault to be created. +func (client VaultsClient) Update(ctx context.Context, resourceGroupName string, vaultName string, vault PatchVault) (result Vault, err error) { + req, err := client.UpdatePreparer(ctx, resourceGroupName, vaultName, vault) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultsClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client VaultsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, vaultName string, vault PatchVault) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}", pathParameters), + autorest.WithJSON(vault), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client VaultsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client VaultsClient) UpdateResponder(resp *http.Response) (result Vault, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/version.go new file mode 100644 index 000000000000..a286fe2bb94a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices/version.go @@ -0,0 +1,30 @@ +package recoveryservices + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// 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/" + version.Number + " recoveryservices/2016-06-01" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go new file mode 100644 index 000000000000..8ebadee4bcf6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go @@ -0,0 +1,21 @@ +package version + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Number contains the semantic version of this SDK. +const Number = "v14.4.0" diff --git a/vendor/vendor.json b/vendor/vendor.json index 48b4f40ec7d5..8d00817ed503 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -170,6 +170,12 @@ "version": "v12.5.0-beta", "versionExact": "v12.5.0-beta" }, + { + "checksumSHA1": "5cQ2W+nQTAy+SbQRn10kpxlOd3M=", + "path": "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices", + "revision": "bbb570615c58626208d0a4af51ef2226aee6c729", + "revisionTime": "2018-03-14T22:57:36Z" + }, { "checksumSHA1": "09i0LjiY4GkYSRNObda25c1hsos=", "path": "github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2016-04-01/redis", @@ -266,6 +272,12 @@ "version": "v12.5.0-beta", "versionExact": "v12.5.0-beta" }, + { + "checksumSHA1": "uh/72Oapxt6GqeM0RLeI+D/6pVs=", + "path": "github.com/Azure/azure-sdk-for-go/version", + "revision": "bbb570615c58626208d0a4af51ef2226aee6c729", + "revisionTime": "2018-03-14T22:57:36Z" + }, { "checksumSHA1": "RzIYmvG1ReOud+kafFsZTDIZSK0=", "comment": "v9.7.0", diff --git a/website/azurerm.erb b/website/azurerm.erb index a9a407d38f0f..15e16b7c2672 100644 --- a/website/azurerm.erb +++ b/website/azurerm.erb @@ -87,6 +87,10 @@ azurerm_public_ips +