From 33a690dffa46b57fe2516ef2419a3402950fbca8 Mon Sep 17 00:00:00 2001 From: Matt Cadorette Date: Thu, 16 Nov 2023 16:31:10 -0500 Subject: [PATCH] fix: missing files in vendor (#593) --- .../api/cloud_accounts_azure_sidekick.go | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 vendor/github.com/lacework/go-sdk/api/cloud_accounts_azure_sidekick.go diff --git a/vendor/github.com/lacework/go-sdk/api/cloud_accounts_azure_sidekick.go b/vendor/github.com/lacework/go-sdk/api/cloud_accounts_azure_sidekick.go new file mode 100644 index 00000000..b82d7d4e --- /dev/null +++ b/vendor/github.com/lacework/go-sdk/api/cloud_accounts_azure_sidekick.go @@ -0,0 +1,88 @@ +// +// Author:: Ao Zhang () +// Copyright:: Copyright 2023, Lacework Inc. +// License:: Apache License, Version 2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License.n +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package api + +const ( + AzureSubscriptionIntegration string = "SUBSCRIPTION" + AzureTenantIntegration string = "TENANT" +) + +// GetAzureSidekick gets a single AzureSidekick integration matching the provided integration guid +func (svc *CloudAccountsService) GetAzureSidekick(guid string) ( + response AzureSidekickIntegrationResponse, + err error, +) { + err = svc.get(guid, &response) + return +} + +// CreateAzureSidekick creates an AzureSidekick Cloud Account integration +func (svc *CloudAccountsService) CreateAzureSidekick(data CloudAccount) ( + response AzureSidekickIntegrationResponse, + err error, +) { + err = svc.create(data, &response) + return +} + +// UpdateAzureSidekick updates a single AzureSidekick integration on the Lacework Server +func (svc *CloudAccountsService) UpdateAzureSidekick(data CloudAccount) ( + response AzureSidekickIntegrationResponse, + err error, +) { + err = svc.update(data.ID(), data, &response) + return +} + +type AzureSidekickIntegrationResponse struct { + Data V2AzureSidekickIntegration `json:"data"` +} + +type AzureSidekickToken struct { + ServerToken string `json:"serverToken"` + Uri string `json:"uri"` +} + +type V2AzureSidekickIntegration struct { + v2CommonIntegrationData + AzureSidekickToken `json:"serverToken"` + Data AzureSidekickData `json:"data"` +} + +type AzureSidekickData struct { + Credentials AzureSidekickCredentials `json:"credentials"` + IntegrationLevel string `json:"integrationLevel"` // SUBSCRIPTION or TENANT + ScanningSubscriptionId string `json:"scanningSubscriptionId"` + TenantId string `json:"tenantId"` + BlobContainerName string `json:"blobContainerName"` + ScanningResourceGroupName string `json:"scanningResourceGroupName"` + StorageAccountUrl string `json:"storageAccountUrl"` + SubscriptionsList string `json:"subscriptionsList,omitempty"` + QueryText string `json:"queryText,omitempty"` + ScanFrequency int `json:"scanFrequency"` // in hours + ScanContainers bool `json:"scanContainers"` + ScanHostVulnerabilities bool `json:"scanHostVulnerabilities"` + ScanMultiVolume bool `json:"scanMultiVolume"` + ScanStoppedInstances bool `json:"scanStoppedInstances"` +} + +type AzureSidekickCredentials struct { + ClientId string `json:"clientId"` + ClientSecret string `json:"clientSecret,omitempty"` +}