vendor: add github.com/Azure/azure-sdk-for-go and dependencies

This commit is contained in:
Nick Craig-Wood
2017-08-04 22:54:27 +01:00
parent 132f71d504
commit 91cfcc21ff
958 changed files with 320589 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
// Package containerservice implements the Azure ARM Containerservice service
// API version 2017-01-31.
//
// The Container Service Client.
package containerservice
// 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 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"github.com/Azure/go-autorest/autorest"
)
const (
// DefaultBaseURI is the default URI used for the service Containerservice
DefaultBaseURI = "https://management.azure.com"
)
// ManagementClient is the base client for Containerservice.
type ManagementClient struct {
autorest.Client
BaseURI string
SubscriptionID string
}
// New creates an instance of the ManagementClient client.
func New(subscriptionID string) ManagementClient {
return NewWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
SubscriptionID: subscriptionID,
}
}
+499
View File
@@ -0,0 +1,499 @@
package containerservice
// 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 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
"net/http"
)
// ContainerServicesClient is the the Container Service Client.
type ContainerServicesClient struct {
ManagementClient
}
// NewContainerServicesClient creates an instance of the
// ContainerServicesClient client.
func NewContainerServicesClient(subscriptionID string) ContainerServicesClient {
return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewContainerServicesClientWithBaseURI creates an instance of the
// ContainerServicesClient client.
func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient {
return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate creates or updates a container service with the specified
// configuration of orchestrator, masters, and agents. This method may poll for
// completion. Polling can be canceled by passing the cancel channel argument.
// The channel will be used to cancel polling and any outstanding HTTP
// requests.
//
// resourceGroupName is the name of the resource group. containerServiceName is
// the name of the container service in the specified subscription and resource
// group. parameters is parameters supplied to the Create or Update a Container
// Service operation.
func (client ContainerServicesClient) CreateOrUpdate(resourceGroupName string, containerServiceName string, parameters ContainerService, cancel <-chan struct{}) (<-chan ContainerService, <-chan error) {
resultChan := make(chan ContainerService, 1)
errChan := make(chan error, 1)
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.Properties.CustomProfile", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.Properties.CustomProfile.Orchestrator", Name: validation.Null, Rule: true, Chain: nil}}},
{Target: "parameters.Properties.ServicePrincipalProfile", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil},
{Target: "parameters.Properties.ServicePrincipalProfile.Secret", Name: validation.Null, Rule: true, Chain: nil},
}},
{Target: "parameters.Properties.MasterProfile", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.Properties.MasterProfile.DNSPrefix", Name: validation.Null, Rule: true, Chain: nil}}},
{Target: "parameters.Properties.AgentPoolProfiles", Name: validation.Null, Rule: true, Chain: nil},
{Target: "parameters.Properties.WindowsProfile", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$`, Chain: nil}}},
{Target: "parameters.Properties.WindowsProfile.AdminPassword", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminPassword", Name: validation.Pattern, Rule: `^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$`, Chain: nil}}},
}},
{Target: "parameters.Properties.LinuxProfile", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-z][a-z0-9_-]*$`, Chain: nil}}},
{Target: "parameters.Properties.LinuxProfile.SSH", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}},
}},
{Target: "parameters.Properties.DiagnosticsProfile", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}},
}},
}}}}}); err != nil {
errChan <- validation.NewErrorWithValidationError(err, "containerservice.ContainerServicesClient", "CreateOrUpdate")
close(errChan)
close(resultChan)
return resultChan, errChan
}
go func() {
var err error
var result ContainerService
defer func() {
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
req, err := client.CreateOrUpdatePreparer(resourceGroupName, containerServiceName, parameters, cancel)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "CreateOrUpdate", nil, "Failure preparing request")
return
}
resp, err := client.CreateOrUpdateSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "CreateOrUpdate", resp, "Failure sending request")
return
}
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "CreateOrUpdate", resp, "Failure responding to request")
}
}()
return resultChan, errChan
}
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client ContainerServicesClient) CreateOrUpdatePreparer(resourceGroupName string, containerServiceName string, parameters ContainerService, cancel <-chan struct{}) (*http.Request, error) {
pathParameters := map[string]interface{}{
"containerServiceName": autorest.Encode("path", containerServiceName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2017-01-31"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{Cancel: cancel})
}
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client,
req,
azure.DoPollForAsynchronous(client.PollingDelay))
}
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
func (client ContainerServicesClient) CreateOrUpdateResponder(resp *http.Response) (result ContainerService, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// Delete deletes the specified container service in the specified subscription
// and resource group. The operation does not delete other resources created as
// part of creating a container service, including storage accounts, VMs, and
// availability sets. All the other resources created with the container
// service are part of the same resource group and can be deleted individually.
// This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. containerServiceName is
// the name of the container service in the specified subscription and resource
// group.
func (client ContainerServicesClient) Delete(resourceGroupName string, containerServiceName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
go func() {
var err error
var result autorest.Response
defer func() {
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
req, err := client.DeletePreparer(resourceGroupName, containerServiceName, cancel)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Delete", nil, "Failure preparing request")
return
}
resp, err := client.DeleteSender(req)
if err != nil {
result.Response = resp
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Delete", resp, "Failure sending request")
return
}
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Delete", resp, "Failure responding to request")
}
}()
return resultChan, errChan
}
// DeletePreparer prepares the Delete request.
func (client ContainerServicesClient) DeletePreparer(resourceGroupName string, containerServiceName string, cancel <-chan struct{}) (*http.Request, error) {
pathParameters := map[string]interface{}{
"containerServiceName": autorest.Encode("path", containerServiceName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2017-01-31"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{Cancel: cancel})
}
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerServicesClient) DeleteSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client,
req,
azure.DoPollForAsynchronous(client.PollingDelay))
}
// DeleteResponder handles the response to the Delete request. The method always
// closes the http.Response Body.
func (client ContainerServicesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
autorest.ByClosing())
result.Response = resp
return
}
// Get gets the properties of the specified container service in the specified
// subscription and resource group. The operation returns the properties
// including state, orchestrator, number of masters and agents, and FQDNs of
// masters and agents.
//
// resourceGroupName is the name of the resource group. containerServiceName is
// the name of the container service in the specified subscription and resource
// group.
func (client ContainerServicesClient) Get(resourceGroupName string, containerServiceName string) (result ContainerService, err error) {
req, err := client.GetPreparer(resourceGroupName, containerServiceName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", nil, "Failure preparing request")
return
}
resp, err := client.GetSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", resp, "Failure sending request")
return
}
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", resp, "Failure responding to request")
}
return
}
// GetPreparer prepares the Get request.
func (client ContainerServicesClient) GetPreparer(resourceGroupName string, containerServiceName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"containerServiceName": autorest.Encode("path", containerServiceName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2017-01-31"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerServicesClient) GetSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client ContainerServicesClient) GetResponder(resp *http.Response) (result ContainerService, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// List gets a list of container services in the specified subscription. The
// operation returns properties of each container service including state,
// orchestrator, number of masters and agents, and FQDNs of masters and agents.
func (client ContainerServicesClient) List() (result ListResult, err error) {
req, err := client.ListPreparer()
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", nil, "Failure preparing request")
return
}
resp, err := client.ListSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", resp, "Failure sending request")
return
}
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", resp, "Failure responding to request")
}
return
}
// ListPreparer prepares the List request.
func (client ContainerServicesClient) ListPreparer() (*http.Request, error) {
pathParameters := map[string]interface{}{
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2017-01-31"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerServicesClient) ListSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// ListResponder handles the response to the List request. The method always
// closes the http.Response Body.
func (client ContainerServicesClient) ListResponder(resp *http.Response) (result ListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// ListNextResults retrieves the next set of results, if any.
func (client ContainerServicesClient) ListNextResults(lastResults ListResult) (result ListResult, err error) {
req, err := lastResults.ListResultPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", nil, "Failure preparing next results request")
}
if req == nil {
return
}
resp, err := client.ListSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", resp, "Failure sending next results request")
}
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", resp, "Failure responding to next results request")
}
return
}
// ListByResourceGroup gets a list of container services in the specified
// subscription and resource group. The operation returns properties of each
// container service including state, orchestrator, number of masters and
// agents, and FQDNs of masters and agents.
//
// resourceGroupName is the name of the resource group.
func (client ContainerServicesClient) ListByResourceGroup(resourceGroupName string) (result ListResult, err error) {
req, err := client.ListByResourceGroupPreparer(resourceGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", nil, "Failure preparing request")
return
}
resp, err := client.ListByResourceGroupSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", resp, "Failure sending request")
return
}
result, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", resp, "Failure responding to request")
}
return
}
// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
func (client ContainerServicesClient) ListByResourceGroupPreparer(resourceGroupName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2017-01-31"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerServicesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
// closes the http.Response Body.
func (client ContainerServicesClient) ListByResourceGroupResponder(resp *http.Response) (result ListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// ListByResourceGroupNextResults retrieves the next set of results, if any.
func (client ContainerServicesClient) ListByResourceGroupNextResults(lastResults ListResult) (result ListResult, err error) {
req, err := lastResults.ListResultPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", nil, "Failure preparing next results request")
}
if req == nil {
return
}
resp, err := client.ListByResourceGroupSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", resp, "Failure sending next results request")
}
result, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", resp, "Failure responding to next results request")
}
return
}
+257
View File
@@ -0,0 +1,257 @@
package containerservice
// 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 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/to"
"net/http"
)
// OchestratorTypes enumerates the values for ochestrator types.
type OchestratorTypes string
const (
// Custom specifies the custom state for ochestrator types.
Custom OchestratorTypes = "Custom"
// DCOS specifies the dcos state for ochestrator types.
DCOS OchestratorTypes = "DCOS"
// Kubernetes specifies the kubernetes state for ochestrator types.
Kubernetes OchestratorTypes = "Kubernetes"
// Swarm specifies the swarm state for ochestrator types.
Swarm OchestratorTypes = "Swarm"
)
// VMSizeTypes enumerates the values for vm size types.
type VMSizeTypes string
const (
// StandardA0 specifies the standard a0 state for vm size types.
StandardA0 VMSizeTypes = "Standard_A0"
// StandardA1 specifies the standard a1 state for vm size types.
StandardA1 VMSizeTypes = "Standard_A1"
// StandardA10 specifies the standard a10 state for vm size types.
StandardA10 VMSizeTypes = "Standard_A10"
// StandardA11 specifies the standard a11 state for vm size types.
StandardA11 VMSizeTypes = "Standard_A11"
// StandardA2 specifies the standard a2 state for vm size types.
StandardA2 VMSizeTypes = "Standard_A2"
// StandardA3 specifies the standard a3 state for vm size types.
StandardA3 VMSizeTypes = "Standard_A3"
// StandardA4 specifies the standard a4 state for vm size types.
StandardA4 VMSizeTypes = "Standard_A4"
// StandardA5 specifies the standard a5 state for vm size types.
StandardA5 VMSizeTypes = "Standard_A5"
// StandardA6 specifies the standard a6 state for vm size types.
StandardA6 VMSizeTypes = "Standard_A6"
// StandardA7 specifies the standard a7 state for vm size types.
StandardA7 VMSizeTypes = "Standard_A7"
// StandardA8 specifies the standard a8 state for vm size types.
StandardA8 VMSizeTypes = "Standard_A8"
// StandardA9 specifies the standard a9 state for vm size types.
StandardA9 VMSizeTypes = "Standard_A9"
// StandardD1 specifies the standard d1 state for vm size types.
StandardD1 VMSizeTypes = "Standard_D1"
// StandardD11 specifies the standard d11 state for vm size types.
StandardD11 VMSizeTypes = "Standard_D11"
// StandardD11V2 specifies the standard d11v2 state for vm size types.
StandardD11V2 VMSizeTypes = "Standard_D11_v2"
// StandardD12 specifies the standard d12 state for vm size types.
StandardD12 VMSizeTypes = "Standard_D12"
// StandardD12V2 specifies the standard d12v2 state for vm size types.
StandardD12V2 VMSizeTypes = "Standard_D12_v2"
// StandardD13 specifies the standard d13 state for vm size types.
StandardD13 VMSizeTypes = "Standard_D13"
// StandardD13V2 specifies the standard d13v2 state for vm size types.
StandardD13V2 VMSizeTypes = "Standard_D13_v2"
// StandardD14 specifies the standard d14 state for vm size types.
StandardD14 VMSizeTypes = "Standard_D14"
// StandardD14V2 specifies the standard d14v2 state for vm size types.
StandardD14V2 VMSizeTypes = "Standard_D14_v2"
// StandardD1V2 specifies the standard d1v2 state for vm size types.
StandardD1V2 VMSizeTypes = "Standard_D1_v2"
// StandardD2 specifies the standard d2 state for vm size types.
StandardD2 VMSizeTypes = "Standard_D2"
// StandardD2V2 specifies the standard d2v2 state for vm size types.
StandardD2V2 VMSizeTypes = "Standard_D2_v2"
// StandardD3 specifies the standard d3 state for vm size types.
StandardD3 VMSizeTypes = "Standard_D3"
// StandardD3V2 specifies the standard d3v2 state for vm size types.
StandardD3V2 VMSizeTypes = "Standard_D3_v2"
// StandardD4 specifies the standard d4 state for vm size types.
StandardD4 VMSizeTypes = "Standard_D4"
// StandardD4V2 specifies the standard d4v2 state for vm size types.
StandardD4V2 VMSizeTypes = "Standard_D4_v2"
// StandardD5V2 specifies the standard d5v2 state for vm size types.
StandardD5V2 VMSizeTypes = "Standard_D5_v2"
// StandardDS1 specifies the standard ds1 state for vm size types.
StandardDS1 VMSizeTypes = "Standard_DS1"
// StandardDS11 specifies the standard ds11 state for vm size types.
StandardDS11 VMSizeTypes = "Standard_DS11"
// StandardDS12 specifies the standard ds12 state for vm size types.
StandardDS12 VMSizeTypes = "Standard_DS12"
// StandardDS13 specifies the standard ds13 state for vm size types.
StandardDS13 VMSizeTypes = "Standard_DS13"
// StandardDS14 specifies the standard ds14 state for vm size types.
StandardDS14 VMSizeTypes = "Standard_DS14"
// StandardDS2 specifies the standard ds2 state for vm size types.
StandardDS2 VMSizeTypes = "Standard_DS2"
// StandardDS3 specifies the standard ds3 state for vm size types.
StandardDS3 VMSizeTypes = "Standard_DS3"
// StandardDS4 specifies the standard ds4 state for vm size types.
StandardDS4 VMSizeTypes = "Standard_DS4"
// StandardG1 specifies the standard g1 state for vm size types.
StandardG1 VMSizeTypes = "Standard_G1"
// StandardG2 specifies the standard g2 state for vm size types.
StandardG2 VMSizeTypes = "Standard_G2"
// StandardG3 specifies the standard g3 state for vm size types.
StandardG3 VMSizeTypes = "Standard_G3"
// StandardG4 specifies the standard g4 state for vm size types.
StandardG4 VMSizeTypes = "Standard_G4"
// StandardG5 specifies the standard g5 state for vm size types.
StandardG5 VMSizeTypes = "Standard_G5"
// StandardGS1 specifies the standard gs1 state for vm size types.
StandardGS1 VMSizeTypes = "Standard_GS1"
// StandardGS2 specifies the standard gs2 state for vm size types.
StandardGS2 VMSizeTypes = "Standard_GS2"
// StandardGS3 specifies the standard gs3 state for vm size types.
StandardGS3 VMSizeTypes = "Standard_GS3"
// StandardGS4 specifies the standard gs4 state for vm size types.
StandardGS4 VMSizeTypes = "Standard_GS4"
// StandardGS5 specifies the standard gs5 state for vm size types.
StandardGS5 VMSizeTypes = "Standard_GS5"
)
// AgentPoolProfile is profile for the container service agent pool.
type AgentPoolProfile struct {
Name *string `json:"name,omitempty"`
Count *int32 `json:"count,omitempty"`
VMSize VMSizeTypes `json:"vmSize,omitempty"`
DNSPrefix *string `json:"dnsPrefix,omitempty"`
Fqdn *string `json:"fqdn,omitempty"`
}
// ContainerService is container service.
type ContainerService struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
*Properties `json:"properties,omitempty"`
}
// CustomProfile is properties to configure a custom container service cluster.
type CustomProfile struct {
Orchestrator *string `json:"orchestrator,omitempty"`
}
// DiagnosticsProfile is
type DiagnosticsProfile struct {
VMDiagnostics *VMDiagnostics `json:"vmDiagnostics,omitempty"`
}
// LinuxProfile is profile for Linux VMs in the container service cluster.
type LinuxProfile struct {
AdminUsername *string `json:"adminUsername,omitempty"`
SSH *SSHConfiguration `json:"ssh,omitempty"`
}
// ListResult is the response from the List Container Services operation.
type ListResult struct {
autorest.Response `json:"-"`
Value *[]ContainerService `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// ListResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client ListResult) ListResultPreparer() (*http.Request, error) {
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(client.NextLink)))
}
// MasterProfile is profile for the container service master.
type MasterProfile struct {
Count *int32 `json:"count,omitempty"`
DNSPrefix *string `json:"dnsPrefix,omitempty"`
Fqdn *string `json:"fqdn,omitempty"`
}
// OrchestratorProfile is profile for the container service orchestrator.
type OrchestratorProfile struct {
OrchestratorType OchestratorTypes `json:"orchestratorType,omitempty"`
}
// Properties is properties of the container service.
type Properties struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
OrchestratorProfile *OrchestratorProfile `json:"orchestratorProfile,omitempty"`
CustomProfile *CustomProfile `json:"customProfile,omitempty"`
ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
MasterProfile *MasterProfile `json:"masterProfile,omitempty"`
AgentPoolProfiles *[]AgentPoolProfile `json:"agentPoolProfiles,omitempty"`
WindowsProfile *WindowsProfile `json:"windowsProfile,omitempty"`
LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"`
DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
}
// Resource is the Resource model definition.
type Resource struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
}
// ServicePrincipalProfile is information about a service principal identity
// for the cluster to use for manipulating Azure APIs.
type ServicePrincipalProfile struct {
ClientID *string `json:"clientId,omitempty"`
Secret *string `json:"secret,omitempty"`
}
// SSHConfiguration is sSH configuration for Linux-based VMs running on Azure.
type SSHConfiguration struct {
PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"`
}
// SSHPublicKey is contains information about SSH certificate public key data.
type SSHPublicKey struct {
KeyData *string `json:"keyData,omitempty"`
}
// VMDiagnostics is profile for diagnostics on the container service VMs.
type VMDiagnostics struct {
Enabled *bool `json:"enabled,omitempty"`
StorageURI *string `json:"storageUri,omitempty"`
}
// WindowsProfile is profile for Windows VMs in the container service cluster.
type WindowsProfile struct {
AdminUsername *string `json:"adminUsername,omitempty"`
AdminPassword *string `json:"adminPassword,omitempty"`
}
+29
View File
@@ -0,0 +1,29 @@
package containerservice
// 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 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.1.0-beta arm-containerservice/2017-01-31"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.1.0-beta"
}