From 19574e4929559484f752fae72a5ca40f0d00e952 Mon Sep 17 00:00:00 2001 From: Su Shi <1684739+metacpp@users.noreply.github.com> Date: Sun, 28 Oct 2018 21:55:46 -0700 Subject: [PATCH] :arrow_up: (ACI SDK upgrade.) Upgrade ACI SDK to `2018-10-01`. Upgrade ACI SDK to `2018-10-01` to prepare for Virtual Network support in near future. --- azurerm/config.go | 2 +- azurerm/resource_arm_container_group.go | 6 +- .../containerinstance/client.go | 2 +- .../containerinstance/container.go | 4 +- .../containerinstance/containergroups.go | 26 ++-- .../containerinstance/containergroupusage.go | 2 +- .../containerinstance/models.go | 137 +++++++++++++++++- .../containerinstance/operations.go | 2 +- .../serviceassociationlink.go | 109 ++++++++++++++ .../containerinstance/version.go | 2 +- vendor/vendor.json | 4 +- 11 files changed, 268 insertions(+), 28 deletions(-) rename vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/{2018-06-01 => 2018-10-01}/containerinstance/client.go (97%) rename vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/{2018-06-01 => 2018-10-01}/containerinstance/container.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/{2018-06-01 => 2018-10-01}/containerinstance/containergroups.go (97%) rename vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/{2018-06-01 => 2018-10-01}/containerinstance/containergroupusage.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/{2018-06-01 => 2018-10-01}/containerinstance/models.go (84%) rename vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/{2018-06-01 => 2018-10-01}/containerinstance/operations.go (99%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/serviceassociationlink.go rename vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/{2018-06-01 => 2018-10-01}/containerinstance/version.go (98%) diff --git a/azurerm/config.go b/azurerm/config.go index 663699b9dd89..30aa56451b1b 100644 --- a/azurerm/config.go +++ b/azurerm/config.go @@ -16,7 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn" "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute" - "github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance" + "github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance" "github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry" "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice" "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb" diff --git a/azurerm/resource_arm_container_group.go b/azurerm/resource_arm_container_group.go index e49381b6c458..3d1c716ba20c 100644 --- a/azurerm/resource_arm_container_group.go +++ b/azurerm/resource_arm_container_group.go @@ -5,7 +5,7 @@ import ( "log" "strings" - "github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance" + "github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" @@ -38,7 +38,7 @@ func resourceArmContainerGroup() *schema.Resource { ForceNew: true, DiffSuppressFunc: ignoreCaseDiffSuppressFunc, ValidateFunc: validation.StringInSlice([]string{ - "Public", + string(containerinstance.Public), }, true), }, @@ -263,7 +263,7 @@ func resourceArmContainerGroupCreate(d *schema.ResourceData, meta interface{}) e Containers: containers, RestartPolicy: containerinstance.ContainerGroupRestartPolicy(restartPolicy), IPAddress: &containerinstance.IPAddress{ - Type: &IPAddressType, + Type: containerinstance.ContainerGroupIPAddressType(IPAddressType), Ports: containerGroupPorts, }, OsType: containerinstance.OperatingSystemTypes(OSType), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/client.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/client.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/client.go index d52e3559bc40..6131ee45c4fc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/client.go @@ -1,4 +1,4 @@ -// Package containerinstance implements the Azure ARM Containerinstance service API version 2018-06-01. +// Package containerinstance implements the Azure ARM Containerinstance service API version 2018-10-01. // // package containerinstance diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/container.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/container.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/container.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/container.go index 6f6aa6b38ac8..3d1654cc3c6b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/container.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/container.go @@ -77,7 +77,7 @@ func (client ContainerClient) ExecuteCommandPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-06-01" + const APIVersion = "2018-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -150,7 +150,7 @@ func (client ContainerClient) ListLogsPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-06-01" + const APIVersion = "2018-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroups.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroups.go index 015499c7d414..44a179b62566 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroups.go @@ -51,15 +51,15 @@ func (client ContainerGroupsClient) CreateOrUpdate(ctx context.Context, resource Constraints: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties.Containers", Name: validation.Null, Rule: true, Chain: nil}, {Target: "containerGroup.ContainerGroupProperties.IPAddress", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties.IPAddress.Ports", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "containerGroup.ContainerGroupProperties.IPAddress.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}, + Chain: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties.IPAddress.Ports", Name: validation.Null, Rule: true, Chain: nil}}}, {Target: "containerGroup.ContainerGroupProperties.Diagnostics", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties.Diagnostics.LogAnalytics", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties.Diagnostics.LogAnalytics.WorkspaceID", Name: validation.Null, Rule: true, Chain: nil}, {Target: "containerGroup.ContainerGroupProperties.Diagnostics.LogAnalytics.WorkspaceKey", Name: validation.Null, Rule: true, Chain: nil}, }}, }}, + {Target: "containerGroup.ContainerGroupProperties.NetworkProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties.NetworkProfile.ID", Name: validation.Null, Rule: true, Chain: nil}}}, }}}}}); err != nil { return result, validation.NewError("containerinstance.ContainerGroupsClient", "CreateOrUpdate", err.Error()) } @@ -87,7 +87,7 @@ func (client ContainerGroupsClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-06-01" + const APIVersion = "2018-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -167,7 +167,7 @@ func (client ContainerGroupsClient) DeletePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-06-01" + const APIVersion = "2018-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -236,7 +236,7 @@ func (client ContainerGroupsClient) GetPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-06-01" + const APIVersion = "2018-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -301,7 +301,7 @@ func (client ContainerGroupsClient) ListPreparer(ctx context.Context) (*http.Req "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-06-01" + const APIVersion = "2018-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -396,7 +396,7 @@ func (client ContainerGroupsClient) ListByResourceGroupPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-06-01" + const APIVersion = "2018-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -456,7 +456,7 @@ func (client ContainerGroupsClient) ListByResourceGroupComplete(ctx context.Cont return } -// Restart restarts all containers in a contaienr group in place. If container image has updates, new image will be +// Restart restarts all containers in a container group in place. If container image has updates, new image will be // downloaded. // Parameters: // resourceGroupName - the name of the resource group. @@ -485,7 +485,7 @@ func (client ContainerGroupsClient) RestartPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-06-01" + const APIVersion = "2018-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -527,7 +527,7 @@ func (client ContainerGroupsClient) RestartResponder(resp *http.Response) (resul return } -// Stop stops all containers in a contaienr group. Compute resources will be deallocated and billing will stop. +// Stop stops all containers in a container group. Compute resources will be deallocated and billing will stop. // Parameters: // resourceGroupName - the name of the resource group. // containerGroupName - the name of the container group. @@ -561,7 +561,7 @@ func (client ContainerGroupsClient) StopPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-06-01" + const APIVersion = "2018-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -628,7 +628,7 @@ func (client ContainerGroupsClient) UpdatePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-06-01" + const APIVersion = "2018-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroupusage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroupusage.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroupusage.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroupusage.go index 71ca9dd97522..e83c12b02802 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroupusage.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroupusage.go @@ -71,7 +71,7 @@ func (client ContainerGroupUsageClient) ListPreparer(ctx context.Context, locati "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-06-01" + const APIVersion = "2018-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/models.go similarity index 84% rename from vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/models.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/models.go index 35a90edf7d2f..f56d63e5d389 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/models.go @@ -26,6 +26,21 @@ import ( "net/http" ) +// ContainerGroupIPAddressType enumerates the values for container group ip address type. +type ContainerGroupIPAddressType string + +const ( + // Private ... + Private ContainerGroupIPAddressType = "Private" + // Public ... + Public ContainerGroupIPAddressType = "Public" +) + +// PossibleContainerGroupIPAddressTypeValues returns an array of possible values for the ContainerGroupIPAddressType const type. +func PossibleContainerGroupIPAddressTypeValues() []ContainerGroupIPAddressType { + return []ContainerGroupIPAddressType{Private, Public} +} + // ContainerGroupNetworkProtocol enumerates the values for container group network protocol. type ContainerGroupNetworkProtocol string @@ -73,6 +88,21 @@ func PossibleContainerNetworkProtocolValues() []ContainerNetworkProtocol { return []ContainerNetworkProtocol{ContainerNetworkProtocolTCP, ContainerNetworkProtocolUDP} } +// LogAnalyticsLogType enumerates the values for log analytics log type. +type LogAnalyticsLogType string + +const ( + // ContainerInsights ... + ContainerInsights LogAnalyticsLogType = "ContainerInsights" + // ContainerInstanceLogs ... + ContainerInstanceLogs LogAnalyticsLogType = "ContainerInstanceLogs" +) + +// PossibleLogAnalyticsLogTypeValues returns an array of possible values for the LogAnalyticsLogType const type. +func PossibleLogAnalyticsLogTypeValues() []LogAnalyticsLogType { + return []LogAnalyticsLogType{ContainerInsights, ContainerInstanceLogs} +} + // OperatingSystemTypes enumerates the values for operating system types. type OperatingSystemTypes string @@ -103,6 +133,25 @@ func PossibleOperationsOriginValues() []OperationsOrigin { return []OperationsOrigin{System, User} } +// ResourceIdentityType enumerates the values for resource identity type. +type ResourceIdentityType string + +const ( + // None ... + None ResourceIdentityType = "None" + // SystemAssigned ... + SystemAssigned ResourceIdentityType = "SystemAssigned" + // SystemAssignedUserAssigned ... + SystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" + // UserAssigned ... + UserAssigned ResourceIdentityType = "UserAssigned" +) + +// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{None, SystemAssigned, SystemAssignedUserAssigned, UserAssigned} +} + // Scheme enumerates the values for scheme. type Scheme string @@ -216,7 +265,9 @@ type ContainerExecResponse struct { // ContainerGroup a container group. type ContainerGroup struct { - autorest.Response `json:"-"` + autorest.Response `json:"-"` + // Identity - The identity of the container group, if configured. + Identity *ContainerGroupIdentity `json:"identity,omitempty"` *ContainerGroupProperties `json:"properties,omitempty"` // ID - The resource id. ID *string `json:"id,omitempty"` @@ -233,6 +284,9 @@ type ContainerGroup struct { // MarshalJSON is the custom marshaler for ContainerGroup. func (cg ContainerGroup) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if cg.Identity != nil { + objectMap["identity"] = cg.Identity + } if cg.ContainerGroupProperties != nil { objectMap["properties"] = cg.ContainerGroupProperties } @@ -263,6 +317,15 @@ func (cg *ContainerGroup) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "identity": + if v != nil { + var identity ContainerGroupIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + cg.Identity = &identity + } case "properties": if v != nil { var containerGroupProperties ContainerGroupProperties @@ -329,6 +392,44 @@ type ContainerGroupDiagnostics struct { LogAnalytics *LogAnalytics `json:"logAnalytics,omitempty"` } +// ContainerGroupIdentity identity for the container group. +type ContainerGroupIdentity struct { + // PrincipalID - The principal id of the container group identity. This property will only be provided for a system assigned identity. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - The tenant id associated with the container group. This property will only be provided for a system assigned identity. + TenantID *string `json:"tenantId,omitempty"` + // Type - The type of identity used for the container group. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the container group. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssignedUserAssigned', 'None' + Type ResourceIdentityType `json:"type,omitempty"` + // UserAssignedIdentities - The list of user identities associated with the container group. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + UserAssignedIdentities map[string]*ContainerGroupIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"` +} + +// MarshalJSON is the custom marshaler for ContainerGroupIdentity. +func (cgiVar ContainerGroupIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cgiVar.PrincipalID != nil { + objectMap["principalId"] = cgiVar.PrincipalID + } + if cgiVar.TenantID != nil { + objectMap["tenantId"] = cgiVar.TenantID + } + if cgiVar.Type != "" { + objectMap["type"] = cgiVar.Type + } + if cgiVar.UserAssignedIdentities != nil { + objectMap["userAssignedIdentities"] = cgiVar.UserAssignedIdentities + } + return json.Marshal(objectMap) +} + +// ContainerGroupIdentityUserAssignedIdentitiesValue ... +type ContainerGroupIdentityUserAssignedIdentitiesValue struct { + // PrincipalID - The principal id of user assigned identity. + PrincipalID *string `json:"principalId,omitempty"` + // ClientID - The client id of user assigned identity. + ClientID *string `json:"clientId,omitempty"` +} + // ContainerGroupListResult the container group list response that contains the container group properties. type ContainerGroupListResult struct { autorest.Response `json:"-"` @@ -431,6 +532,12 @@ func (page ContainerGroupListResultPage) Values() []ContainerGroup { return *page.cglr.Value } +// ContainerGroupNetworkProfile container group network profile information. +type ContainerGroupNetworkProfile struct { + // ID - The identifier for a network profile. + ID *string `json:"id,omitempty"` +} + // ContainerGroupProperties ... type ContainerGroupProperties struct { // ProvisioningState - The provisioning state of the container group. This only appears in the response. @@ -455,6 +562,8 @@ type ContainerGroupProperties struct { InstanceView *ContainerGroupPropertiesInstanceView `json:"instanceView,omitempty"` // Diagnostics - The diagnostic information for a container group. Diagnostics *ContainerGroupDiagnostics `json:"diagnostics,omitempty"` + // NetworkProfile - The network profile information for a container group. + NetworkProfile *ContainerGroupNetworkProfile `json:"networkProfile,omitempty"` } // ContainerGroupPropertiesInstanceView the instance view of the container group. Only valid in response. @@ -651,8 +760,8 @@ type ImageRegistryCredential struct { type IPAddress struct { // Ports - The list of ports exposed on the container group. Ports *[]Port `json:"ports,omitempty"` - // Type - Specifies if the IP is exposed to the public internet. - Type *string `json:"type,omitempty"` + // Type - Specifies if the IP is exposed to the public internet or private VNET. Possible values include: 'Public', 'Private' + Type ContainerGroupIPAddressType `json:"type,omitempty"` // IP - The IP exposed to the public internet. IP *string `json:"ip,omitempty"` // DNSNameLabel - The Dns name label for the IP. @@ -667,6 +776,28 @@ type LogAnalytics struct { WorkspaceID *string `json:"workspaceId,omitempty"` // WorkspaceKey - The workspace key for log analytics WorkspaceKey *string `json:"workspaceKey,omitempty"` + // LogType - The log type to be used. Possible values include: 'ContainerInsights', 'ContainerInstanceLogs' + LogType LogAnalyticsLogType `json:"logType,omitempty"` + // Metadata - Metadata for log analytics. + Metadata map[string]*string `json:"metadata"` +} + +// MarshalJSON is the custom marshaler for LogAnalytics. +func (la LogAnalytics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if la.WorkspaceID != nil { + objectMap["workspaceId"] = la.WorkspaceID + } + if la.WorkspaceKey != nil { + objectMap["workspaceKey"] = la.WorkspaceKey + } + if la.LogType != "" { + objectMap["logType"] = la.LogType + } + if la.Metadata != nil { + objectMap["metadata"] = la.Metadata + } + return json.Marshal(objectMap) } // Logs the logs. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/operations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/operations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/operations.go index e8998e0b448c..a043265e74ce 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/operations.go @@ -64,7 +64,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2018-06-01" + const APIVersion = "2018-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/serviceassociationlink.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/serviceassociationlink.go new file mode 100644 index 000000000000..71250766cb1a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/serviceassociationlink.go @@ -0,0 +1,109 @@ +package containerinstance + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ServiceAssociationLinkClient is the client for the ServiceAssociationLink methods of the Containerinstance service. +type ServiceAssociationLinkClient struct { + BaseClient +} + +// NewServiceAssociationLinkClient creates an instance of the ServiceAssociationLinkClient client. +func NewServiceAssociationLinkClient(subscriptionID string) ServiceAssociationLinkClient { + return NewServiceAssociationLinkClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServiceAssociationLinkClientWithBaseURI creates an instance of the ServiceAssociationLinkClient client. +func NewServiceAssociationLinkClientWithBaseURI(baseURI string, subscriptionID string) ServiceAssociationLinkClient { + return ServiceAssociationLinkClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Delete delete the container instance service association link for the subnet. This operation unblocks user from +// deleting subnet. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// subnetName - the name of the subnet. +func (client ServiceAssociationLinkClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result autorest.Response, err error) { + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkName, subnetName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerinstance.ServiceAssociationLinkClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerinstance.ServiceAssociationLinkClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerinstance.ServiceAssociationLinkClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ServiceAssociationLinkClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subnetName": autorest.Encode("path", subnetName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2018-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/providers/Microsoft.ContainerInstance/serviceAssociationLinks/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ServiceAssociationLinkClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ServiceAssociationLinkClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/version.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/version.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/version.go index d6d96251823a..36738a7703af 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " containerinstance/2018-06-01" + return "Azure-SDK-For-Go/" + version.Number + " containerinstance/2018-10-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/vendor.json b/vendor/vendor.json index f4221aa2cb82..f7d5f9c4a4fc 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -43,8 +43,8 @@ "versionExact": "v21.3.0" }, { - "checksumSHA1": "eB6b4vGKEbAND0MUWfKLTn6H7uw=", - "path": "github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-06-01/containerinstance", + "checksumSHA1": "c6iA9bRood4Du2CyILUSc0UDZl4=", + "path": "github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance", "revision": "da91af54816b4cf72949c225a2d0980f51fab01b", "revisionTime": "2018-10-19T17:11:53Z", "version": "v21.3.0",