From 5907460564d357203acbc39b1d5e66bf38f05176 Mon Sep 17 00:00:00 2001 From: kt Date: Wed, 24 Jan 2024 16:47:02 -0800 Subject: [PATCH 1/6] azurerm_monitor_private_link_scoped_service - support for the access_mode block --- internal/services/monitor/client/client.go | 2 +- .../monitor_private_link_scope_resource.go | 146 +++++++++++++- ...onitor_private_link_scope_resource_test.go | 13 +- .../stream_analytics_job_resource.go | 1 - .../privatelinkscopesapis/README.md | 124 ++++++++++++ .../privatelinkscopesapis/client.go | 18 ++ .../privatelinkscopesapis/constants.go | 99 ++++++++++ .../id_privatelinkscope.go | 125 ++++++++++++ ...rivatelinkscopescreateorupdate_autorest.go | 69 +++++++ ...method_privatelinkscopesdelete_autorest.go | 78 ++++++++ .../method_privatelinkscopesget_autorest.go | 68 +++++++ .../method_privatelinkscopeslist_autorest.go | 187 ++++++++++++++++++ ...elinkscopeslistbyresourcegroup_autorest.go | 187 ++++++++++++++++++ ...od_privatelinkscopesupdatetags_autorest.go | 69 +++++++ .../model_accessmodesettings.go | 10 + .../model_accessmodesettingsexclusion.go | 10 + .../model_azuremonitorprivatelinkscope.go | 18 ++ ..._azuremonitorprivatelinkscopeproperties.go | 10 + .../model_privateendpoint.go | 8 + .../model_privateendpointconnection.go | 11 ++ ...del_privateendpointconnectionproperties.go | 10 + ...model_privatelinkserviceconnectionstate.go | 10 + .../model_tagsresource.go | 8 + .../privatelinkscopesapis/predicates.go | 32 +++ .../privatelinkscopesapis/version.go | 12 ++ vendor/modules.txt | 1 + ..._private_link_scoped_service.html.markdown | 25 +++ 27 files changed, 1347 insertions(+), 4 deletions(-) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/id_privatelinkscope.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopescreateorupdate_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesdelete_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesget_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopeslist_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopeslistbyresourcegroup_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesupdatetags_autorest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_accessmodesettings.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_accessmodesettingsexclusion.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_azuremonitorprivatelinkscope.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_azuremonitorprivatelinkscopeproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_privateendpoint.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_privateendpointconnection.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_privateendpointconnectionproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_privatelinkserviceconnectionstate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_tagsresource.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/predicates.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/version.go diff --git a/internal/services/monitor/client/client.go b/internal/services/monitor/client/client.go index 84c7684d0e3d..c4aedc4da87d 100644 --- a/internal/services/monitor/client/client.go +++ b/internal/services/monitor/client/client.go @@ -15,10 +15,10 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-03-01/metricalerts" scheduledqueryrules2018 "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-04-16/scheduledqueryrules" "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources" - "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis" "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2020-10-01/activitylogalertsapis" diagnosticSettingClient "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettings" diagnosticCategoryClient "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories" + "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis" "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-08-01/scheduledqueryrules" "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionendpoints" "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionruleassociations" diff --git a/internal/services/monitor/monitor_private_link_scope_resource.go b/internal/services/monitor/monitor_private_link_scope_resource.go index 9725fef35995..a24d329e7b8d 100644 --- a/internal/services/monitor/monitor_private_link_scope_resource.go +++ b/internal/services/monitor/monitor_private_link_scope_resource.go @@ -8,14 +8,16 @@ import ( "log" "time" + "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis" + "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/monitor/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -49,6 +51,69 @@ func resourceMonitorPrivateLinkScope() *pluginsdk.Resource { "resource_group_name": commonschema.ResourceGroupName(), + "access_mode": { + Type: pluginsdk.TypeList, + Optional: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "ingestion": { + Type: pluginsdk.TypeString, + Optional: true, + Default: string(privatelinkscopesapis.AccessModePrivateOnly), + ValidateFunc: validation.StringInSlice([]string{ + string(privatelinkscopesapis.AccessModeOpen), + string(privatelinkscopesapis.AccessModePrivateOnly), + }, false), + }, + + "query": { + Type: pluginsdk.TypeString, + Optional: true, + Default: string(privatelinkscopesapis.AccessModePrivateOnly), + ValidateFunc: validation.StringInSlice([]string{ + string(privatelinkscopesapis.AccessModeOpen), + string(privatelinkscopesapis.AccessModePrivateOnly), + }, false), + }, + + "exclusions": { + Type: pluginsdk.TypeList, + Optional: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "connection_name": { + Type: pluginsdk.TypeString, + Required: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "ingestion": { + Type: pluginsdk.TypeString, + Optional: true, + Default: string(privatelinkscopesapis.AccessModePrivateOnly), + ValidateFunc: validation.StringInSlice([]string{ + string(privatelinkscopesapis.AccessModeOpen), + string(privatelinkscopesapis.AccessModePrivateOnly), + }, false), + }, + + "query": { + Type: pluginsdk.TypeString, + Optional: true, + Default: string(privatelinkscopesapis.AccessModePrivateOnly), + ValidateFunc: validation.StringInSlice([]string{ + string(privatelinkscopesapis.AccessModeOpen), + string(privatelinkscopesapis.AccessModePrivateOnly), + }, false), + }, + }, + }, + }, + }, + }, + }, + "tags": tags.Schema(), }, } @@ -81,6 +146,9 @@ func resourceMonitorPrivateLinkScopeCreateUpdate(d *pluginsdk.ResourceData, meta parameters := privatelinkscopesapis.AzureMonitorPrivateLinkScope{ Location: "Global", Tags: utils.ExpandPtrMapStringString(d.Get("tags").(map[string]interface{})), + Properties: privatelinkscopesapis.AzureMonitorPrivateLinkScopeProperties{ + AccessModeSettings: expandMonitorPrivateLinkScopeAccessMode(d), + }, } if _, err := client.PrivateLinkScopesCreateOrUpdate(ctx, id, parameters); err != nil { @@ -119,6 +187,11 @@ func resourceMonitorPrivateLinkScopeRead(d *pluginsdk.ResourceData, meta interfa if err = d.Set("tags", utils.FlattenPtrMapStringString(model.Tags)); err != nil { return err } + + if err = d.Set("access_mode", flattenMonitorPrivateLinkScopeAccessMode(model.Properties.AccessModeSettings)); err != nil { + return err + } + } return nil @@ -141,3 +214,74 @@ func resourceMonitorPrivateLinkScopeDelete(d *pluginsdk.ResourceData, meta inter return nil } + +func expandMonitorPrivateLinkScopeAccessMode(d *pluginsdk.ResourceData) privatelinkscopesapis.AccessModeSettings { + input, ok := d.Get("job_storage_account").([]interface{}) + if input == nil || !ok { + return privatelinkscopesapis.AccessModeSettings{} + } + + v := input[0].(map[string]interface{}) + + action := privatelinkscopesapis.AccessModeSettings{ + Exclusions: expandMonitorPrivateLinkScopeExclusions(v["exclusions"].([]interface{})), + QueryAccessMode: privatelinkscopesapis.AccessMode(v["query"].(string)), + IngestionAccessMode: privatelinkscopesapis.AccessMode(v["ingestion"].(string)), + } + + return action +} + +func expandMonitorPrivateLinkScopeExclusions(i []interface{}) *[]privatelinkscopesapis.AccessModeSettingsExclusion { + if i == nil { + return nil + } + + exclusions := make([]privatelinkscopesapis.AccessModeSettingsExclusion, len(i)) + + for i, v := range i { + exclusion := v.(map[string]interface{}) + + exclusions[i] = privatelinkscopesapis.AccessModeSettingsExclusion{ + PrivateEndpointConnectionName: pointer.To(exclusion["connection_name"].(string)), + QueryAccessMode: pointer.To(privatelinkscopesapis.AccessMode(exclusion["query"].(string))), + IngestionAccessMode: pointer.To(privatelinkscopesapis.AccessMode(exclusion["ingestion"].(string))), + } + } + + return &exclusions +} + +func flattenMonitorPrivateLinkScopeAccessMode(accessModeSettings privatelinkscopesapis.AccessModeSettings) []map[string]interface{} { + if accessModeSettings == (privatelinkscopesapis.AccessModeSettings{}) { + return nil + } + + accessMode := make([]map[string]interface{}, 1) + + accessMode[0] = map[string]interface{}{ + "exclusions": flattenMonitorPrivateLinkScopeExclusions(accessModeSettings.Exclusions), + "query": accessModeSettings.QueryAccessMode, + "ingestion": accessModeSettings.IngestionAccessMode, + } + + return accessMode +} + +func flattenMonitorPrivateLinkScopeExclusions(exclusions *[]privatelinkscopesapis.AccessModeSettingsExclusion) []map[string]interface{} { + if exclusions == nil { + return nil + } + + exclusion := make([]map[string]interface{}, len(*exclusions)) + + for i, v := range *exclusions { + exclusion[i] = map[string]interface{}{ + "connection_name": v.PrivateEndpointConnectionName, + "query": v.QueryAccessMode, + "ingestion": v.IngestionAccessMode, + } + } + + return exclusion +} diff --git a/internal/services/monitor/monitor_private_link_scope_resource_test.go b/internal/services/monitor/monitor_private_link_scope_resource_test.go index d525ab82edcb..3f60e6bfab99 100644 --- a/internal/services/monitor/monitor_private_link_scope_resource_test.go +++ b/internal/services/monitor/monitor_private_link_scope_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis" + "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -146,6 +146,17 @@ resource "azurerm_monitor_private_link_scope" "test" { name = "acctest-AMPLS-%d" resource_group_name = azurerm_resource_group.test.name + access_mpde { + ingestion = "Open" + query = "Open" + exclusions { + connection_name = "connection" + + ingestion = "Open" + query = "Open" + } + } + tags = { ENV = "%s" } diff --git a/internal/services/streamanalytics/stream_analytics_job_resource.go b/internal/services/streamanalytics/stream_analytics_job_resource.go index fbd90226dea9..d6bf0bd8e326 100644 --- a/internal/services/streamanalytics/stream_analytics_job_resource.go +++ b/internal/services/streamanalytics/stream_analytics_job_resource.go @@ -540,7 +540,6 @@ func expandJobStorageAccount(input []interface{}) *streamingjobs.JobStorageAccou if input == nil { return nil } - v := input[0].(map[string]interface{}) authenticationMode := v["authentication_mode"].(string) accountName := v["account_name"].(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/README.md new file mode 100644 index 000000000000..dfe03f91d89e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/README.md @@ -0,0 +1,124 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis` Documentation + +The `privatelinkscopesapis` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2021-07-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis" +``` + + +### Client Initialization + +```go +client := privatelinkscopesapis.NewPrivateLinkScopesAPIsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PrivateLinkScopesAPIsClient.PrivateLinkScopesCreateOrUpdate` + +```go +ctx := context.TODO() +id := privatelinkscopesapis.NewPrivateLinkScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue") + +payload := privatelinkscopesapis.AzureMonitorPrivateLinkScope{ + // ... +} + + +read, err := client.PrivateLinkScopesCreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PrivateLinkScopesAPIsClient.PrivateLinkScopesDelete` + +```go +ctx := context.TODO() +id := privatelinkscopesapis.NewPrivateLinkScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue") + +if err := client.PrivateLinkScopesDeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `PrivateLinkScopesAPIsClient.PrivateLinkScopesGet` + +```go +ctx := context.TODO() +id := privatelinkscopesapis.NewPrivateLinkScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue") + +read, err := client.PrivateLinkScopesGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PrivateLinkScopesAPIsClient.PrivateLinkScopesList` + +```go +ctx := context.TODO() +id := privatelinkscopesapis.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.PrivateLinkScopesList(ctx, id)` can be used to do batched pagination +items, err := client.PrivateLinkScopesListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `PrivateLinkScopesAPIsClient.PrivateLinkScopesListByResourceGroup` + +```go +ctx := context.TODO() +id := privatelinkscopesapis.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.PrivateLinkScopesListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.PrivateLinkScopesListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `PrivateLinkScopesAPIsClient.PrivateLinkScopesUpdateTags` + +```go +ctx := context.TODO() +id := privatelinkscopesapis.NewPrivateLinkScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue") + +payload := privatelinkscopesapis.TagsResource{ + // ... +} + + +read, err := client.PrivateLinkScopesUpdateTags(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/client.go new file mode 100644 index 000000000000..bae899d1e53e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/client.go @@ -0,0 +1,18 @@ +package privatelinkscopesapis + +import "github.com/Azure/go-autorest/autorest" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkScopesAPIsClient struct { + Client autorest.Client + baseUri string +} + +func NewPrivateLinkScopesAPIsClientWithBaseURI(endpoint string) PrivateLinkScopesAPIsClient { + return PrivateLinkScopesAPIsClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/constants.go new file mode 100644 index 000000000000..80b32b949778 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/constants.go @@ -0,0 +1,99 @@ +package privatelinkscopesapis + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AccessMode string + +const ( + AccessModeOpen AccessMode = "Open" + AccessModePrivateOnly AccessMode = "PrivateOnly" +) + +func PossibleValuesForAccessMode() []string { + return []string{ + string(AccessModeOpen), + string(AccessModePrivateOnly), + } +} + +func parseAccessMode(input string) (*AccessMode, error) { + vals := map[string]AccessMode{ + "open": AccessModeOpen, + "privateonly": AccessModePrivateOnly, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AccessMode(input) + return &out, nil +} + +type PrivateEndpointConnectionProvisioningState string + +const ( + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" + PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" +) + +func PossibleValuesForPrivateEndpointConnectionProvisioningState() []string { + return []string{ + string(PrivateEndpointConnectionProvisioningStateCreating), + string(PrivateEndpointConnectionProvisioningStateDeleting), + string(PrivateEndpointConnectionProvisioningStateFailed), + string(PrivateEndpointConnectionProvisioningStateSucceeded), + } +} + +func parsePrivateEndpointConnectionProvisioningState(input string) (*PrivateEndpointConnectionProvisioningState, error) { + vals := map[string]PrivateEndpointConnectionProvisioningState{ + "creating": PrivateEndpointConnectionProvisioningStateCreating, + "deleting": PrivateEndpointConnectionProvisioningStateDeleting, + "failed": PrivateEndpointConnectionProvisioningStateFailed, + "succeeded": PrivateEndpointConnectionProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointConnectionProvisioningState(input) + return &out, nil +} + +type PrivateEndpointServiceConnectionStatus string + +const ( + PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" + PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" + PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" +) + +func PossibleValuesForPrivateEndpointServiceConnectionStatus() []string { + return []string{ + string(PrivateEndpointServiceConnectionStatusApproved), + string(PrivateEndpointServiceConnectionStatusPending), + string(PrivateEndpointServiceConnectionStatusRejected), + } +} + +func parsePrivateEndpointServiceConnectionStatus(input string) (*PrivateEndpointServiceConnectionStatus, error) { + vals := map[string]PrivateEndpointServiceConnectionStatus{ + "approved": PrivateEndpointServiceConnectionStatusApproved, + "pending": PrivateEndpointServiceConnectionStatusPending, + "rejected": PrivateEndpointServiceConnectionStatusRejected, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointServiceConnectionStatus(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/id_privatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/id_privatelinkscope.go new file mode 100644 index 000000000000..27eb723479ed --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/id_privatelinkscope.go @@ -0,0 +1,125 @@ +package privatelinkscopesapis + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &PrivateLinkScopeId{} + +// PrivateLinkScopeId is a struct representing the Resource ID for a Private Link Scope +type PrivateLinkScopeId struct { + SubscriptionId string + ResourceGroupName string + PrivateLinkScopeName string +} + +// NewPrivateLinkScopeID returns a new PrivateLinkScopeId struct +func NewPrivateLinkScopeID(subscriptionId string, resourceGroupName string, privateLinkScopeName string) PrivateLinkScopeId { + return PrivateLinkScopeId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + PrivateLinkScopeName: privateLinkScopeName, + } +} + +// ParsePrivateLinkScopeID parses 'input' into a PrivateLinkScopeId +func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { + parser := resourceids.NewParserFromResourceIdType(&PrivateLinkScopeId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PrivateLinkScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParsePrivateLinkScopeIDInsensitively parses 'input' case-insensitively into a PrivateLinkScopeId +// note: this method should only be used for API response data and not user input +func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, error) { + parser := resourceids.NewParserFromResourceIdType(&PrivateLinkScopeId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PrivateLinkScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateLinkScopeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.PrivateLinkScopeName, ok = input.Parsed["privateLinkScopeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", input) + } + + return nil +} + +// ValidatePrivateLinkScopeID checks that 'input' can be parsed as a Private Link Scope ID +func ValidatePrivateLinkScopeID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParsePrivateLinkScopeID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Private Link Scope ID +func (id PrivateLinkScopeId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Insights/privateLinkScopes/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateLinkScopeName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Private Link Scope ID +func (id PrivateLinkScopeId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftInsights", "Microsoft.Insights", "Microsoft.Insights"), + resourceids.StaticSegment("staticPrivateLinkScopes", "privateLinkScopes", "privateLinkScopes"), + resourceids.UserSpecifiedSegment("privateLinkScopeName", "privateLinkScopeValue"), + } +} + +// String returns a human-readable description of this Private Link Scope ID +func (id PrivateLinkScopeId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Private Link Scope Name: %q", id.PrivateLinkScopeName), + } + return fmt.Sprintf("Private Link Scope (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopescreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopescreateorupdate_autorest.go new file mode 100644 index 000000000000..8386b5098efe --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopescreateorupdate_autorest.go @@ -0,0 +1,69 @@ +package privatelinkscopesapis + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkScopesCreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + Model *AzureMonitorPrivateLinkScope +} + +// PrivateLinkScopesCreateOrUpdate ... +func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesCreateOrUpdate(ctx context.Context, id PrivateLinkScopeId, input AzureMonitorPrivateLinkScope) (result PrivateLinkScopesCreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForPrivateLinkScopesCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesCreateOrUpdate", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesCreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForPrivateLinkScopesCreateOrUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesCreateOrUpdate", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForPrivateLinkScopesCreateOrUpdate prepares the PrivateLinkScopesCreateOrUpdate request. +func (c PrivateLinkScopesAPIsClient) preparerForPrivateLinkScopesCreateOrUpdate(ctx context.Context, id PrivateLinkScopeId, input AzureMonitorPrivateLinkScope) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForPrivateLinkScopesCreateOrUpdate handles the response to the PrivateLinkScopesCreateOrUpdate request. The method always +// closes the http.Response Body. +func (c PrivateLinkScopesAPIsClient) responderForPrivateLinkScopesCreateOrUpdate(resp *http.Response) (result PrivateLinkScopesCreateOrUpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesdelete_autorest.go new file mode 100644 index 000000000000..abe9c43ace23 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesdelete_autorest.go @@ -0,0 +1,78 @@ +package privatelinkscopesapis + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkScopesDeleteOperationResponse struct { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// PrivateLinkScopesDelete ... +func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesDelete(ctx context.Context, id PrivateLinkScopeId) (result PrivateLinkScopesDeleteOperationResponse, err error) { + req, err := c.preparerForPrivateLinkScopesDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesDelete", nil, "Failure preparing request") + return + } + + result, err = c.senderForPrivateLinkScopesDelete(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesDelete", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// PrivateLinkScopesDeleteThenPoll performs PrivateLinkScopesDelete then polls until it's completed +func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesDeleteThenPoll(ctx context.Context, id PrivateLinkScopeId) error { + result, err := c.PrivateLinkScopesDelete(ctx, id) + if err != nil { + return fmt.Errorf("performing PrivateLinkScopesDelete: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after PrivateLinkScopesDelete: %+v", err) + } + + return nil +} + +// preparerForPrivateLinkScopesDelete prepares the PrivateLinkScopesDelete request. +func (c PrivateLinkScopesAPIsClient) preparerForPrivateLinkScopesDelete(ctx context.Context, id PrivateLinkScopeId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForPrivateLinkScopesDelete sends the PrivateLinkScopesDelete request. The method will close the +// http.Response Body if it receives an error. +func (c PrivateLinkScopesAPIsClient) senderForPrivateLinkScopesDelete(ctx context.Context, req *http.Request) (future PrivateLinkScopesDeleteOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesget_autorest.go new file mode 100644 index 000000000000..958d8115f4d3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesget_autorest.go @@ -0,0 +1,68 @@ +package privatelinkscopesapis + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkScopesGetOperationResponse struct { + HttpResponse *http.Response + Model *AzureMonitorPrivateLinkScope +} + +// PrivateLinkScopesGet ... +func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesGet(ctx context.Context, id PrivateLinkScopeId) (result PrivateLinkScopesGetOperationResponse, err error) { + req, err := c.preparerForPrivateLinkScopesGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesGet", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesGet", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForPrivateLinkScopesGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesGet", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForPrivateLinkScopesGet prepares the PrivateLinkScopesGet request. +func (c PrivateLinkScopesAPIsClient) preparerForPrivateLinkScopesGet(ctx context.Context, id PrivateLinkScopeId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForPrivateLinkScopesGet handles the response to the PrivateLinkScopesGet request. The method always +// closes the http.Response Body. +func (c PrivateLinkScopesAPIsClient) responderForPrivateLinkScopesGet(resp *http.Response) (result PrivateLinkScopesGetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopeslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopeslist_autorest.go new file mode 100644 index 000000000000..dfa03935fa12 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopeslist_autorest.go @@ -0,0 +1,187 @@ +package privatelinkscopesapis + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkScopesListOperationResponse struct { + HttpResponse *http.Response + Model *[]AzureMonitorPrivateLinkScope + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (PrivateLinkScopesListOperationResponse, error) +} + +type PrivateLinkScopesListCompleteResult struct { + Items []AzureMonitorPrivateLinkScope +} + +func (r PrivateLinkScopesListOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r PrivateLinkScopesListOperationResponse) LoadMore(ctx context.Context) (resp PrivateLinkScopesListOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +// PrivateLinkScopesList ... +func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesList(ctx context.Context, id commonids.SubscriptionId) (resp PrivateLinkScopesListOperationResponse, err error) { + req, err := c.preparerForPrivateLinkScopesList(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesList", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesList", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForPrivateLinkScopesList(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesList", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForPrivateLinkScopesList prepares the PrivateLinkScopesList request. +func (c PrivateLinkScopesAPIsClient) preparerForPrivateLinkScopesList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.Insights/privateLinkScopes", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForPrivateLinkScopesListWithNextLink prepares the PrivateLinkScopesList request with the given nextLink token. +func (c PrivateLinkScopesAPIsClient) preparerForPrivateLinkScopesListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForPrivateLinkScopesList handles the response to the PrivateLinkScopesList request. The method always +// closes the http.Response Body. +func (c PrivateLinkScopesAPIsClient) responderForPrivateLinkScopesList(resp *http.Response) (result PrivateLinkScopesListOperationResponse, err error) { + type page struct { + Values []AzureMonitorPrivateLinkScope `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result PrivateLinkScopesListOperationResponse, err error) { + req, err := c.preparerForPrivateLinkScopesListWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesList", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesList", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForPrivateLinkScopesList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesList", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// PrivateLinkScopesListComplete retrieves all of the results into a single object +func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesListComplete(ctx context.Context, id commonids.SubscriptionId) (PrivateLinkScopesListCompleteResult, error) { + return c.PrivateLinkScopesListCompleteMatchingPredicate(ctx, id, AzureMonitorPrivateLinkScopeOperationPredicate{}) +} + +// PrivateLinkScopesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AzureMonitorPrivateLinkScopeOperationPredicate) (resp PrivateLinkScopesListCompleteResult, err error) { + items := make([]AzureMonitorPrivateLinkScope, 0) + + page, err := c.PrivateLinkScopesList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := PrivateLinkScopesListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopeslistbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopeslistbyresourcegroup_autorest.go new file mode 100644 index 000000000000..d632b169f234 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopeslistbyresourcegroup_autorest.go @@ -0,0 +1,187 @@ +package privatelinkscopesapis + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkScopesListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + Model *[]AzureMonitorPrivateLinkScope + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (PrivateLinkScopesListByResourceGroupOperationResponse, error) +} + +type PrivateLinkScopesListByResourceGroupCompleteResult struct { + Items []AzureMonitorPrivateLinkScope +} + +func (r PrivateLinkScopesListByResourceGroupOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r PrivateLinkScopesListByResourceGroupOperationResponse) LoadMore(ctx context.Context) (resp PrivateLinkScopesListByResourceGroupOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +// PrivateLinkScopesListByResourceGroup ... +func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (resp PrivateLinkScopesListByResourceGroupOperationResponse, err error) { + req, err := c.preparerForPrivateLinkScopesListByResourceGroup(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesListByResourceGroup", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesListByResourceGroup", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForPrivateLinkScopesListByResourceGroup(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesListByResourceGroup", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForPrivateLinkScopesListByResourceGroup prepares the PrivateLinkScopesListByResourceGroup request. +func (c PrivateLinkScopesAPIsClient) preparerForPrivateLinkScopesListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.Insights/privateLinkScopes", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForPrivateLinkScopesListByResourceGroupWithNextLink prepares the PrivateLinkScopesListByResourceGroup request with the given nextLink token. +func (c PrivateLinkScopesAPIsClient) preparerForPrivateLinkScopesListByResourceGroupWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForPrivateLinkScopesListByResourceGroup handles the response to the PrivateLinkScopesListByResourceGroup request. The method always +// closes the http.Response Body. +func (c PrivateLinkScopesAPIsClient) responderForPrivateLinkScopesListByResourceGroup(resp *http.Response) (result PrivateLinkScopesListByResourceGroupOperationResponse, err error) { + type page struct { + Values []AzureMonitorPrivateLinkScope `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result PrivateLinkScopesListByResourceGroupOperationResponse, err error) { + req, err := c.preparerForPrivateLinkScopesListByResourceGroupWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesListByResourceGroup", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesListByResourceGroup", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForPrivateLinkScopesListByResourceGroup(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesListByResourceGroup", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// PrivateLinkScopesListByResourceGroupComplete retrieves all of the results into a single object +func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (PrivateLinkScopesListByResourceGroupCompleteResult, error) { + return c.PrivateLinkScopesListByResourceGroupCompleteMatchingPredicate(ctx, id, AzureMonitorPrivateLinkScopeOperationPredicate{}) +} + +// PrivateLinkScopesListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AzureMonitorPrivateLinkScopeOperationPredicate) (resp PrivateLinkScopesListByResourceGroupCompleteResult, err error) { + items := make([]AzureMonitorPrivateLinkScope, 0) + + page, err := c.PrivateLinkScopesListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := PrivateLinkScopesListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesupdatetags_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesupdatetags_autorest.go new file mode 100644 index 000000000000..b3006a9e36e0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesupdatetags_autorest.go @@ -0,0 +1,69 @@ +package privatelinkscopesapis + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkScopesUpdateTagsOperationResponse struct { + HttpResponse *http.Response + Model *AzureMonitorPrivateLinkScope +} + +// PrivateLinkScopesUpdateTags ... +func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesUpdateTags(ctx context.Context, id PrivateLinkScopeId, input TagsResource) (result PrivateLinkScopesUpdateTagsOperationResponse, err error) { + req, err := c.preparerForPrivateLinkScopesUpdateTags(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesUpdateTags", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesUpdateTags", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForPrivateLinkScopesUpdateTags(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesUpdateTags", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForPrivateLinkScopesUpdateTags prepares the PrivateLinkScopesUpdateTags request. +func (c PrivateLinkScopesAPIsClient) preparerForPrivateLinkScopesUpdateTags(ctx context.Context, id PrivateLinkScopeId, input TagsResource) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForPrivateLinkScopesUpdateTags handles the response to the PrivateLinkScopesUpdateTags request. The method always +// closes the http.Response Body. +func (c PrivateLinkScopesAPIsClient) responderForPrivateLinkScopesUpdateTags(resp *http.Response) (result PrivateLinkScopesUpdateTagsOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_accessmodesettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_accessmodesettings.go new file mode 100644 index 000000000000..07ba24268a13 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_accessmodesettings.go @@ -0,0 +1,10 @@ +package privatelinkscopesapis + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AccessModeSettings struct { + Exclusions *[]AccessModeSettingsExclusion `json:"exclusions,omitempty"` + IngestionAccessMode AccessMode `json:"ingestionAccessMode"` + QueryAccessMode AccessMode `json:"queryAccessMode"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_accessmodesettingsexclusion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_accessmodesettingsexclusion.go new file mode 100644 index 000000000000..88d4c3105144 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_accessmodesettingsexclusion.go @@ -0,0 +1,10 @@ +package privatelinkscopesapis + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AccessModeSettingsExclusion struct { + IngestionAccessMode *AccessMode `json:"ingestionAccessMode,omitempty"` + PrivateEndpointConnectionName *string `json:"privateEndpointConnectionName,omitempty"` + QueryAccessMode *AccessMode `json:"queryAccessMode,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_azuremonitorprivatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_azuremonitorprivatelinkscope.go new file mode 100644 index 000000000000..7cba58daad2d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_azuremonitorprivatelinkscope.go @@ -0,0 +1,18 @@ +package privatelinkscopesapis + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMonitorPrivateLinkScope struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties AzureMonitorPrivateLinkScopeProperties `json:"properties"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_azuremonitorprivatelinkscopeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_azuremonitorprivatelinkscopeproperties.go new file mode 100644 index 000000000000..dfe3d8176dbf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_azuremonitorprivatelinkscopeproperties.go @@ -0,0 +1,10 @@ +package privatelinkscopesapis + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMonitorPrivateLinkScopeProperties struct { + AccessModeSettings AccessModeSettings `json:"accessModeSettings"` + PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_privateendpoint.go new file mode 100644 index 000000000000..dfd52c0bcc63 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_privateendpoint.go @@ -0,0 +1,8 @@ +package privatelinkscopesapis + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpoint struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_privateendpointconnection.go new file mode 100644 index 000000000000..a8f30352f0a3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_privateendpointconnection.go @@ -0,0 +1,11 @@ +package privatelinkscopesapis + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnection struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_privateendpointconnectionproperties.go new file mode 100644 index 000000000000..e02ccfddf479 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_privateendpointconnectionproperties.go @@ -0,0 +1,10 @@ +package privatelinkscopesapis + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionProperties struct { + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState"` + ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_privatelinkserviceconnectionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_privatelinkserviceconnectionstate.go new file mode 100644 index 000000000000..f292a48bd57b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_privatelinkserviceconnectionstate.go @@ -0,0 +1,10 @@ +package privatelinkscopesapis + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkServiceConnectionState struct { + ActionsRequired *string `json:"actionsRequired,omitempty"` + Description *string `json:"description,omitempty"` + Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_tagsresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_tagsresource.go new file mode 100644 index 000000000000..22f50e38146c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/model_tagsresource.go @@ -0,0 +1,8 @@ +package privatelinkscopesapis + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TagsResource struct { + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/predicates.go new file mode 100644 index 000000000000..627be525ecae --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/predicates.go @@ -0,0 +1,32 @@ +package privatelinkscopesapis + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMonitorPrivateLinkScopeOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p AzureMonitorPrivateLinkScopeOperationPredicate) Matches(input AzureMonitorPrivateLinkScope) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/version.go new file mode 100644 index 000000000000..e6c1b6f869f1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/version.go @@ -0,0 +1,12 @@ +package privatelinkscopesapis + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2021-07-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkscopesapis/%s", defaultApiVersion) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 595ea7a86342..58ec69fdf9d3 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -528,6 +528,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/p github.com/hashicorp/go-azure-sdk/resource-manager/insights/2020-10-01/activitylogalertsapis github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettings github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories +github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-08-01/scheduledqueryrules github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionendpoints github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionruleassociations diff --git a/website/docs/r/monitor_private_link_scoped_service.html.markdown b/website/docs/r/monitor_private_link_scoped_service.html.markdown index f2ff5617de7a..9d9714f7f07d 100644 --- a/website/docs/r/monitor_private_link_scoped_service.html.markdown +++ b/website/docs/r/monitor_private_link_scoped_service.html.markdown @@ -50,6 +50,31 @@ The following arguments are supported: * `linked_resource_id` - (Required) The ID of the linked resource. It must be the Log Analytics workspace or the Application Insights component or the Data Collection endpoint. Changing this forces a new resource to be created. +* `access_mode` - (Optional) One or more `access_mode` blocks as defined below.` + +--- + + +A `access_mode` block supports the following: + +* `ingestion` - (Optional) The ingestion access mode of the Azure Monitor Private Link Scoped Service. Possible values are `PrivateOnly` and `Open`. Defaults to `PrivateOnly`. + +* `query` - (Optional) The query access mode of the Azure Monitor Private Link Scoped Service. Possible values are `PrivateOnly` and `Open`. Defaults to `PrivateOnly`. + +* `exclusions` - (Optional) One or more `exclusions` blocks as defined below.` + + +--- + + +A `exclusions` block supports the following: + +* `connection_name` - (Required) The name of the connection to apply the access mode exclusion to. + +* `ingestion` - (Optional) The ingestion access mode of the Azure Monitor Private Link Scoped Service. Possible values are `PrivateOnly` and `Open`. Defaults to `PrivateOnly`. + +* `query` - (Optional) The query access mode of the Azure Monitor Private Link Scoped Service. Possible values are `PrivateOnly` and `Open`. Defaults to `PrivateOnly`. + ## Attributes Reference In addition to the Arguments listed above - the following Attributes are exported: From 0bc039f4be9a27b3f320abfd6ca8308c571e53d3 Mon Sep 17 00:00:00 2001 From: kt Date: Wed, 24 Jan 2024 16:58:23 -0800 Subject: [PATCH 2/6] go mod vendort; go mod tidy --- .../privatelinkscopesapis/README.md | 124 ------------ .../privatelinkscopesapis/client.go | 18 -- .../id_privatelinkscope.go | 125 ------------ ...rivatelinkscopescreateorupdate_autorest.go | 69 ------- ...method_privatelinkscopesdelete_autorest.go | 78 -------- .../method_privatelinkscopesget_autorest.go | 68 ------- .../method_privatelinkscopeslist_autorest.go | 187 ------------------ ...elinkscopeslistbyresourcegroup_autorest.go | 187 ------------------ ...od_privatelinkscopesupdatetags_autorest.go | 69 ------- .../model_azuremonitorprivatelinkscope.go | 13 -- ..._azuremonitorprivatelinkscopeproperties.go | 9 - .../model_privateendpointconnection.go | 11 -- ...del_privateendpointconnectionproperties.go | 10 - .../model_privateendpointproperty.go | 8 - ...ivatelinkserviceconnectionstateproperty.go | 10 - .../model_tagsresource.go | 8 - .../privatelinkscopesapis/predicates.go | 32 --- .../privatelinkscopesapis/version.go | 12 -- vendor/modules.txt | 1 - 19 files changed, 1039 deletions(-) delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/README.md delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/client.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/id_privatelinkscope.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopescreateorupdate_autorest.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesdelete_autorest.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesget_autorest.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopeslist_autorest.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopeslistbyresourcegroup_autorest.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesupdatetags_autorest.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_azuremonitorprivatelinkscope.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_azuremonitorprivatelinkscopeproperties.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_privateendpointconnection.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_privateendpointconnectionproperties.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_privateendpointproperty.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_privatelinkserviceconnectionstateproperty.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_tagsresource.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/predicates.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/version.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/README.md deleted file mode 100644 index ca359456156b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/README.md +++ /dev/null @@ -1,124 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis` Documentation - -The `privatelinkscopesapis` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2019-10-17-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis" -``` - - -### Client Initialization - -```go -client := privatelinkscopesapis.NewPrivateLinkScopesAPIsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PrivateLinkScopesAPIsClient.PrivateLinkScopesCreateOrUpdate` - -```go -ctx := context.TODO() -id := privatelinkscopesapis.NewPrivateLinkScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue") - -payload := privatelinkscopesapis.AzureMonitorPrivateLinkScope{ - // ... -} - - -read, err := client.PrivateLinkScopesCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PrivateLinkScopesAPIsClient.PrivateLinkScopesDelete` - -```go -ctx := context.TODO() -id := privatelinkscopesapis.NewPrivateLinkScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue") - -if err := client.PrivateLinkScopesDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateLinkScopesAPIsClient.PrivateLinkScopesGet` - -```go -ctx := context.TODO() -id := privatelinkscopesapis.NewPrivateLinkScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue") - -read, err := client.PrivateLinkScopesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PrivateLinkScopesAPIsClient.PrivateLinkScopesList` - -```go -ctx := context.TODO() -id := privatelinkscopesapis.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.PrivateLinkScopesList(ctx, id)` can be used to do batched pagination -items, err := client.PrivateLinkScopesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateLinkScopesAPIsClient.PrivateLinkScopesListByResourceGroup` - -```go -ctx := context.TODO() -id := privatelinkscopesapis.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.PrivateLinkScopesListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.PrivateLinkScopesListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateLinkScopesAPIsClient.PrivateLinkScopesUpdateTags` - -```go -ctx := context.TODO() -id := privatelinkscopesapis.NewPrivateLinkScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkScopeValue") - -payload := privatelinkscopesapis.TagsResource{ - // ... -} - - -read, err := client.PrivateLinkScopesUpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/client.go deleted file mode 100644 index bae899d1e53e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/client.go +++ /dev/null @@ -1,18 +0,0 @@ -package privatelinkscopesapis - -import "github.com/Azure/go-autorest/autorest" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkScopesAPIsClient struct { - Client autorest.Client - baseUri string -} - -func NewPrivateLinkScopesAPIsClientWithBaseURI(endpoint string) PrivateLinkScopesAPIsClient { - return PrivateLinkScopesAPIsClient{ - Client: autorest.NewClientWithUserAgent(userAgent()), - baseUri: endpoint, - } -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/id_privatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/id_privatelinkscope.go deleted file mode 100644 index 27eb723479ed..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/id_privatelinkscope.go +++ /dev/null @@ -1,125 +0,0 @@ -package privatelinkscopesapis - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = &PrivateLinkScopeId{} - -// PrivateLinkScopeId is a struct representing the Resource ID for a Private Link Scope -type PrivateLinkScopeId struct { - SubscriptionId string - ResourceGroupName string - PrivateLinkScopeName string -} - -// NewPrivateLinkScopeID returns a new PrivateLinkScopeId struct -func NewPrivateLinkScopeID(subscriptionId string, resourceGroupName string, privateLinkScopeName string) PrivateLinkScopeId { - return PrivateLinkScopeId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - PrivateLinkScopeName: privateLinkScopeName, - } -} - -// ParsePrivateLinkScopeID parses 'input' into a PrivateLinkScopeId -func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { - parser := resourceids.NewParserFromResourceIdType(&PrivateLinkScopeId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParsePrivateLinkScopeIDInsensitively parses 'input' case-insensitively into a PrivateLinkScopeId -// note: this method should only be used for API response data and not user input -func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, error) { - parser := resourceids.NewParserFromResourceIdType(&PrivateLinkScopeId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *PrivateLinkScopeId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.PrivateLinkScopeName, ok = input.Parsed["privateLinkScopeName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", input) - } - - return nil -} - -// ValidatePrivateLinkScopeID checks that 'input' can be parsed as a Private Link Scope ID -func ValidatePrivateLinkScopeID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePrivateLinkScopeID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Private Link Scope ID -func (id PrivateLinkScopeId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Insights/privateLinkScopes/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateLinkScopeName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Private Link Scope ID -func (id PrivateLinkScopeId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftInsights", "Microsoft.Insights", "Microsoft.Insights"), - resourceids.StaticSegment("staticPrivateLinkScopes", "privateLinkScopes", "privateLinkScopes"), - resourceids.UserSpecifiedSegment("privateLinkScopeName", "privateLinkScopeValue"), - } -} - -// String returns a human-readable description of this Private Link Scope ID -func (id PrivateLinkScopeId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Private Link Scope Name: %q", id.PrivateLinkScopeName), - } - return fmt.Sprintf("Private Link Scope (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopescreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopescreateorupdate_autorest.go deleted file mode 100644 index 8386b5098efe..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopescreateorupdate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package privatelinkscopesapis - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkScopesCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - Model *AzureMonitorPrivateLinkScope -} - -// PrivateLinkScopesCreateOrUpdate ... -func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesCreateOrUpdate(ctx context.Context, id PrivateLinkScopeId, input AzureMonitorPrivateLinkScope) (result PrivateLinkScopesCreateOrUpdateOperationResponse, err error) { - req, err := c.preparerForPrivateLinkScopesCreateOrUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesCreateOrUpdate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesCreateOrUpdate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForPrivateLinkScopesCreateOrUpdate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesCreateOrUpdate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForPrivateLinkScopesCreateOrUpdate prepares the PrivateLinkScopesCreateOrUpdate request. -func (c PrivateLinkScopesAPIsClient) preparerForPrivateLinkScopesCreateOrUpdate(ctx context.Context, id PrivateLinkScopeId, input AzureMonitorPrivateLinkScope) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForPrivateLinkScopesCreateOrUpdate handles the response to the PrivateLinkScopesCreateOrUpdate request. The method always -// closes the http.Response Body. -func (c PrivateLinkScopesAPIsClient) responderForPrivateLinkScopesCreateOrUpdate(resp *http.Response) (result PrivateLinkScopesCreateOrUpdateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesdelete_autorest.go deleted file mode 100644 index abe9c43ace23..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesdelete_autorest.go +++ /dev/null @@ -1,78 +0,0 @@ -package privatelinkscopesapis - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/polling" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkScopesDeleteOperationResponse struct { - Poller polling.LongRunningPoller - HttpResponse *http.Response -} - -// PrivateLinkScopesDelete ... -func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesDelete(ctx context.Context, id PrivateLinkScopeId) (result PrivateLinkScopesDeleteOperationResponse, err error) { - req, err := c.preparerForPrivateLinkScopesDelete(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesDelete", nil, "Failure preparing request") - return - } - - result, err = c.senderForPrivateLinkScopesDelete(ctx, req) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesDelete", result.HttpResponse, "Failure sending request") - return - } - - return -} - -// PrivateLinkScopesDeleteThenPoll performs PrivateLinkScopesDelete then polls until it's completed -func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesDeleteThenPoll(ctx context.Context, id PrivateLinkScopeId) error { - result, err := c.PrivateLinkScopesDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing PrivateLinkScopesDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(); err != nil { - return fmt.Errorf("polling after PrivateLinkScopesDelete: %+v", err) - } - - return nil -} - -// preparerForPrivateLinkScopesDelete prepares the PrivateLinkScopesDelete request. -func (c PrivateLinkScopesAPIsClient) preparerForPrivateLinkScopesDelete(ctx context.Context, id PrivateLinkScopeId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsDelete(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// senderForPrivateLinkScopesDelete sends the PrivateLinkScopesDelete request. The method will close the -// http.Response Body if it receives an error. -func (c PrivateLinkScopesAPIsClient) senderForPrivateLinkScopesDelete(ctx context.Context, req *http.Request) (future PrivateLinkScopesDeleteOperationResponse, err error) { - var resp *http.Response - resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - return - } - - future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesget_autorest.go deleted file mode 100644 index 958d8115f4d3..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesget_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package privatelinkscopesapis - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkScopesGetOperationResponse struct { - HttpResponse *http.Response - Model *AzureMonitorPrivateLinkScope -} - -// PrivateLinkScopesGet ... -func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesGet(ctx context.Context, id PrivateLinkScopeId) (result PrivateLinkScopesGetOperationResponse, err error) { - req, err := c.preparerForPrivateLinkScopesGet(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesGet", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesGet", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForPrivateLinkScopesGet(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesGet", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForPrivateLinkScopesGet prepares the PrivateLinkScopesGet request. -func (c PrivateLinkScopesAPIsClient) preparerForPrivateLinkScopesGet(ctx context.Context, id PrivateLinkScopeId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForPrivateLinkScopesGet handles the response to the PrivateLinkScopesGet request. The method always -// closes the http.Response Body. -func (c PrivateLinkScopesAPIsClient) responderForPrivateLinkScopesGet(resp *http.Response) (result PrivateLinkScopesGetOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopeslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopeslist_autorest.go deleted file mode 100644 index dfa03935fa12..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopeslist_autorest.go +++ /dev/null @@ -1,187 +0,0 @@ -package privatelinkscopesapis - -import ( - "context" - "fmt" - "net/http" - "net/url" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkScopesListOperationResponse struct { - HttpResponse *http.Response - Model *[]AzureMonitorPrivateLinkScope - - nextLink *string - nextPageFunc func(ctx context.Context, nextLink string) (PrivateLinkScopesListOperationResponse, error) -} - -type PrivateLinkScopesListCompleteResult struct { - Items []AzureMonitorPrivateLinkScope -} - -func (r PrivateLinkScopesListOperationResponse) HasMore() bool { - return r.nextLink != nil -} - -func (r PrivateLinkScopesListOperationResponse) LoadMore(ctx context.Context) (resp PrivateLinkScopesListOperationResponse, err error) { - if !r.HasMore() { - err = fmt.Errorf("no more pages returned") - return - } - return r.nextPageFunc(ctx, *r.nextLink) -} - -// PrivateLinkScopesList ... -func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesList(ctx context.Context, id commonids.SubscriptionId) (resp PrivateLinkScopesListOperationResponse, err error) { - req, err := c.preparerForPrivateLinkScopesList(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesList", nil, "Failure preparing request") - return - } - - resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesList", resp.HttpResponse, "Failure sending request") - return - } - - resp, err = c.responderForPrivateLinkScopesList(resp.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesList", resp.HttpResponse, "Failure responding to request") - return - } - return -} - -// preparerForPrivateLinkScopesList prepares the PrivateLinkScopesList request. -func (c PrivateLinkScopesAPIsClient) preparerForPrivateLinkScopesList(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.Insights/privateLinkScopes", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// preparerForPrivateLinkScopesListWithNextLink prepares the PrivateLinkScopesList request with the given nextLink token. -func (c PrivateLinkScopesAPIsClient) preparerForPrivateLinkScopesListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { - uri, err := url.Parse(nextLink) - if err != nil { - return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) - } - queryParameters := map[string]interface{}{} - for k, v := range uri.Query() { - if len(v) == 0 { - continue - } - val := v[0] - val = autorest.Encode("query", val) - queryParameters[k] = val - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(uri.Path), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForPrivateLinkScopesList handles the response to the PrivateLinkScopesList request. The method always -// closes the http.Response Body. -func (c PrivateLinkScopesAPIsClient) responderForPrivateLinkScopesList(resp *http.Response) (result PrivateLinkScopesListOperationResponse, err error) { - type page struct { - Values []AzureMonitorPrivateLinkScope `json:"value"` - NextLink *string `json:"nextLink"` - } - var respObj page - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&respObj), - autorest.ByClosing()) - result.HttpResponse = resp - result.Model = &respObj.Values - result.nextLink = respObj.NextLink - if respObj.NextLink != nil { - result.nextPageFunc = func(ctx context.Context, nextLink string) (result PrivateLinkScopesListOperationResponse, err error) { - req, err := c.preparerForPrivateLinkScopesListWithNextLink(ctx, nextLink) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesList", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesList", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForPrivateLinkScopesList(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesList", result.HttpResponse, "Failure responding to request") - return - } - - return - } - } - return -} - -// PrivateLinkScopesListComplete retrieves all of the results into a single object -func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesListComplete(ctx context.Context, id commonids.SubscriptionId) (PrivateLinkScopesListCompleteResult, error) { - return c.PrivateLinkScopesListCompleteMatchingPredicate(ctx, id, AzureMonitorPrivateLinkScopeOperationPredicate{}) -} - -// PrivateLinkScopesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AzureMonitorPrivateLinkScopeOperationPredicate) (resp PrivateLinkScopesListCompleteResult, err error) { - items := make([]AzureMonitorPrivateLinkScope, 0) - - page, err := c.PrivateLinkScopesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := PrivateLinkScopesListCompleteResult{ - Items: items, - } - return out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopeslistbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopeslistbyresourcegroup_autorest.go deleted file mode 100644 index d632b169f234..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopeslistbyresourcegroup_autorest.go +++ /dev/null @@ -1,187 +0,0 @@ -package privatelinkscopesapis - -import ( - "context" - "fmt" - "net/http" - "net/url" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkScopesListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - Model *[]AzureMonitorPrivateLinkScope - - nextLink *string - nextPageFunc func(ctx context.Context, nextLink string) (PrivateLinkScopesListByResourceGroupOperationResponse, error) -} - -type PrivateLinkScopesListByResourceGroupCompleteResult struct { - Items []AzureMonitorPrivateLinkScope -} - -func (r PrivateLinkScopesListByResourceGroupOperationResponse) HasMore() bool { - return r.nextLink != nil -} - -func (r PrivateLinkScopesListByResourceGroupOperationResponse) LoadMore(ctx context.Context) (resp PrivateLinkScopesListByResourceGroupOperationResponse, err error) { - if !r.HasMore() { - err = fmt.Errorf("no more pages returned") - return - } - return r.nextPageFunc(ctx, *r.nextLink) -} - -// PrivateLinkScopesListByResourceGroup ... -func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (resp PrivateLinkScopesListByResourceGroupOperationResponse, err error) { - req, err := c.preparerForPrivateLinkScopesListByResourceGroup(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesListByResourceGroup", nil, "Failure preparing request") - return - } - - resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesListByResourceGroup", resp.HttpResponse, "Failure sending request") - return - } - - resp, err = c.responderForPrivateLinkScopesListByResourceGroup(resp.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesListByResourceGroup", resp.HttpResponse, "Failure responding to request") - return - } - return -} - -// preparerForPrivateLinkScopesListByResourceGroup prepares the PrivateLinkScopesListByResourceGroup request. -func (c PrivateLinkScopesAPIsClient) preparerForPrivateLinkScopesListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.Insights/privateLinkScopes", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// preparerForPrivateLinkScopesListByResourceGroupWithNextLink prepares the PrivateLinkScopesListByResourceGroup request with the given nextLink token. -func (c PrivateLinkScopesAPIsClient) preparerForPrivateLinkScopesListByResourceGroupWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { - uri, err := url.Parse(nextLink) - if err != nil { - return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) - } - queryParameters := map[string]interface{}{} - for k, v := range uri.Query() { - if len(v) == 0 { - continue - } - val := v[0] - val = autorest.Encode("query", val) - queryParameters[k] = val - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(uri.Path), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForPrivateLinkScopesListByResourceGroup handles the response to the PrivateLinkScopesListByResourceGroup request. The method always -// closes the http.Response Body. -func (c PrivateLinkScopesAPIsClient) responderForPrivateLinkScopesListByResourceGroup(resp *http.Response) (result PrivateLinkScopesListByResourceGroupOperationResponse, err error) { - type page struct { - Values []AzureMonitorPrivateLinkScope `json:"value"` - NextLink *string `json:"nextLink"` - } - var respObj page - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&respObj), - autorest.ByClosing()) - result.HttpResponse = resp - result.Model = &respObj.Values - result.nextLink = respObj.NextLink - if respObj.NextLink != nil { - result.nextPageFunc = func(ctx context.Context, nextLink string) (result PrivateLinkScopesListByResourceGroupOperationResponse, err error) { - req, err := c.preparerForPrivateLinkScopesListByResourceGroupWithNextLink(ctx, nextLink) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesListByResourceGroup", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesListByResourceGroup", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForPrivateLinkScopesListByResourceGroup(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesListByResourceGroup", result.HttpResponse, "Failure responding to request") - return - } - - return - } - } - return -} - -// PrivateLinkScopesListByResourceGroupComplete retrieves all of the results into a single object -func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (PrivateLinkScopesListByResourceGroupCompleteResult, error) { - return c.PrivateLinkScopesListByResourceGroupCompleteMatchingPredicate(ctx, id, AzureMonitorPrivateLinkScopeOperationPredicate{}) -} - -// PrivateLinkScopesListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AzureMonitorPrivateLinkScopeOperationPredicate) (resp PrivateLinkScopesListByResourceGroupCompleteResult, err error) { - items := make([]AzureMonitorPrivateLinkScope, 0) - - page, err := c.PrivateLinkScopesListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := PrivateLinkScopesListByResourceGroupCompleteResult{ - Items: items, - } - return out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesupdatetags_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesupdatetags_autorest.go deleted file mode 100644 index b3006a9e36e0..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesupdatetags_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package privatelinkscopesapis - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkScopesUpdateTagsOperationResponse struct { - HttpResponse *http.Response - Model *AzureMonitorPrivateLinkScope -} - -// PrivateLinkScopesUpdateTags ... -func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesUpdateTags(ctx context.Context, id PrivateLinkScopeId, input TagsResource) (result PrivateLinkScopesUpdateTagsOperationResponse, err error) { - req, err := c.preparerForPrivateLinkScopesUpdateTags(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesUpdateTags", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesUpdateTags", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForPrivateLinkScopesUpdateTags(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "privatelinkscopesapis.PrivateLinkScopesAPIsClient", "PrivateLinkScopesUpdateTags", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForPrivateLinkScopesUpdateTags prepares the PrivateLinkScopesUpdateTags request. -func (c PrivateLinkScopesAPIsClient) preparerForPrivateLinkScopesUpdateTags(ctx context.Context, id PrivateLinkScopeId, input TagsResource) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForPrivateLinkScopesUpdateTags handles the response to the PrivateLinkScopesUpdateTags request. The method always -// closes the http.Response Body. -func (c PrivateLinkScopesAPIsClient) responderForPrivateLinkScopesUpdateTags(resp *http.Response) (result PrivateLinkScopesUpdateTagsOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_azuremonitorprivatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_azuremonitorprivatelinkscope.go deleted file mode 100644 index 05dc395af691..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_azuremonitorprivatelinkscope.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatelinkscopesapis - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureMonitorPrivateLinkScope struct { - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties AzureMonitorPrivateLinkScopeProperties `json:"properties"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_azuremonitorprivatelinkscopeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_azuremonitorprivatelinkscopeproperties.go deleted file mode 100644 index b67211c04c5c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_azuremonitorprivatelinkscopeproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkscopesapis - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureMonitorPrivateLinkScopeProperties struct { - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_privateendpointconnection.go deleted file mode 100644 index a8f30352f0a3..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_privateendpointconnection.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkscopesapis - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_privateendpointconnectionproperties.go deleted file mode 100644 index 5327d36f0a1c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkscopesapis - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_privateendpointproperty.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_privateendpointproperty.go deleted file mode 100644 index 2a7b2b2d0f8e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_privateendpointproperty.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkscopesapis - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperty struct { - Id *string `json:"id,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_privatelinkserviceconnectionstateproperty.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_privatelinkserviceconnectionstateproperty.go deleted file mode 100644 index d47e02eded87..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_privatelinkserviceconnectionstateproperty.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkscopesapis - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionStateProperty struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description string `json:"description"` - Status string `json:"status"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_tagsresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_tagsresource.go deleted file mode 100644 index 22f50e38146c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/model_tagsresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkscopesapis - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsResource struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/predicates.go deleted file mode 100644 index 627be525ecae..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package privatelinkscopesapis - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureMonitorPrivateLinkScopeOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p AzureMonitorPrivateLinkScopeOperationPredicate) Matches(input AzureMonitorPrivateLinkScope) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/version.go deleted file mode 100644 index 856718170aa7..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkscopesapis - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2019-10-17-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkscopesapis/%s", defaultApiVersion) -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 5d0f89fb3673..e1ebca090773 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -524,7 +524,6 @@ github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofil github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-03-01/metricalerts github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-04-16/scheduledqueryrules github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources -github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis github.com/hashicorp/go-azure-sdk/resource-manager/insights/2020-10-01/activitylogalertsapis github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettings github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories From ec1f9db6db3459dec7f42bc97ec608205b6c554a Mon Sep 17 00:00:00 2001 From: kt Date: Wed, 24 Jan 2024 17:04:03 -0800 Subject: [PATCH 3/6] only set access_mode when block exists --- .../services/monitor/monitor_private_link_scope_resource.go | 6 +++--- .../monitor/monitor_private_link_scope_resource_test.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/services/monitor/monitor_private_link_scope_resource.go b/internal/services/monitor/monitor_private_link_scope_resource.go index a24d329e7b8d..9d956684139a 100644 --- a/internal/services/monitor/monitor_private_link_scope_resource.go +++ b/internal/services/monitor/monitor_private_link_scope_resource.go @@ -146,11 +146,11 @@ func resourceMonitorPrivateLinkScopeCreateUpdate(d *pluginsdk.ResourceData, meta parameters := privatelinkscopesapis.AzureMonitorPrivateLinkScope{ Location: "Global", Tags: utils.ExpandPtrMapStringString(d.Get("tags").(map[string]interface{})), - Properties: privatelinkscopesapis.AzureMonitorPrivateLinkScopeProperties{ - AccessModeSettings: expandMonitorPrivateLinkScopeAccessMode(d), - }, } + if v, ok := d.GetOk("access_mode"); ok { + parameters.Properties.AccessModeSettings = expandMonitorPrivateLinkScopeAccessMode(v.(*pluginsdk.ResourceData)) + } if _, err := client.PrivateLinkScopesCreateOrUpdate(ctx, id, parameters); err != nil { return fmt.Errorf("creating/updating %s: %+v", id, err) } diff --git a/internal/services/monitor/monitor_private_link_scope_resource_test.go b/internal/services/monitor/monitor_private_link_scope_resource_test.go index 3f60e6bfab99..ab305e40e043 100644 --- a/internal/services/monitor/monitor_private_link_scope_resource_test.go +++ b/internal/services/monitor/monitor_private_link_scope_resource_test.go @@ -146,7 +146,7 @@ resource "azurerm_monitor_private_link_scope" "test" { name = "acctest-AMPLS-%d" resource_group_name = azurerm_resource_group.test.name - access_mpde { + access_mode { ingestion = "Open" query = "Open" exclusions { From 5368d1bb6b07db7f0fa3fb83b0692bb67593824b Mon Sep 17 00:00:00 2001 From: kt Date: Thu, 25 Jan 2024 09:11:51 -0800 Subject: [PATCH 4/6] minor fix --- .../monitor_private_link_scope_resource.go | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/internal/services/monitor/monitor_private_link_scope_resource.go b/internal/services/monitor/monitor_private_link_scope_resource.go index 9d956684139a..098a74f09601 100644 --- a/internal/services/monitor/monitor_private_link_scope_resource.go +++ b/internal/services/monitor/monitor_private_link_scope_resource.go @@ -253,19 +253,13 @@ func expandMonitorPrivateLinkScopeExclusions(i []interface{}) *[]privatelinkscop } func flattenMonitorPrivateLinkScopeAccessMode(accessModeSettings privatelinkscopesapis.AccessModeSettings) []map[string]interface{} { - if accessModeSettings == (privatelinkscopesapis.AccessModeSettings{}) { - return nil - } - - accessMode := make([]map[string]interface{}, 1) - - accessMode[0] = map[string]interface{}{ - "exclusions": flattenMonitorPrivateLinkScopeExclusions(accessModeSettings.Exclusions), - "query": accessModeSettings.QueryAccessMode, - "ingestion": accessModeSettings.IngestionAccessMode, + return []map[string]interface{}{ + { + "exclusions": flattenMonitorPrivateLinkScopeExclusions(accessModeSettings.Exclusions), + "query": accessModeSettings.QueryAccessMode, + "ingestion": accessModeSettings.IngestionAccessMode, + }, } - - return accessMode } func flattenMonitorPrivateLinkScopeExclusions(exclusions *[]privatelinkscopesapis.AccessModeSettingsExclusion) []map[string]interface{} { From 0e4f2de67991cf46f4507b9bca6b9fe1e6e8b0b2 Mon Sep 17 00:00:00 2001 From: kt Date: Mon, 26 Feb 2024 13:03:32 -0800 Subject: [PATCH 5/6] make terrafmt --- .../monitor_private_link_scope_resource.go | 7 +++---- .../monitor_private_link_scope_resource_test.go | 16 ++++++++-------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/internal/services/monitor/monitor_private_link_scope_resource.go b/internal/services/monitor/monitor_private_link_scope_resource.go index 098a74f09601..5972b0e1c23d 100644 --- a/internal/services/monitor/monitor_private_link_scope_resource.go +++ b/internal/services/monitor/monitor_private_link_scope_resource.go @@ -149,7 +149,7 @@ func resourceMonitorPrivateLinkScopeCreateUpdate(d *pluginsdk.ResourceData, meta } if v, ok := d.GetOk("access_mode"); ok { - parameters.Properties.AccessModeSettings = expandMonitorPrivateLinkScopeAccessMode(v.(*pluginsdk.ResourceData)) + parameters.Properties.AccessModeSettings = expandMonitorPrivateLinkScopeAccessMode(v.([]interface{})) } if _, err := client.PrivateLinkScopesCreateOrUpdate(ctx, id, parameters); err != nil { return fmt.Errorf("creating/updating %s: %+v", id, err) @@ -215,9 +215,8 @@ func resourceMonitorPrivateLinkScopeDelete(d *pluginsdk.ResourceData, meta inter return nil } -func expandMonitorPrivateLinkScopeAccessMode(d *pluginsdk.ResourceData) privatelinkscopesapis.AccessModeSettings { - input, ok := d.Get("job_storage_account").([]interface{}) - if input == nil || !ok { +func expandMonitorPrivateLinkScopeAccessMode(input []interface{}) privatelinkscopesapis.AccessModeSettings { + if input == nil { return privatelinkscopesapis.AccessModeSettings{} } diff --git a/internal/services/monitor/monitor_private_link_scope_resource_test.go b/internal/services/monitor/monitor_private_link_scope_resource_test.go index ab305e40e043..cb0084f18807 100644 --- a/internal/services/monitor/monitor_private_link_scope_resource_test.go +++ b/internal/services/monitor/monitor_private_link_scope_resource_test.go @@ -147,14 +147,14 @@ resource "azurerm_monitor_private_link_scope" "test" { resource_group_name = azurerm_resource_group.test.name access_mode { - ingestion = "Open" - query = "Open" - exclusions { - connection_name = "connection" - - ingestion = "Open" - query = "Open" - } + ingestion = "Open" + query = "Open" + exclusions { + connection_name = "connection" + + ingestion = "Open" + query = "Open" + } } tags = { From af700867a8a19f438c57f9348002847f2760ffaf Mon Sep 17 00:00:00 2001 From: kt Date: Mon, 26 Feb 2024 14:24:08 -0800 Subject: [PATCH 6/6] go mod fisxes --- .../insights/2021-07-01-preview/privatelinkscopesapis/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/README.md index dd0d1d6d2677..f6e04d93b747 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/README.md @@ -9,7 +9,7 @@ This readme covers example usages, but further information on [using this SDK ca ```go import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis" +import "github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis" ```