vendor: update all dependencies to latest versions
This commit is contained in:
+100
-16
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// AccountClient is the composite Swagger json for Azure Automation Client
|
||||
// AccountClient is the automation Client
|
||||
type AccountClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -42,9 +41,8 @@ func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountC
|
||||
|
||||
// CreateOrUpdate create or update automation account.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is
|
||||
// parameters supplied to the create or update automation account. parameters
|
||||
// is parameters supplied to the create or update automation account.
|
||||
// resourceGroupName is the resource group name. automationAccountName is parameters supplied to the create or update
|
||||
// automation account. parameters is parameters supplied to the create or update automation account.
|
||||
func (client AccountClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, parameters AccountCreateOrUpdateParameters) (result Account, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -117,8 +115,7 @@ func (client AccountClient) CreateOrUpdateResponder(resp *http.Response) (result
|
||||
|
||||
// Delete delete an automation account.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is automation account name.
|
||||
func (client AccountClient) Delete(resourceGroupName string, automationAccountName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -188,8 +185,7 @@ func (client AccountClient) DeleteResponder(resp *http.Response) (result autores
|
||||
|
||||
// Get get information about an Automation Account.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client AccountClient) Get(resourceGroupName string, automationAccountName string) (result Account, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -343,8 +339,52 @@ func (client AccountClient) ListNextResults(lastResults AccountListResult) (resu
|
||||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroup retrieve a list of accounts within a given resource
|
||||
// group.
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client AccountClient) ListComplete(cancel <-chan struct{}) (<-chan Account, <-chan error) {
|
||||
resultChan := make(chan Account)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List()
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ListByResourceGroup retrieve a list of accounts within a given resource group.
|
||||
//
|
||||
// resourceGroupName is the resource group name.
|
||||
func (client AccountClient) ListByResourceGroup(resourceGroupName string) (result AccountListResult, err error) {
|
||||
@@ -438,11 +478,55 @@ func (client AccountClient) ListByResourceGroupNextResults(lastResults AccountLi
|
||||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroupComplete gets all elements from the list without paging.
|
||||
func (client AccountClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Account, <-chan error) {
|
||||
resultChan := make(chan Account)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByResourceGroup(resourceGroupName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByResourceGroupNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// Update update an automation account.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is
|
||||
// automation account name. parameters is parameters supplied to the update
|
||||
// automation account.
|
||||
// resourceGroupName is the resource group name. automationAccountName is automation account name. parameters is
|
||||
// parameters supplied to the update automation account.
|
||||
func (client AccountClient) Update(resourceGroupName string, automationAccountName string, parameters AccountUpdateParameters) (result Account, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+55
-15
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ActivityClient is the composite Swagger json for Azure Automation Client
|
||||
// ActivityClient is the automation Client
|
||||
type ActivityClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,18 +34,15 @@ func NewActivityClient(subscriptionID string) ActivityClient {
|
||||
return NewActivityClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewActivityClientWithBaseURI creates an instance of the ActivityClient
|
||||
// client.
|
||||
// NewActivityClientWithBaseURI creates an instance of the ActivityClient client.
|
||||
func NewActivityClientWithBaseURI(baseURI string, subscriptionID string) ActivityClient {
|
||||
return ActivityClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get retrieve the activity in the module identified by module name and
|
||||
// activity name.
|
||||
// Get retrieve the activity in the module identified by module name and activity name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. moduleName is the name of module. activityName is
|
||||
// the name of activity.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is
|
||||
// the name of module. activityName is the name of activity.
|
||||
func (client ActivityClient) Get(resourceGroupName string, automationAccountName string, moduleName string, activityName string) (result Activity, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -117,11 +113,10 @@ func (client ActivityClient) GetResponder(resp *http.Response) (result Activity,
|
||||
return
|
||||
}
|
||||
|
||||
// ListByModule retrieve a list of activities in the module identified by
|
||||
// module name.
|
||||
// ListByModule retrieve a list of activities in the module identified by module name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. moduleName is the name of module.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is
|
||||
// the name of module.
|
||||
func (client ActivityClient) ListByModule(resourceGroupName string, automationAccountName string, moduleName string) (result ActivityListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -214,3 +209,48 @@ func (client ActivityClient) ListByModuleNextResults(lastResults ActivityListRes
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByModuleComplete gets all elements from the list without paging.
|
||||
func (client ActivityClient) ListByModuleComplete(resourceGroupName string, automationAccountName string, moduleName string, cancel <-chan struct{}) (<-chan Activity, <-chan error) {
|
||||
resultChan := make(chan Activity)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByModule(resourceGroupName, automationAccountName, moduleName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByModuleNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
Generated
Vendored
+9
-14
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,28 +24,25 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// AgentRegistrationInformationClient is the composite Swagger json for Azure
|
||||
// Automation Client
|
||||
// AgentRegistrationInformationClient is the automation Client
|
||||
type AgentRegistrationInformationClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewAgentRegistrationInformationClient creates an instance of the
|
||||
// AgentRegistrationInformationClient client.
|
||||
// NewAgentRegistrationInformationClient creates an instance of the AgentRegistrationInformationClient client.
|
||||
func NewAgentRegistrationInformationClient(subscriptionID string) AgentRegistrationInformationClient {
|
||||
return NewAgentRegistrationInformationClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewAgentRegistrationInformationClientWithBaseURI creates an instance of the
|
||||
// AgentRegistrationInformationClient client.
|
||||
// NewAgentRegistrationInformationClientWithBaseURI creates an instance of the AgentRegistrationInformationClient
|
||||
// client.
|
||||
func NewAgentRegistrationInformationClientWithBaseURI(baseURI string, subscriptionID string) AgentRegistrationInformationClient {
|
||||
return AgentRegistrationInformationClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get retrieve the automation agent registration information.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client AgentRegistrationInformationClient) Get(resourceGroupName string, automationAccountName string) (result AgentRegistration, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -117,9 +113,8 @@ func (client AgentRegistrationInformationClient) GetResponder(resp *http.Respons
|
||||
|
||||
// RegenerateKey regenerate a primary or secondary agent registration key
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. parameters is the name of the agent registration
|
||||
// key to be regenerated
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. parameters is
|
||||
// the name of the agent registration key to be regenerated
|
||||
func (client AgentRegistrationInformationClient) RegenerateKey(resourceGroupName string, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter) (result AgentRegistration, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+60
-20
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// CertificateClient is the composite Swagger json for Azure Automation Client
|
||||
// CertificateClient is the automation Client
|
||||
type CertificateClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,18 +34,16 @@ func NewCertificateClient(subscriptionID string) CertificateClient {
|
||||
return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewCertificateClientWithBaseURI creates an instance of the CertificateClient
|
||||
// client.
|
||||
// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client.
|
||||
func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient {
|
||||
return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create a certificate.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. certificateName is the parameters supplied to the
|
||||
// create or update certificate operation. parameters is the parameters
|
||||
// supplied to the create or update certificate operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. certificateName
|
||||
// is the parameters supplied to the create or update certificate operation. parameters is the parameters supplied to
|
||||
// the create or update certificate operation.
|
||||
func (client CertificateClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateCreateOrUpdateParameters) (result Certificate, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -124,8 +121,8 @@ func (client CertificateClient) CreateOrUpdateResponder(resp *http.Response) (re
|
||||
|
||||
// Delete delete the certificate.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. certificateName is the name of certificate.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. certificateName
|
||||
// is the name of certificate.
|
||||
func (client CertificateClient) Delete(resourceGroupName string, automationAccountName string, certificateName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -196,8 +193,8 @@ func (client CertificateClient) DeleteResponder(resp *http.Response) (result aut
|
||||
|
||||
// Get retrieve the certificate identified by certificate name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. certificateName is the name of certificate.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. certificateName
|
||||
// is the name of certificate.
|
||||
func (client CertificateClient) Get(resourceGroupName string, automationAccountName string, certificateName string) (result Certificate, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -269,8 +266,7 @@ func (client CertificateClient) GetResponder(resp *http.Response) (result Certif
|
||||
|
||||
// ListByAutomationAccount retrieve a list of certificates.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client CertificateClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result CertificateListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -363,12 +359,56 @@ func (client CertificateClient) ListByAutomationAccountNextResults(lastResults C
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client CertificateClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Certificate, <-chan error) {
|
||||
resultChan := make(chan Certificate)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByAutomationAccountNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// Update update a certificate.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. certificateName is the parameters supplied to the
|
||||
// update certificate operation. parameters is the parameters supplied to the
|
||||
// update certificate operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. certificateName
|
||||
// is the parameters supplied to the update certificate operation. parameters is the parameters supplied to the update
|
||||
// certificate operation.
|
||||
func (client CertificateClient) Update(resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateUpdateParameters) (result Certificate, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+4
-5
@@ -1,6 +1,6 @@
|
||||
// Package automation implements the Azure ARM Automation service API version .
|
||||
// Package automation implements the Azure ARM Automation service API version 2015-10-31.
|
||||
//
|
||||
// Composite Swagger json for Azure Automation Client
|
||||
// Automation Client
|
||||
package automation
|
||||
|
||||
// Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
@@ -17,9 +17,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
||||
+60
-20
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ConnectionClient is the composite Swagger json for Azure Automation Client
|
||||
// ConnectionClient is the automation Client
|
||||
type ConnectionClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,18 +34,16 @@ func NewConnectionClient(subscriptionID string) ConnectionClient {
|
||||
return NewConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewConnectionClientWithBaseURI creates an instance of the ConnectionClient
|
||||
// client.
|
||||
// NewConnectionClientWithBaseURI creates an instance of the ConnectionClient client.
|
||||
func NewConnectionClientWithBaseURI(baseURI string, subscriptionID string) ConnectionClient {
|
||||
return ConnectionClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create or update a connection.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. connectionName is the parameters supplied to the
|
||||
// create or update connection operation. parameters is the parameters supplied
|
||||
// to the create or update connection operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. connectionName
|
||||
// is the parameters supplied to the create or update connection operation. parameters is the parameters supplied to
|
||||
// the create or update connection operation.
|
||||
func (client ConnectionClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionCreateOrUpdateParameters) (result Connection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -124,8 +121,8 @@ func (client ConnectionClient) CreateOrUpdateResponder(resp *http.Response) (res
|
||||
|
||||
// Delete delete the connection.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. connectionName is the name of connection.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. connectionName
|
||||
// is the name of connection.
|
||||
func (client ConnectionClient) Delete(resourceGroupName string, automationAccountName string, connectionName string) (result Connection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -197,8 +194,8 @@ func (client ConnectionClient) DeleteResponder(resp *http.Response) (result Conn
|
||||
|
||||
// Get retrieve the connection identified by connection name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. connectionName is the name of connection.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. connectionName
|
||||
// is the name of connection.
|
||||
func (client ConnectionClient) Get(resourceGroupName string, automationAccountName string, connectionName string) (result Connection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -270,8 +267,7 @@ func (client ConnectionClient) GetResponder(resp *http.Response) (result Connect
|
||||
|
||||
// ListByAutomationAccount retrieve a list of connections.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client ConnectionClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result ConnectionListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -364,12 +360,56 @@ func (client ConnectionClient) ListByAutomationAccountNextResults(lastResults Co
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client ConnectionClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Connection, <-chan error) {
|
||||
resultChan := make(chan Connection)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByAutomationAccountNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// Update update a connection.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. connectionName is the parameters supplied to the
|
||||
// update a connection operation. parameters is the parameters supplied to the
|
||||
// update a connection operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. connectionName
|
||||
// is the parameters supplied to the update a connection operation. parameters is the parameters supplied to the update
|
||||
// a connection operation.
|
||||
func (client ConnectionClient) Update(resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionUpdateParameters) (result Connection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+58
-19
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,30 +24,26 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ConnectionTypeClient is the composite Swagger json for Azure Automation
|
||||
// Client
|
||||
// ConnectionTypeClient is the automation Client
|
||||
type ConnectionTypeClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewConnectionTypeClient creates an instance of the ConnectionTypeClient
|
||||
// client.
|
||||
// NewConnectionTypeClient creates an instance of the ConnectionTypeClient client.
|
||||
func NewConnectionTypeClient(subscriptionID string) ConnectionTypeClient {
|
||||
return NewConnectionTypeClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewConnectionTypeClientWithBaseURI creates an instance of the
|
||||
// ConnectionTypeClient client.
|
||||
// NewConnectionTypeClientWithBaseURI creates an instance of the ConnectionTypeClient client.
|
||||
func NewConnectionTypeClientWithBaseURI(baseURI string, subscriptionID string) ConnectionTypeClient {
|
||||
return ConnectionTypeClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create a connectiontype.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. connectionTypeName is the parameters supplied to
|
||||
// the create or update connectiontype operation. parameters is the parameters
|
||||
// supplied to the create or update connectiontype operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// connectionTypeName is the parameters supplied to the create or update connectiontype operation. parameters is the
|
||||
// parameters supplied to the create or update connectiontype operation.
|
||||
func (client ConnectionTypeClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, connectionTypeName string, parameters ConnectionTypeCreateOrUpdateParameters) (result ConnectionType, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -126,8 +121,8 @@ func (client ConnectionTypeClient) CreateOrUpdateResponder(resp *http.Response)
|
||||
|
||||
// Delete delete the connectiontype.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. connectionTypeName is the name of connectiontype.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// connectionTypeName is the name of connectiontype.
|
||||
func (client ConnectionTypeClient) Delete(resourceGroupName string, automationAccountName string, connectionTypeName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -198,8 +193,8 @@ func (client ConnectionTypeClient) DeleteResponder(resp *http.Response) (result
|
||||
|
||||
// Get retrieve the connectiontype identified by connectiontype name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. connectionTypeName is the name of connectiontype.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// connectionTypeName is the name of connectiontype.
|
||||
func (client ConnectionTypeClient) Get(resourceGroupName string, automationAccountName string, connectionTypeName string) (result ConnectionType, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -271,8 +266,7 @@ func (client ConnectionTypeClient) GetResponder(resp *http.Response) (result Con
|
||||
|
||||
// ListByAutomationAccount retrieve a list of connectiontypes.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client ConnectionTypeClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result ConnectionTypeListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -364,3 +358,48 @@ func (client ConnectionTypeClient) ListByAutomationAccountNextResults(lastResult
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client ConnectionTypeClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan ConnectionType, <-chan error) {
|
||||
resultChan := make(chan ConnectionType)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByAutomationAccountNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
+60
-20
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// CredentialClient is the composite Swagger json for Azure Automation Client
|
||||
// CredentialClient is the automation Client
|
||||
type CredentialClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,18 +34,16 @@ func NewCredentialClient(subscriptionID string) CredentialClient {
|
||||
return NewCredentialClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewCredentialClientWithBaseURI creates an instance of the CredentialClient
|
||||
// client.
|
||||
// NewCredentialClientWithBaseURI creates an instance of the CredentialClient client.
|
||||
func NewCredentialClientWithBaseURI(baseURI string, subscriptionID string) CredentialClient {
|
||||
return CredentialClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create a credential.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. credentialName is the parameters supplied to the
|
||||
// create or update credential operation. parameters is the parameters supplied
|
||||
// to the create or update credential operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. credentialName
|
||||
// is the parameters supplied to the create or update credential operation. parameters is the parameters supplied to
|
||||
// the create or update credential operation.
|
||||
func (client CredentialClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialCreateOrUpdateParameters) (result Credential, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -126,8 +123,8 @@ func (client CredentialClient) CreateOrUpdateResponder(resp *http.Response) (res
|
||||
|
||||
// Delete delete the credential.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. credentialName is the name of credential.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. credentialName
|
||||
// is the name of credential.
|
||||
func (client CredentialClient) Delete(resourceGroupName string, automationAccountName string, credentialName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -198,8 +195,8 @@ func (client CredentialClient) DeleteResponder(resp *http.Response) (result auto
|
||||
|
||||
// Get retrieve the credential identified by credential name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. credentialName is the name of credential.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. credentialName
|
||||
// is the name of credential.
|
||||
func (client CredentialClient) Get(resourceGroupName string, automationAccountName string, credentialName string) (result Credential, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -271,8 +268,7 @@ func (client CredentialClient) GetResponder(resp *http.Response) (result Credent
|
||||
|
||||
// ListByAutomationAccount retrieve a list of credentials.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client CredentialClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result CredentialListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -365,12 +361,56 @@ func (client CredentialClient) ListByAutomationAccountNextResults(lastResults Cr
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client CredentialClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Credential, <-chan error) {
|
||||
resultChan := make(chan Credential)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByAutomationAccountNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// Update update a credential.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. credentialName is the parameters supplied to the
|
||||
// Update credential operation. parameters is the parameters supplied to the
|
||||
// Update credential operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. credentialName
|
||||
// is the parameters supplied to the Update credential operation. parameters is the parameters supplied to the Update
|
||||
// credential operation.
|
||||
func (client CredentialClient) Update(resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialUpdateParameters) (result Credential, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+59
-22
@@ -14,42 +14,36 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
"github.com/Azure/go-autorest/autorest/azure"
|
||||
"github.com/Azure/go-autorest/autorest/validation"
|
||||
"github.com/satori/uuid"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// DscCompilationJobClient is the composite Swagger json for Azure Automation
|
||||
// Client
|
||||
// DscCompilationJobClient is the automation Client
|
||||
type DscCompilationJobClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewDscCompilationJobClient creates an instance of the
|
||||
// DscCompilationJobClient client.
|
||||
// NewDscCompilationJobClient creates an instance of the DscCompilationJobClient client.
|
||||
func NewDscCompilationJobClient(subscriptionID string) DscCompilationJobClient {
|
||||
return NewDscCompilationJobClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewDscCompilationJobClientWithBaseURI creates an instance of the
|
||||
// DscCompilationJobClient client.
|
||||
// NewDscCompilationJobClientWithBaseURI creates an instance of the DscCompilationJobClient client.
|
||||
func NewDscCompilationJobClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobClient {
|
||||
return DscCompilationJobClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create creates the Dsc compilation job of the configuration.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. compilationJobID is the the DSC configuration Id.
|
||||
// parameters is the parameters supplied to the create compilation job
|
||||
// operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. compilationJobID
|
||||
// is the the DSC configuration Id. parameters is the parameters supplied to the create compilation job operation.
|
||||
func (client DscCompilationJobClient) Create(resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID, parameters DscCompilationJobCreateParameters) (result DscCompilationJob, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -126,9 +120,8 @@ func (client DscCompilationJobClient) CreateResponder(resp *http.Response) (resu
|
||||
|
||||
// Get retrieve the Dsc configuration compilation job identified by job id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. compilationJobID is the Dsc configuration
|
||||
// compilation job id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. compilationJobID
|
||||
// is the Dsc configuration compilation job id.
|
||||
func (client DscCompilationJobClient) Get(resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID) (result DscCompilationJob, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -200,9 +193,8 @@ func (client DscCompilationJobClient) GetResponder(resp *http.Response) (result
|
||||
|
||||
// GetStream retrieve the job stream identified by job stream id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id. jobStreamID is the job stream
|
||||
// id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id. jobStreamID is the job stream id.
|
||||
func (client DscCompilationJobClient) GetStream(resourceGroupName string, automationAccountName string, jobID uuid.UUID, jobStreamID string) (result JobStream, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -275,8 +267,8 @@ func (client DscCompilationJobClient) GetStreamResponder(resp *http.Response) (r
|
||||
|
||||
// ListByAutomationAccount retrieve a list of dsc compilation jobs.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. filter is the filter to apply on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the
|
||||
// filter to apply on the operation.
|
||||
func (client DscCompilationJobClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result DscCompilationJobListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -371,3 +363,48 @@ func (client DscCompilationJobClient) ListByAutomationAccountNextResults(lastRes
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client DscCompilationJobClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, filter string, cancel <-chan struct{}) (<-chan DscCompilationJob, <-chan error) {
|
||||
resultChan := make(chan DscCompilationJob)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName, filter)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByAutomationAccountNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
+61
-23
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,30 +24,26 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// DscConfigurationClient is the composite Swagger json for Azure Automation
|
||||
// Client
|
||||
// DscConfigurationClient is the automation Client
|
||||
type DscConfigurationClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewDscConfigurationClient creates an instance of the DscConfigurationClient
|
||||
// client.
|
||||
// NewDscConfigurationClient creates an instance of the DscConfigurationClient client.
|
||||
func NewDscConfigurationClient(subscriptionID string) DscConfigurationClient {
|
||||
return NewDscConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewDscConfigurationClientWithBaseURI creates an instance of the
|
||||
// DscConfigurationClient client.
|
||||
// NewDscConfigurationClientWithBaseURI creates an instance of the DscConfigurationClient client.
|
||||
func NewDscConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscConfigurationClient {
|
||||
return DscConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create the configuration identified by configuration name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. configurationName is the create or update
|
||||
// parameters for configuration. parameters is the create or update parameters
|
||||
// for configuration.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// configurationName is the create or update parameters for configuration. parameters is the create or update
|
||||
// parameters for configuration.
|
||||
func (client DscConfigurationClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, configurationName string, parameters DscConfigurationCreateOrUpdateParameters) (result DscConfiguration, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -131,8 +126,8 @@ func (client DscConfigurationClient) CreateOrUpdateResponder(resp *http.Response
|
||||
|
||||
// Delete delete the dsc configuration identified by configuration name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. configurationName is the configuration name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// configurationName is the configuration name.
|
||||
func (client DscConfigurationClient) Delete(resourceGroupName string, automationAccountName string, configurationName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -203,8 +198,8 @@ func (client DscConfigurationClient) DeleteResponder(resp *http.Response) (resul
|
||||
|
||||
// Get retrieve the configuration identified by configuration name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. configurationName is the configuration name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// configurationName is the configuration name.
|
||||
func (client DscConfigurationClient) Get(resourceGroupName string, automationAccountName string, configurationName string) (result DscConfiguration, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -274,11 +269,10 @@ func (client DscConfigurationClient) GetResponder(resp *http.Response) (result D
|
||||
return
|
||||
}
|
||||
|
||||
// GetContent retrieve the configuration script identified by configuration
|
||||
// name.
|
||||
// GetContent retrieve the configuration script identified by configuration name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. configurationName is the configuration name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// configurationName is the configuration name.
|
||||
func (client DscConfigurationClient) GetContent(resourceGroupName string, automationAccountName string, configurationName string) (result ReadCloser, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -349,8 +343,7 @@ func (client DscConfigurationClient) GetContentResponder(resp *http.Response) (r
|
||||
|
||||
// ListByAutomationAccount retrieve a list of configurations.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client DscConfigurationClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result DscConfigurationListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -442,3 +435,48 @@ func (client DscConfigurationClient) ListByAutomationAccountNextResults(lastResu
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client DscConfigurationClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan DscConfiguration, <-chan error) {
|
||||
resultChan := make(chan DscConfiguration)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByAutomationAccountNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
+56
-13
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// DscNodeClient is the composite Swagger json for Azure Automation Client
|
||||
// DscNodeClient is the automation Client
|
||||
type DscNodeClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -42,8 +41,8 @@ func NewDscNodeClientWithBaseURI(baseURI string, subscriptionID string) DscNodeC
|
||||
|
||||
// Delete delete the dsc node identified by node id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is
|
||||
// automation account name. nodeID is the node id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is automation account name. nodeID is the node
|
||||
// id.
|
||||
func (client DscNodeClient) Delete(resourceGroupName string, automationAccountName string, nodeID string) (result DscNode, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -115,8 +114,8 @@ func (client DscNodeClient) DeleteResponder(resp *http.Response) (result DscNode
|
||||
|
||||
// Get retrieve the dsc node identified by node id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. nodeID is the node id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is the
|
||||
// node id.
|
||||
func (client DscNodeClient) Get(resourceGroupName string, automationAccountName string, nodeID string) (result DscNode, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -188,8 +187,8 @@ func (client DscNodeClient) GetResponder(resp *http.Response) (result DscNode, e
|
||||
|
||||
// ListByAutomationAccount retrieve a list of dsc nodes.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. filter is the filter to apply on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the
|
||||
// filter to apply on the operation.
|
||||
func (client DscNodeClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result DscNodeListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -285,11 +284,55 @@ func (client DscNodeClient) ListByAutomationAccountNextResults(lastResults DscNo
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client DscNodeClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, filter string, cancel <-chan struct{}) (<-chan DscNode, <-chan error) {
|
||||
resultChan := make(chan DscNode)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName, filter)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByAutomationAccountNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// Update update the dsc node.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. nodeID is parameters supplied to the update dsc
|
||||
// node. parameters is parameters supplied to the update dsc node.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is
|
||||
// parameters supplied to the update dsc node. parameters is parameters supplied to the update dsc node.
|
||||
func (client DscNodeClient) Update(resourceGroupName string, automationAccountName string, nodeID string, parameters DscNodeUpdateParameters) (result DscNode, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+60
-23
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,31 +24,26 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// DscNodeConfigurationClient is the composite Swagger json for Azure
|
||||
// Automation Client
|
||||
// DscNodeConfigurationClient is the automation Client
|
||||
type DscNodeConfigurationClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewDscNodeConfigurationClient creates an instance of the
|
||||
// DscNodeConfigurationClient client.
|
||||
// NewDscNodeConfigurationClient creates an instance of the DscNodeConfigurationClient client.
|
||||
func NewDscNodeConfigurationClient(subscriptionID string) DscNodeConfigurationClient {
|
||||
return NewDscNodeConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewDscNodeConfigurationClientWithBaseURI creates an instance of the
|
||||
// DscNodeConfigurationClient client.
|
||||
// NewDscNodeConfigurationClientWithBaseURI creates an instance of the DscNodeConfigurationClient client.
|
||||
func NewDscNodeConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscNodeConfigurationClient {
|
||||
return DscNodeConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create the node configuration identified by node
|
||||
// configuration name.
|
||||
// CreateOrUpdate create the node configuration identified by node configuration name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. nodeConfigurationName is the create or update
|
||||
// parameters for configuration. parameters is the create or update parameters
|
||||
// for configuration.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// nodeConfigurationName is the create or update parameters for configuration. parameters is the create or update
|
||||
// parameters for configuration.
|
||||
func (client DscNodeConfigurationClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, nodeConfigurationName string, parameters DscNodeConfigurationCreateOrUpdateParameters) (result DscNodeConfiguration, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -132,9 +126,8 @@ func (client DscNodeConfigurationClient) CreateOrUpdateResponder(resp *http.Resp
|
||||
|
||||
// Delete delete the Dsc node configurations by node configuration.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. nodeConfigurationName is the Dsc node configuration
|
||||
// name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// nodeConfigurationName is the Dsc node configuration name.
|
||||
func (client DscNodeConfigurationClient) Delete(resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -205,9 +198,8 @@ func (client DscNodeConfigurationClient) DeleteResponder(resp *http.Response) (r
|
||||
|
||||
// Get retrieve the Dsc node configurations by node configuration.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. nodeConfigurationName is the Dsc node configuration
|
||||
// name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// nodeConfigurationName is the Dsc node configuration name.
|
||||
func (client DscNodeConfigurationClient) Get(resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result DscNodeConfiguration, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -279,8 +271,8 @@ func (client DscNodeConfigurationClient) GetResponder(resp *http.Response) (resu
|
||||
|
||||
// ListByAutomationAccount retrieve a list of dsc node configurations.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. filter is the filter to apply on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the
|
||||
// filter to apply on the operation.
|
||||
func (client DscNodeConfigurationClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result DscNodeConfigurationListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -375,3 +367,48 @@ func (client DscNodeConfigurationClient) ListByAutomationAccountNextResults(last
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client DscNodeConfigurationClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, filter string, cancel <-chan struct{}) (<-chan DscNodeConfiguration, <-chan error) {
|
||||
resultChan := make(chan DscNodeConfiguration)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName, filter)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByAutomationAccountNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
+6
-9
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// FieldsClient is the composite Swagger json for Azure Automation Client
|
||||
// FieldsClient is the automation Client
|
||||
type FieldsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -40,12 +39,10 @@ func NewFieldsClientWithBaseURI(baseURI string, subscriptionID string) FieldsCli
|
||||
return FieldsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// ListByType retrieve a list of fields of a given type identified by module
|
||||
// name.
|
||||
// ListByType retrieve a list of fields of a given type identified by module name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. moduleName is the name of module. typeName is the
|
||||
// name of type.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is
|
||||
// the name of module. typeName is the name of type.
|
||||
func (client FieldsClient) ListByType(resourceGroupName string, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
Generated
Vendored
+57
-20
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,29 +24,25 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// HybridRunbookWorkerGroupClient is the composite Swagger json for Azure
|
||||
// Automation Client
|
||||
// HybridRunbookWorkerGroupClient is the automation Client
|
||||
type HybridRunbookWorkerGroupClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewHybridRunbookWorkerGroupClient creates an instance of the
|
||||
// HybridRunbookWorkerGroupClient client.
|
||||
// NewHybridRunbookWorkerGroupClient creates an instance of the HybridRunbookWorkerGroupClient client.
|
||||
func NewHybridRunbookWorkerGroupClient(subscriptionID string) HybridRunbookWorkerGroupClient {
|
||||
return NewHybridRunbookWorkerGroupClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the
|
||||
// HybridRunbookWorkerGroupClient client.
|
||||
// NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the HybridRunbookWorkerGroupClient client.
|
||||
func NewHybridRunbookWorkerGroupClientWithBaseURI(baseURI string, subscriptionID string) HybridRunbookWorkerGroupClient {
|
||||
return HybridRunbookWorkerGroupClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Delete delete a hybrid runbook worker group.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is
|
||||
// automation account name. hybridRunbookWorkerGroupName is the hybrid runbook
|
||||
// worker group name
|
||||
// resourceGroupName is the resource group name. automationAccountName is automation account name.
|
||||
// hybridRunbookWorkerGroupName is the hybrid runbook worker group name
|
||||
func (client HybridRunbookWorkerGroupClient) Delete(resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -118,9 +113,8 @@ func (client HybridRunbookWorkerGroupClient) DeleteResponder(resp *http.Response
|
||||
|
||||
// Get retrieve a hybrid runbook worker group.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. hybridRunbookWorkerGroupName is the hybrid runbook
|
||||
// worker group name
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// hybridRunbookWorkerGroupName is the hybrid runbook worker group name
|
||||
func (client HybridRunbookWorkerGroupClient) Get(resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result HybridRunbookWorkerGroup, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -192,8 +186,7 @@ func (client HybridRunbookWorkerGroupClient) GetResponder(resp *http.Response) (
|
||||
|
||||
// ListByAutomationAccount retrieve a list of hybrid runbook worker groups.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client HybridRunbookWorkerGroupClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result HybridRunbookWorkerGroupsListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -286,11 +279,55 @@ func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountNextResults(
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan HybridRunbookWorkerGroup, <-chan error) {
|
||||
resultChan := make(chan HybridRunbookWorkerGroup)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByAutomationAccountNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// Update update a hybrid runbook worker group.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. hybridRunbookWorkerGroupName is the hybrid runbook
|
||||
// worker group name parameters is the hybrid runbook worker group
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// hybridRunbookWorkerGroupName is the hybrid runbook worker group name parameters is the hybrid runbook worker group
|
||||
func (client HybridRunbookWorkerGroupClient) Update(resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, parameters HybridRunbookWorkerGroupUpdateParameters) (result HybridRunbookWorkerGroup, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+66
-24
@@ -14,19 +14,18 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
"github.com/Azure/go-autorest/autorest/azure"
|
||||
"github.com/Azure/go-autorest/autorest/validation"
|
||||
"github.com/satori/uuid"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// JobClient is the composite Swagger json for Azure Automation Client
|
||||
// JobClient is the automation Client
|
||||
type JobClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -43,9 +42,8 @@ func NewJobClientWithBaseURI(baseURI string, subscriptionID string) JobClient {
|
||||
|
||||
// Create create a job of the runbook.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id. parameters is the parameters
|
||||
// supplied to the create job operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id. parameters is the parameters supplied to the create job operation.
|
||||
func (client JobClient) Create(resourceGroupName string, automationAccountName string, jobID uuid.UUID, parameters JobCreateParameters) (result Job, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -122,8 +120,8 @@ func (client JobClient) CreateResponder(resp *http.Response) (result Job, err er
|
||||
|
||||
// Get retrieve the job identified by job id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id.
|
||||
func (client JobClient) Get(resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result Job, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -195,8 +193,8 @@ func (client JobClient) GetResponder(resp *http.Response) (result Job, err error
|
||||
|
||||
// GetOutput retrieve the job output identified by job id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id.
|
||||
func (client JobClient) GetOutput(resourceGroupName string, automationAccountName string, jobID string) (result ReadCloser, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -265,11 +263,10 @@ func (client JobClient) GetOutputResponder(resp *http.Response) (result ReadClos
|
||||
return
|
||||
}
|
||||
|
||||
// GetRunbookContent retrieve the runbook content of the job identified by job
|
||||
// id.
|
||||
// GetRunbookContent retrieve the runbook content of the job identified by job id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id.
|
||||
func (client JobClient) GetRunbookContent(resourceGroupName string, automationAccountName string, jobID string) (result ReadCloser, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -340,8 +337,8 @@ func (client JobClient) GetRunbookContentResponder(resp *http.Response) (result
|
||||
|
||||
// ListByAutomationAccount retrieve a list of jobs.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. filter is the filter to apply on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the
|
||||
// filter to apply on the operation.
|
||||
func (client JobClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result JobListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -437,10 +434,55 @@ func (client JobClient) ListByAutomationAccountNextResults(lastResults JobListRe
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client JobClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, filter string, cancel <-chan struct{}) (<-chan Job, <-chan error) {
|
||||
resultChan := make(chan Job)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName, filter)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByAutomationAccountNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// Resume resume the job identified by jobId.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id.
|
||||
func (client JobClient) Resume(resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -511,8 +553,8 @@ func (client JobClient) ResumeResponder(resp *http.Response) (result autorest.Re
|
||||
|
||||
// Stop stop the job identified by jobId.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id.
|
||||
func (client JobClient) Stop(resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -583,8 +625,8 @@ func (client JobClient) StopResponder(resp *http.Response) (result autorest.Resp
|
||||
|
||||
// Suspend suspend the job identified by jobId.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id.
|
||||
func (client JobClient) Suspend(resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+57
-16
@@ -14,19 +14,18 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
"github.com/Azure/go-autorest/autorest/azure"
|
||||
"github.com/Azure/go-autorest/autorest/validation"
|
||||
"github.com/satori/uuid"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// JobScheduleClient is the composite Swagger json for Azure Automation Client
|
||||
// JobScheduleClient is the automation Client
|
||||
type JobScheduleClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -36,17 +35,15 @@ func NewJobScheduleClient(subscriptionID string) JobScheduleClient {
|
||||
return NewJobScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient
|
||||
// client.
|
||||
// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client.
|
||||
func NewJobScheduleClientWithBaseURI(baseURI string, subscriptionID string) JobScheduleClient {
|
||||
return JobScheduleClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create create a job schedule.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobScheduleID is the job schedule name. parameters
|
||||
// is the parameters supplied to the create job schedule operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobScheduleID is
|
||||
// the job schedule name. parameters is the parameters supplied to the create job schedule operation.
|
||||
func (client JobScheduleClient) Create(resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID, parameters JobScheduleCreateParameters) (result JobSchedule, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -125,8 +122,8 @@ func (client JobScheduleClient) CreateResponder(resp *http.Response) (result Job
|
||||
|
||||
// Delete delete the job schedule identified by job schedule name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobScheduleID is the job schedule name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobScheduleID is
|
||||
// the job schedule name.
|
||||
func (client JobScheduleClient) Delete(resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -197,8 +194,8 @@ func (client JobScheduleClient) DeleteResponder(resp *http.Response) (result aut
|
||||
|
||||
// Get retrieve the job schedule identified by job schedule name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobScheduleID is the job schedule name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobScheduleID is
|
||||
// the job schedule name.
|
||||
func (client JobScheduleClient) Get(resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result JobSchedule, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -270,8 +267,7 @@ func (client JobScheduleClient) GetResponder(resp *http.Response) (result JobSch
|
||||
|
||||
// ListByAutomationAccount retrieve a list of job schedules.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client JobScheduleClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result JobScheduleListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -363,3 +359,48 @@ func (client JobScheduleClient) ListByAutomationAccountNextResults(lastResults J
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client JobScheduleClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan JobSchedule, <-chan error) {
|
||||
resultChan := make(chan JobSchedule)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByAutomationAccountNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
+53
-12
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// JobStreamClient is the composite Swagger json for Azure Automation Client
|
||||
// JobStreamClient is the automation Client
|
||||
type JobStreamClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,17 +34,15 @@ func NewJobStreamClient(subscriptionID string) JobStreamClient {
|
||||
return NewJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient
|
||||
// client.
|
||||
// NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient client.
|
||||
func NewJobStreamClientWithBaseURI(baseURI string, subscriptionID string) JobStreamClient {
|
||||
return JobStreamClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get retrieve the job stream identified by job stream id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id. jobStreamID is the job stream
|
||||
// id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id. jobStreamID is the job stream id.
|
||||
func (client JobStreamClient) Get(resourceGroupName string, automationAccountName string, jobID string, jobStreamID string) (result JobStream, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -118,9 +115,8 @@ func (client JobStreamClient) GetResponder(resp *http.Response) (result JobStrea
|
||||
|
||||
// ListByJob retrieve a list of jobs streams identified by job id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job Id. filter is the filter to apply
|
||||
// on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// Id. filter is the filter to apply on the operation.
|
||||
func (client JobStreamClient) ListByJob(resourceGroupName string, automationAccountName string, jobID string, filter string) (result JobStreamListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -216,3 +212,48 @@ func (client JobStreamClient) ListByJobNextResults(lastResults JobStreamListResu
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByJobComplete gets all elements from the list without paging.
|
||||
func (client JobStreamClient) ListByJobComplete(resourceGroupName string, automationAccountName string, jobID string, filter string, cancel <-chan struct{}) (<-chan JobStream, <-chan error) {
|
||||
resultChan := make(chan JobStream)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByJob(resourceGroupName, automationAccountName, jobID, filter)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByJobNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
+163
-258
@@ -14,15 +14,14 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
"github.com/Azure/go-autorest/autorest/date"
|
||||
"github.com/Azure/go-autorest/autorest/to"
|
||||
"github.com/satori/uuid"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"io"
|
||||
"net/http"
|
||||
)
|
||||
@@ -39,8 +38,7 @@ const (
|
||||
Unavailable AccountState = "Unavailable"
|
||||
)
|
||||
|
||||
// AgentRegistrationKeyName enumerates the values for agent registration key
|
||||
// name.
|
||||
// AgentRegistrationKeyName enumerates the values for agent registration key name.
|
||||
type AgentRegistrationKeyName string
|
||||
|
||||
const (
|
||||
@@ -54,20 +52,17 @@ const (
|
||||
type ContentSourceType string
|
||||
|
||||
const (
|
||||
// EmbeddedContent specifies the embedded content state for content source
|
||||
// type.
|
||||
// EmbeddedContent specifies the embedded content state for content source type.
|
||||
EmbeddedContent ContentSourceType = "embeddedContent"
|
||||
// URI specifies the uri state for content source type.
|
||||
URI ContentSourceType = "uri"
|
||||
)
|
||||
|
||||
// DscConfigurationProvisioningState enumerates the values for dsc
|
||||
// configuration provisioning state.
|
||||
// DscConfigurationProvisioningState enumerates the values for dsc configuration provisioning state.
|
||||
type DscConfigurationProvisioningState string
|
||||
|
||||
const (
|
||||
// Succeeded specifies the succeeded state for dsc configuration
|
||||
// provisioning state.
|
||||
// Succeeded specifies the succeeded state for dsc configuration provisioning state.
|
||||
Succeeded DscConfigurationProvisioningState = "Succeeded"
|
||||
)
|
||||
|
||||
@@ -75,14 +70,11 @@ const (
|
||||
type DscConfigurationState string
|
||||
|
||||
const (
|
||||
// DscConfigurationStateEdit specifies the dsc configuration state edit
|
||||
// state for dsc configuration state.
|
||||
// DscConfigurationStateEdit specifies the dsc configuration state edit state for dsc configuration state.
|
||||
DscConfigurationStateEdit DscConfigurationState = "Edit"
|
||||
// DscConfigurationStateNew specifies the dsc configuration state new state
|
||||
// for dsc configuration state.
|
||||
// DscConfigurationStateNew specifies the dsc configuration state new state for dsc configuration state.
|
||||
DscConfigurationStateNew DscConfigurationState = "New"
|
||||
// DscConfigurationStatePublished specifies the dsc configuration state
|
||||
// published state for dsc configuration state.
|
||||
// DscConfigurationStatePublished specifies the dsc configuration state published state for dsc configuration state.
|
||||
DscConfigurationStatePublished DscConfigurationState = "Published"
|
||||
)
|
||||
|
||||
@@ -104,8 +96,7 @@ const (
|
||||
Continue HTTPStatusCode = "Continue"
|
||||
// Created specifies the created state for http status code.
|
||||
Created HTTPStatusCode = "Created"
|
||||
// ExpectationFailed specifies the expectation failed state for http status
|
||||
// code.
|
||||
// ExpectationFailed specifies the expectation failed state for http status code.
|
||||
ExpectationFailed HTTPStatusCode = "ExpectationFailed"
|
||||
// Forbidden specifies the forbidden state for http status code.
|
||||
Forbidden HTTPStatusCode = "Forbidden"
|
||||
@@ -115,29 +106,23 @@ const (
|
||||
GatewayTimeout HTTPStatusCode = "GatewayTimeout"
|
||||
// Gone specifies the gone state for http status code.
|
||||
Gone HTTPStatusCode = "Gone"
|
||||
// HTTPVersionNotSupported specifies the http version not supported state
|
||||
// for http status code.
|
||||
// HTTPVersionNotSupported specifies the http version not supported state for http status code.
|
||||
HTTPVersionNotSupported HTTPStatusCode = "HttpVersionNotSupported"
|
||||
// InternalServerError specifies the internal server error state for http
|
||||
// status code.
|
||||
// InternalServerError specifies the internal server error state for http status code.
|
||||
InternalServerError HTTPStatusCode = "InternalServerError"
|
||||
// LengthRequired specifies the length required state for http status code.
|
||||
LengthRequired HTTPStatusCode = "LengthRequired"
|
||||
// MethodNotAllowed specifies the method not allowed state for http status
|
||||
// code.
|
||||
// MethodNotAllowed specifies the method not allowed state for http status code.
|
||||
MethodNotAllowed HTTPStatusCode = "MethodNotAllowed"
|
||||
// Moved specifies the moved state for http status code.
|
||||
Moved HTTPStatusCode = "Moved"
|
||||
// MovedPermanently specifies the moved permanently state for http status
|
||||
// code.
|
||||
// MovedPermanently specifies the moved permanently state for http status code.
|
||||
MovedPermanently HTTPStatusCode = "MovedPermanently"
|
||||
// MultipleChoices specifies the multiple choices state for http status
|
||||
// code.
|
||||
// MultipleChoices specifies the multiple choices state for http status code.
|
||||
MultipleChoices HTTPStatusCode = "MultipleChoices"
|
||||
// NoContent specifies the no content state for http status code.
|
||||
NoContent HTTPStatusCode = "NoContent"
|
||||
// NonAuthoritativeInformation specifies the non authoritative information
|
||||
// state for http status code.
|
||||
// NonAuthoritativeInformation specifies the non authoritative information state for http status code.
|
||||
NonAuthoritativeInformation HTTPStatusCode = "NonAuthoritativeInformation"
|
||||
// NotAcceptable specifies the not acceptable state for http status code.
|
||||
NotAcceptable HTTPStatusCode = "NotAcceptable"
|
||||
@@ -151,55 +136,43 @@ const (
|
||||
OK HTTPStatusCode = "OK"
|
||||
// PartialContent specifies the partial content state for http status code.
|
||||
PartialContent HTTPStatusCode = "PartialContent"
|
||||
// PaymentRequired specifies the payment required state for http status
|
||||
// code.
|
||||
// PaymentRequired specifies the payment required state for http status code.
|
||||
PaymentRequired HTTPStatusCode = "PaymentRequired"
|
||||
// PreconditionFailed specifies the precondition failed state for http
|
||||
// status code.
|
||||
// PreconditionFailed specifies the precondition failed state for http status code.
|
||||
PreconditionFailed HTTPStatusCode = "PreconditionFailed"
|
||||
// ProxyAuthenticationRequired specifies the proxy authentication required
|
||||
// state for http status code.
|
||||
// ProxyAuthenticationRequired specifies the proxy authentication required state for http status code.
|
||||
ProxyAuthenticationRequired HTTPStatusCode = "ProxyAuthenticationRequired"
|
||||
// Redirect specifies the redirect state for http status code.
|
||||
Redirect HTTPStatusCode = "Redirect"
|
||||
// RedirectKeepVerb specifies the redirect keep verb state for http status
|
||||
// code.
|
||||
// RedirectKeepVerb specifies the redirect keep verb state for http status code.
|
||||
RedirectKeepVerb HTTPStatusCode = "RedirectKeepVerb"
|
||||
// RedirectMethod specifies the redirect method state for http status code.
|
||||
RedirectMethod HTTPStatusCode = "RedirectMethod"
|
||||
// RequestedRangeNotSatisfiable specifies the requested range not
|
||||
// satisfiable state for http status code.
|
||||
// RequestedRangeNotSatisfiable specifies the requested range not satisfiable state for http status code.
|
||||
RequestedRangeNotSatisfiable HTTPStatusCode = "RequestedRangeNotSatisfiable"
|
||||
// RequestEntityTooLarge specifies the request entity too large state for
|
||||
// http status code.
|
||||
// RequestEntityTooLarge specifies the request entity too large state for http status code.
|
||||
RequestEntityTooLarge HTTPStatusCode = "RequestEntityTooLarge"
|
||||
// RequestTimeout specifies the request timeout state for http status code.
|
||||
RequestTimeout HTTPStatusCode = "RequestTimeout"
|
||||
// RequestURITooLong specifies the request uri too long state for http
|
||||
// status code.
|
||||
// RequestURITooLong specifies the request uri too long state for http status code.
|
||||
RequestURITooLong HTTPStatusCode = "RequestUriTooLong"
|
||||
// ResetContent specifies the reset content state for http status code.
|
||||
ResetContent HTTPStatusCode = "ResetContent"
|
||||
// SeeOther specifies the see other state for http status code.
|
||||
SeeOther HTTPStatusCode = "SeeOther"
|
||||
// ServiceUnavailable specifies the service unavailable state for http
|
||||
// status code.
|
||||
// ServiceUnavailable specifies the service unavailable state for http status code.
|
||||
ServiceUnavailable HTTPStatusCode = "ServiceUnavailable"
|
||||
// SwitchingProtocols specifies the switching protocols state for http
|
||||
// status code.
|
||||
// SwitchingProtocols specifies the switching protocols state for http status code.
|
||||
SwitchingProtocols HTTPStatusCode = "SwitchingProtocols"
|
||||
// TemporaryRedirect specifies the temporary redirect state for http status
|
||||
// code.
|
||||
// TemporaryRedirect specifies the temporary redirect state for http status code.
|
||||
TemporaryRedirect HTTPStatusCode = "TemporaryRedirect"
|
||||
// Unauthorized specifies the unauthorized state for http status code.
|
||||
Unauthorized HTTPStatusCode = "Unauthorized"
|
||||
// UnsupportedMediaType specifies the unsupported media type state for http
|
||||
// status code.
|
||||
// UnsupportedMediaType specifies the unsupported media type state for http status code.
|
||||
UnsupportedMediaType HTTPStatusCode = "UnsupportedMediaType"
|
||||
// Unused specifies the unused state for http status code.
|
||||
Unused HTTPStatusCode = "Unused"
|
||||
// UpgradeRequired specifies the upgrade required state for http status
|
||||
// code.
|
||||
// UpgradeRequired specifies the upgrade required state for http status code.
|
||||
UpgradeRequired HTTPStatusCode = "UpgradeRequired"
|
||||
// UseProxy specifies the use proxy state for http status code.
|
||||
UseProxy HTTPStatusCode = "UseProxy"
|
||||
@@ -209,39 +182,31 @@ const (
|
||||
type JobStatus string
|
||||
|
||||
const (
|
||||
// JobStatusActivating specifies the job status activating state for job
|
||||
// status.
|
||||
// JobStatusActivating specifies the job status activating state for job status.
|
||||
JobStatusActivating JobStatus = "Activating"
|
||||
// JobStatusBlocked specifies the job status blocked state for job status.
|
||||
JobStatusBlocked JobStatus = "Blocked"
|
||||
// JobStatusCompleted specifies the job status completed state for job
|
||||
// status.
|
||||
// JobStatusCompleted specifies the job status completed state for job status.
|
||||
JobStatusCompleted JobStatus = "Completed"
|
||||
// JobStatusDisconnected specifies the job status disconnected state for
|
||||
// job status.
|
||||
// JobStatusDisconnected specifies the job status disconnected state for job status.
|
||||
JobStatusDisconnected JobStatus = "Disconnected"
|
||||
// JobStatusFailed specifies the job status failed state for job status.
|
||||
JobStatusFailed JobStatus = "Failed"
|
||||
// JobStatusNew specifies the job status new state for job status.
|
||||
JobStatusNew JobStatus = "New"
|
||||
// JobStatusRemoving specifies the job status removing state for job
|
||||
// status.
|
||||
// JobStatusRemoving specifies the job status removing state for job status.
|
||||
JobStatusRemoving JobStatus = "Removing"
|
||||
// JobStatusResuming specifies the job status resuming state for job
|
||||
// status.
|
||||
// JobStatusResuming specifies the job status resuming state for job status.
|
||||
JobStatusResuming JobStatus = "Resuming"
|
||||
// JobStatusRunning specifies the job status running state for job status.
|
||||
JobStatusRunning JobStatus = "Running"
|
||||
// JobStatusStopped specifies the job status stopped state for job status.
|
||||
JobStatusStopped JobStatus = "Stopped"
|
||||
// JobStatusStopping specifies the job status stopping state for job
|
||||
// status.
|
||||
// JobStatusStopping specifies the job status stopping state for job status.
|
||||
JobStatusStopping JobStatus = "Stopping"
|
||||
// JobStatusSuspended specifies the job status suspended state for job
|
||||
// status.
|
||||
// JobStatusSuspended specifies the job status suspended state for job status.
|
||||
JobStatusSuspended JobStatus = "Suspended"
|
||||
// JobStatusSuspending specifies the job status suspending state for job
|
||||
// status.
|
||||
// JobStatusSuspending specifies the job status suspending state for job status.
|
||||
JobStatusSuspending JobStatus = "Suspending"
|
||||
)
|
||||
|
||||
@@ -269,72 +234,60 @@ const (
|
||||
type ModuleProvisioningState string
|
||||
|
||||
const (
|
||||
// ModuleProvisioningStateActivitiesStored specifies the module
|
||||
// provisioning state activities stored state for module provisioning
|
||||
// state.
|
||||
// ModuleProvisioningStateActivitiesStored specifies the module provisioning state activities stored state for module
|
||||
// provisioning state.
|
||||
ModuleProvisioningStateActivitiesStored ModuleProvisioningState = "ActivitiesStored"
|
||||
// ModuleProvisioningStateCancelled specifies the module provisioning state
|
||||
// cancelled state for module provisioning state.
|
||||
// ModuleProvisioningStateCancelled specifies the module provisioning state cancelled state for module provisioning
|
||||
// state.
|
||||
ModuleProvisioningStateCancelled ModuleProvisioningState = "Cancelled"
|
||||
// ModuleProvisioningStateConnectionTypeImported specifies the module
|
||||
// provisioning state connection type imported state for module
|
||||
// provisioning state.
|
||||
// ModuleProvisioningStateConnectionTypeImported specifies the module provisioning state connection type imported state
|
||||
// for module provisioning state.
|
||||
ModuleProvisioningStateConnectionTypeImported ModuleProvisioningState = "ConnectionTypeImported"
|
||||
// ModuleProvisioningStateContentDownloaded specifies the module
|
||||
// provisioning state content downloaded state for module provisioning
|
||||
// state.
|
||||
// ModuleProvisioningStateContentDownloaded specifies the module provisioning state content downloaded state for module
|
||||
// provisioning state.
|
||||
ModuleProvisioningStateContentDownloaded ModuleProvisioningState = "ContentDownloaded"
|
||||
// ModuleProvisioningStateContentRetrieved specifies the module
|
||||
// provisioning state content retrieved state for module provisioning
|
||||
// state.
|
||||
// ModuleProvisioningStateContentRetrieved specifies the module provisioning state content retrieved state for module
|
||||
// provisioning state.
|
||||
ModuleProvisioningStateContentRetrieved ModuleProvisioningState = "ContentRetrieved"
|
||||
// ModuleProvisioningStateContentStored specifies the module provisioning
|
||||
// state content stored state for module provisioning state.
|
||||
// ModuleProvisioningStateContentStored specifies the module provisioning state content stored state for module
|
||||
// provisioning state.
|
||||
ModuleProvisioningStateContentStored ModuleProvisioningState = "ContentStored"
|
||||
// ModuleProvisioningStateContentValidated specifies the module
|
||||
// provisioning state content validated state for module provisioning
|
||||
// state.
|
||||
// ModuleProvisioningStateContentValidated specifies the module provisioning state content validated state for module
|
||||
// provisioning state.
|
||||
ModuleProvisioningStateContentValidated ModuleProvisioningState = "ContentValidated"
|
||||
// ModuleProvisioningStateCreated specifies the module provisioning state
|
||||
// created state for module provisioning state.
|
||||
// ModuleProvisioningStateCreated specifies the module provisioning state created state for module provisioning state.
|
||||
ModuleProvisioningStateCreated ModuleProvisioningState = "Created"
|
||||
// ModuleProvisioningStateCreating specifies the module provisioning state
|
||||
// creating state for module provisioning state.
|
||||
ModuleProvisioningStateCreating ModuleProvisioningState = "Creating"
|
||||
// ModuleProvisioningStateFailed specifies the module provisioning state
|
||||
// failed state for module provisioning state.
|
||||
ModuleProvisioningStateFailed ModuleProvisioningState = "Failed"
|
||||
// ModuleProvisioningStateModuleDataStored specifies the module
|
||||
// provisioning state module data stored state for module provisioning
|
||||
// ModuleProvisioningStateCreating specifies the module provisioning state creating state for module provisioning
|
||||
// state.
|
||||
ModuleProvisioningStateCreating ModuleProvisioningState = "Creating"
|
||||
// ModuleProvisioningStateFailed specifies the module provisioning state failed state for module provisioning state.
|
||||
ModuleProvisioningStateFailed ModuleProvisioningState = "Failed"
|
||||
// ModuleProvisioningStateModuleDataStored specifies the module provisioning state module data stored state for module
|
||||
// provisioning state.
|
||||
ModuleProvisioningStateModuleDataStored ModuleProvisioningState = "ModuleDataStored"
|
||||
// ModuleProvisioningStateModuleImportRunbookComplete specifies the module
|
||||
// provisioning state module import runbook complete state for module
|
||||
// provisioning state.
|
||||
// ModuleProvisioningStateModuleImportRunbookComplete specifies the module provisioning state module import runbook
|
||||
// complete state for module provisioning state.
|
||||
ModuleProvisioningStateModuleImportRunbookComplete ModuleProvisioningState = "ModuleImportRunbookComplete"
|
||||
// ModuleProvisioningStateRunningImportModuleRunbook specifies the module
|
||||
// provisioning state running import module runbook state for module
|
||||
// provisioning state.
|
||||
// ModuleProvisioningStateRunningImportModuleRunbook specifies the module provisioning state running import module
|
||||
// runbook state for module provisioning state.
|
||||
ModuleProvisioningStateRunningImportModuleRunbook ModuleProvisioningState = "RunningImportModuleRunbook"
|
||||
// ModuleProvisioningStateStartingImportModuleRunbook specifies the module
|
||||
// provisioning state starting import module runbook state for module
|
||||
// provisioning state.
|
||||
// ModuleProvisioningStateStartingImportModuleRunbook specifies the module provisioning state starting import module
|
||||
// runbook state for module provisioning state.
|
||||
ModuleProvisioningStateStartingImportModuleRunbook ModuleProvisioningState = "StartingImportModuleRunbook"
|
||||
// ModuleProvisioningStateSucceeded specifies the module provisioning state
|
||||
// succeeded state for module provisioning state.
|
||||
// ModuleProvisioningStateSucceeded specifies the module provisioning state succeeded state for module provisioning
|
||||
// state.
|
||||
ModuleProvisioningStateSucceeded ModuleProvisioningState = "Succeeded"
|
||||
// ModuleProvisioningStateUpdating specifies the module provisioning state
|
||||
// updating state for module provisioning state.
|
||||
// ModuleProvisioningStateUpdating specifies the module provisioning state updating state for module provisioning
|
||||
// state.
|
||||
ModuleProvisioningStateUpdating ModuleProvisioningState = "Updating"
|
||||
)
|
||||
|
||||
// RunbookProvisioningState enumerates the values for runbook provisioning
|
||||
// state.
|
||||
// RunbookProvisioningState enumerates the values for runbook provisioning state.
|
||||
type RunbookProvisioningState string
|
||||
|
||||
const (
|
||||
// RunbookProvisioningStateSucceeded specifies the runbook provisioning
|
||||
// state succeeded state for runbook provisioning state.
|
||||
// RunbookProvisioningStateSucceeded specifies the runbook provisioning state succeeded state for runbook provisioning
|
||||
// state.
|
||||
RunbookProvisioningStateSucceeded RunbookProvisioningState = "Succeeded"
|
||||
)
|
||||
|
||||
@@ -342,13 +295,11 @@ const (
|
||||
type RunbookState string
|
||||
|
||||
const (
|
||||
// RunbookStateEdit specifies the runbook state edit state for runbook
|
||||
// state.
|
||||
// RunbookStateEdit specifies the runbook state edit state for runbook state.
|
||||
RunbookStateEdit RunbookState = "Edit"
|
||||
// RunbookStateNew specifies the runbook state new state for runbook state.
|
||||
RunbookStateNew RunbookState = "New"
|
||||
// RunbookStatePublished specifies the runbook state published state for
|
||||
// runbook state.
|
||||
// RunbookStatePublished specifies the runbook state published state for runbook state.
|
||||
RunbookStatePublished RunbookState = "Published"
|
||||
)
|
||||
|
||||
@@ -358,16 +309,13 @@ type RunbookTypeEnum string
|
||||
const (
|
||||
// Graph specifies the graph state for runbook type enum.
|
||||
Graph RunbookTypeEnum = "Graph"
|
||||
// GraphPowerShell specifies the graph power shell state for runbook type
|
||||
// enum.
|
||||
// GraphPowerShell specifies the graph power shell state for runbook type enum.
|
||||
GraphPowerShell RunbookTypeEnum = "GraphPowerShell"
|
||||
// GraphPowerShellWorkflow specifies the graph power shell workflow state
|
||||
// for runbook type enum.
|
||||
// GraphPowerShellWorkflow specifies the graph power shell workflow state for runbook type enum.
|
||||
GraphPowerShellWorkflow RunbookTypeEnum = "GraphPowerShellWorkflow"
|
||||
// PowerShell specifies the power shell state for runbook type enum.
|
||||
PowerShell RunbookTypeEnum = "PowerShell"
|
||||
// PowerShellWorkflow specifies the power shell workflow state for runbook
|
||||
// type enum.
|
||||
// PowerShellWorkflow specifies the power shell workflow state for runbook type enum.
|
||||
PowerShellWorkflow RunbookTypeEnum = "PowerShellWorkflow"
|
||||
// Script specifies the script state for runbook type enum.
|
||||
Script RunbookTypeEnum = "Script"
|
||||
@@ -431,8 +379,7 @@ type Account struct {
|
||||
Etag *string `json:"etag,omitempty"`
|
||||
}
|
||||
|
||||
// AccountCreateOrUpdateParameters is the parameters supplied to the create or
|
||||
// update automation account operation.
|
||||
// AccountCreateOrUpdateParameters is the parameters supplied to the create or update automation account operation.
|
||||
type AccountCreateOrUpdateParameters struct {
|
||||
*AccountCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
@@ -440,8 +387,7 @@ type AccountCreateOrUpdateParameters struct {
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// AccountCreateOrUpdateProperties is the parameters supplied to the create or
|
||||
// update account properties.
|
||||
// AccountCreateOrUpdateProperties is the parameters supplied to the create or update account properties.
|
||||
type AccountCreateOrUpdateProperties struct {
|
||||
Sku *Sku `json:"sku,omitempty"`
|
||||
}
|
||||
@@ -475,8 +421,7 @@ type AccountProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// AccountUpdateParameters is the parameters supplied to the update automation
|
||||
// account operation.
|
||||
// AccountUpdateParameters is the parameters supplied to the update automation account operation.
|
||||
type AccountUpdateParameters struct {
|
||||
*AccountUpdateProperties `json:"properties,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
@@ -484,8 +429,7 @@ type AccountUpdateParameters struct {
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// AccountUpdateProperties is the parameters supplied to the update account
|
||||
// properties.
|
||||
// AccountUpdateProperties is the parameters supplied to the update account properties.
|
||||
type AccountUpdateProperties struct {
|
||||
Sku *Sku `json:"sku,omitempty"`
|
||||
}
|
||||
@@ -558,8 +502,7 @@ type AdvancedSchedule struct {
|
||||
MonthlyOccurrences *[]AdvancedScheduleMonthlyOccurrence `json:"monthlyOccurrences,omitempty"`
|
||||
}
|
||||
|
||||
// AdvancedScheduleMonthlyOccurrence is the properties of the create advanced
|
||||
// schedule monthly occurrence.
|
||||
// AdvancedScheduleMonthlyOccurrence is the properties of the create advanced schedule monthly occurrence.
|
||||
type AdvancedScheduleMonthlyOccurrence struct {
|
||||
Occurrence *int32 `json:"occurrence,omitempty"`
|
||||
Day ScheduleDay `json:"day,omitempty"`
|
||||
@@ -580,8 +523,7 @@ type AgentRegistrationKeys struct {
|
||||
Secondary *string `json:"secondary,omitempty"`
|
||||
}
|
||||
|
||||
// AgentRegistrationRegenerateKeyParameter is the parameters supplied to the
|
||||
// regenerate keys operation.
|
||||
// AgentRegistrationRegenerateKeyParameter is the parameters supplied to the regenerate keys operation.
|
||||
type AgentRegistrationRegenerateKeyParameter struct {
|
||||
KeyName AgentRegistrationKeyName `json:"keyName,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
@@ -597,15 +539,14 @@ type Certificate struct {
|
||||
*CertificateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// CertificateCreateOrUpdateParameters is the parameters supplied to the create
|
||||
// or update or replace certificate operation.
|
||||
// CertificateCreateOrUpdateParameters is the parameters supplied to the create or update or replace certificate
|
||||
// operation.
|
||||
type CertificateCreateOrUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*CertificateCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// CertificateCreateOrUpdateProperties is the properties of the create
|
||||
// certificate operation.
|
||||
// CertificateCreateOrUpdateProperties is the properties of the create certificate operation.
|
||||
type CertificateCreateOrUpdateProperties struct {
|
||||
Base64Value *string `json:"base64Value,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
@@ -613,8 +554,7 @@ type CertificateCreateOrUpdateProperties struct {
|
||||
IsExportable *bool `json:"isExportable,omitempty"`
|
||||
}
|
||||
|
||||
// CertificateListResult is the response model for the list certificate
|
||||
// operation.
|
||||
// CertificateListResult is the response model for the list certificate operation.
|
||||
type CertificateListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Certificate `json:"value,omitempty"`
|
||||
@@ -643,15 +583,13 @@ type CertificateProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// CertificateUpdateParameters is the parameters supplied to the update
|
||||
// certificate operation.
|
||||
// CertificateUpdateParameters is the parameters supplied to the update certificate operation.
|
||||
type CertificateUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*CertificateUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// CertificateUpdateProperties is the properties of the update certificate
|
||||
// operation
|
||||
// CertificateUpdateProperties is the properties of the update certificate operation
|
||||
type CertificateUpdateProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
@@ -664,23 +602,20 @@ type Connection struct {
|
||||
*ConnectionProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionCreateOrUpdateParameters is the parameters supplied to the create
|
||||
// or update connection operation.
|
||||
// ConnectionCreateOrUpdateParameters is the parameters supplied to the create or update connection operation.
|
||||
type ConnectionCreateOrUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*ConnectionCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionCreateOrUpdateProperties is the properties of the create
|
||||
// connection properties
|
||||
// ConnectionCreateOrUpdateProperties is the properties of the create connection properties
|
||||
type ConnectionCreateOrUpdateProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
ConnectionType *ConnectionTypeAssociationProperty `json:"connectionType,omitempty"`
|
||||
FieldDefinitionValues *map[string]*string `json:"fieldDefinitionValues,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionListResult is the response model for the list connection
|
||||
// operation.
|
||||
// ConnectionListResult is the response model for the list connection operation.
|
||||
type ConnectionListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Connection `json:"value,omitempty"`
|
||||
@@ -716,28 +651,24 @@ type ConnectionType struct {
|
||||
*ConnectionTypeProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionTypeAssociationProperty is the connection type property associated
|
||||
// with the entity.
|
||||
// ConnectionTypeAssociationProperty is the connection type property associated with the entity.
|
||||
type ConnectionTypeAssociationProperty struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionTypeCreateOrUpdateParameters is the parameters supplied to the
|
||||
// create or update connection type operation.
|
||||
// ConnectionTypeCreateOrUpdateParameters is the parameters supplied to the create or update connection type operation.
|
||||
type ConnectionTypeCreateOrUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*ConnectionTypeCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionTypeCreateOrUpdateProperties is the properties of the create
|
||||
// connection type.
|
||||
// ConnectionTypeCreateOrUpdateProperties is the properties of the create connection type.
|
||||
type ConnectionTypeCreateOrUpdateProperties struct {
|
||||
IsGlobal *bool `json:"isGlobal,omitempty"`
|
||||
FieldDefinitions *map[string]*FieldDefinition `json:"fieldDefinitions,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionTypeListResult is the response model for the list connection type
|
||||
// operation.
|
||||
// ConnectionTypeListResult is the response model for the list connection type operation.
|
||||
type ConnectionTypeListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]ConnectionType `json:"value,omitempty"`
|
||||
@@ -765,15 +696,13 @@ type ConnectionTypeProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionUpdateParameters is the parameters supplied to the update
|
||||
// connection operation.
|
||||
// ConnectionUpdateParameters is the parameters supplied to the update connection operation.
|
||||
type ConnectionUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*ConnectionUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionUpdateProperties is the properties of the update connection
|
||||
// operation.
|
||||
// ConnectionUpdateProperties is the properties of the update connection operation.
|
||||
type ConnectionUpdateProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
FieldDefinitionValues *map[string]*string `json:"fieldDefinitionValues,omitempty"`
|
||||
@@ -808,23 +737,20 @@ type Credential struct {
|
||||
*CredentialProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// CredentialCreateOrUpdateParameters is the parameters supplied to the create
|
||||
// or update credential operation.
|
||||
// CredentialCreateOrUpdateParameters is the parameters supplied to the create or update credential operation.
|
||||
type CredentialCreateOrUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*CredentialCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// CredentialCreateOrUpdateProperties is the properties of the create
|
||||
// cerdential operation.
|
||||
// CredentialCreateOrUpdateProperties is the properties of the create cerdential operation.
|
||||
type CredentialCreateOrUpdateProperties struct {
|
||||
UserName *string `json:"userName,omitempty"`
|
||||
Password *string `json:"password,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// CredentialListResult is the response model for the list credential
|
||||
// operation.
|
||||
// CredentialListResult is the response model for the list credential operation.
|
||||
type CredentialListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Credential `json:"value,omitempty"`
|
||||
@@ -851,8 +777,7 @@ type CredentialProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// CredentialUpdateParameters is the parameters supplied to the Update
|
||||
// credential operation.
|
||||
// CredentialUpdateParameters is the parameters supplied to the Update credential operation.
|
||||
type CredentialUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*CredentialUpdateProperties `json:"properties,omitempty"`
|
||||
@@ -872,8 +797,7 @@ type DscCompilationJob struct {
|
||||
*DscCompilationJobProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// DscCompilationJobCreateParameters is the parameters supplied to the create
|
||||
// compilation job operation.
|
||||
// DscCompilationJobCreateParameters is the parameters supplied to the create compilation job operation.
|
||||
type DscCompilationJobCreateParameters struct {
|
||||
*DscCompilationJobCreateProperties `json:"properties,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
@@ -881,15 +805,13 @@ type DscCompilationJobCreateParameters struct {
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// DscCompilationJobCreateProperties is the parameters supplied to the create
|
||||
// compilation job operation.
|
||||
// DscCompilationJobCreateProperties is the parameters supplied to the create compilation job operation.
|
||||
type DscCompilationJobCreateProperties struct {
|
||||
Configuration *DscConfigurationAssociationProperty `json:"configuration,omitempty"`
|
||||
Parameters *map[string]*string `json:"parameters,omitempty"`
|
||||
}
|
||||
|
||||
// DscCompilationJobListResult is the response model for the list job
|
||||
// operation.
|
||||
// DscCompilationJobListResult is the response model for the list job operation.
|
||||
type DscCompilationJobListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]DscCompilationJob `json:"value,omitempty"`
|
||||
@@ -936,14 +858,12 @@ type DscConfiguration struct {
|
||||
Etag *string `json:"etag,omitempty"`
|
||||
}
|
||||
|
||||
// DscConfigurationAssociationProperty is the Dsc configuration property
|
||||
// associated with the entity.
|
||||
// DscConfigurationAssociationProperty is the Dsc configuration property associated with the entity.
|
||||
type DscConfigurationAssociationProperty struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// DscConfigurationCreateOrUpdateParameters is the parameters supplied to the
|
||||
// create or update configuration operation.
|
||||
// DscConfigurationCreateOrUpdateParameters is the parameters supplied to the create or update configuration operation.
|
||||
type DscConfigurationCreateOrUpdateParameters struct {
|
||||
*DscConfigurationCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
@@ -951,8 +871,7 @@ type DscConfigurationCreateOrUpdateParameters struct {
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// DscConfigurationCreateOrUpdateProperties is the properties to create or
|
||||
// update configuration.
|
||||
// DscConfigurationCreateOrUpdateProperties is the properties to create or update configuration.
|
||||
type DscConfigurationCreateOrUpdateProperties struct {
|
||||
LogVerbose *bool `json:"logVerbose,omitempty"`
|
||||
LogProgress *bool `json:"logProgress,omitempty"`
|
||||
@@ -961,8 +880,7 @@ type DscConfigurationCreateOrUpdateProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// DscConfigurationListResult is the response model for the list configuration
|
||||
// operation.
|
||||
// DscConfigurationListResult is the response model for the list configuration operation.
|
||||
type DscConfigurationListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]DscConfiguration `json:"value,omitempty"`
|
||||
@@ -1041,22 +959,20 @@ type DscNodeConfiguration struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
// DscNodeConfigurationAssociationProperty is the dsc nodeconfiguration
|
||||
// property associated with the entity.
|
||||
// DscNodeConfigurationAssociationProperty is the dsc nodeconfiguration property associated with the entity.
|
||||
type DscNodeConfigurationAssociationProperty struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// DscNodeConfigurationCreateOrUpdateParameters is the parameters supplied to
|
||||
// the create or update node configuration operation.
|
||||
// DscNodeConfigurationCreateOrUpdateParameters is the parameters supplied to the create or update node configuration
|
||||
// operation.
|
||||
type DscNodeConfigurationCreateOrUpdateParameters struct {
|
||||
Source *ContentSource `json:"source,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Configuration *DscConfigurationAssociationProperty `json:"configuration,omitempty"`
|
||||
}
|
||||
|
||||
// DscNodeConfigurationListResult is the response model for the list job
|
||||
// operation.
|
||||
// DscNodeConfigurationListResult is the response model for the list job operation.
|
||||
type DscNodeConfigurationListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]DscNodeConfiguration `json:"value,omitempty"`
|
||||
@@ -1118,8 +1034,7 @@ type DscNodeReport struct {
|
||||
RawErrors *string `json:"rawErrors,omitempty"`
|
||||
}
|
||||
|
||||
// DscNodeReportListResult is the response model for the list dsc nodes
|
||||
// operation.
|
||||
// DscNodeReportListResult is the response model for the list dsc nodes operation.
|
||||
type DscNodeReportListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]DscNodeReport `json:"value,omitempty"`
|
||||
@@ -1138,8 +1053,7 @@ func (client DscNodeReportListResult) DscNodeReportListResultPreparer() (*http.R
|
||||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// DscNodeUpdateParameters is the parameters supplied to the update dsc node
|
||||
// operation.
|
||||
// DscNodeUpdateParameters is the parameters supplied to the update dsc node operation.
|
||||
type DscNodeUpdateParameters struct {
|
||||
NodeID *string `json:"nodeId,omitempty"`
|
||||
NodeConfiguration *DscNodeConfigurationAssociationProperty `json:"nodeConfiguration,omitempty"`
|
||||
@@ -1203,8 +1117,7 @@ type HybridRunbookWorkerGroup struct {
|
||||
Credential *RunAsCredentialAssociationProperty `json:"credential,omitempty"`
|
||||
}
|
||||
|
||||
// HybridRunbookWorkerGroupsListResult is the response model for the list
|
||||
// hybrid runbook worker groups.
|
||||
// HybridRunbookWorkerGroupsListResult is the response model for the list hybrid runbook worker groups.
|
||||
type HybridRunbookWorkerGroupsListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]HybridRunbookWorkerGroup `json:"value,omitempty"`
|
||||
@@ -1223,8 +1136,7 @@ func (client HybridRunbookWorkerGroupsListResult) HybridRunbookWorkerGroupsListR
|
||||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// HybridRunbookWorkerGroupUpdateParameters is parameters supplied to the
|
||||
// update operation.
|
||||
// HybridRunbookWorkerGroupUpdateParameters is parameters supplied to the update operation.
|
||||
type HybridRunbookWorkerGroupUpdateParameters struct {
|
||||
Credential *RunAsCredentialAssociationProperty `json:"credential,omitempty"`
|
||||
}
|
||||
@@ -1294,14 +1206,12 @@ type JobSchedule struct {
|
||||
*JobScheduleProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// JobScheduleCreateParameters is the parameters supplied to the create job
|
||||
// schedule operation.
|
||||
// JobScheduleCreateParameters is the parameters supplied to the create job schedule operation.
|
||||
type JobScheduleCreateParameters struct {
|
||||
*JobScheduleCreateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// JobScheduleCreateProperties is the parameters supplied to the create job
|
||||
// schedule operation.
|
||||
// JobScheduleCreateProperties is the parameters supplied to the create job schedule operation.
|
||||
type JobScheduleCreateProperties struct {
|
||||
Schedule *ScheduleAssociationProperty `json:"schedule,omitempty"`
|
||||
Runbook *RunbookAssociationProperty `json:"runbook,omitempty"`
|
||||
@@ -1309,8 +1219,7 @@ type JobScheduleCreateProperties struct {
|
||||
Parameters *map[string]*string `json:"parameters,omitempty"`
|
||||
}
|
||||
|
||||
// JobScheduleListResult is the response model for the list job schedule
|
||||
// operation.
|
||||
// JobScheduleListResult is the response model for the list job schedule operation.
|
||||
type JobScheduleListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]JobSchedule `json:"value,omitempty"`
|
||||
@@ -1386,8 +1295,7 @@ type Module struct {
|
||||
Etag *string `json:"etag,omitempty"`
|
||||
}
|
||||
|
||||
// ModuleCreateOrUpdateParameters is the parameters supplied to the create or
|
||||
// update module operation.
|
||||
// ModuleCreateOrUpdateParameters is the parameters supplied to the create or update module operation.
|
||||
type ModuleCreateOrUpdateParameters struct {
|
||||
*ModuleCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
@@ -1395,8 +1303,7 @@ type ModuleCreateOrUpdateParameters struct {
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// ModuleCreateOrUpdateProperties is the parameters supplied to the create or
|
||||
// update module properties.
|
||||
// ModuleCreateOrUpdateProperties is the parameters supplied to the create or update module properties.
|
||||
type ModuleCreateOrUpdateProperties struct {
|
||||
ContentLink *ContentLink `json:"contentLink,omitempty"`
|
||||
}
|
||||
@@ -1440,8 +1347,7 @@ type ModuleProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// ModuleUpdateParameters is the parameters supplied to the update module
|
||||
// operation.
|
||||
// ModuleUpdateParameters is the parameters supplied to the update module operation.
|
||||
type ModuleUpdateParameters struct {
|
||||
*ModuleUpdateProperties `json:"properties,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
@@ -1467,8 +1373,7 @@ type OperationDisplay struct {
|
||||
Operation *string `json:"operation,omitempty"`
|
||||
}
|
||||
|
||||
// OperationListResult is the response model for the list of Automation
|
||||
// operations
|
||||
// OperationListResult is the response model for the list of Automation operations
|
||||
type OperationListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Operation `json:"value,omitempty"`
|
||||
@@ -1489,8 +1394,7 @@ type Resource struct {
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// RunAsCredentialAssociationProperty is definition of runas credential to use
|
||||
// for hybrid worker.
|
||||
// RunAsCredentialAssociationProperty is definition of runas credential to use for hybrid worker.
|
||||
type RunAsCredentialAssociationProperty struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
@@ -1507,14 +1411,27 @@ type Runbook struct {
|
||||
Etag *string `json:"etag,omitempty"`
|
||||
}
|
||||
|
||||
// RunbookAssociationProperty is the runbook property associated with the
|
||||
// entity.
|
||||
// RunbookAssociationProperty is the runbook property associated with the entity.
|
||||
type RunbookAssociationProperty struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// RunbookCreateOrUpdateParameters is the parameters supplied to the create or
|
||||
// update runbook operation.
|
||||
// RunbookCreateOrUpdateDraftParameters is the parameters supplied to the create or update runbook operation.
|
||||
type RunbookCreateOrUpdateDraftParameters struct {
|
||||
RunbookContent *string `json:"runbookContent,omitempty"`
|
||||
}
|
||||
|
||||
// RunbookCreateOrUpdateDraftProperties is the parameters supplied to the create or update dratft runbook properties.
|
||||
type RunbookCreateOrUpdateDraftProperties struct {
|
||||
LogVerbose *bool `json:"logVerbose,omitempty"`
|
||||
LogProgress *bool `json:"logProgress,omitempty"`
|
||||
RunbookType RunbookTypeEnum `json:"runbookType,omitempty"`
|
||||
Draft *RunbookDraft `json:"draft,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
LogActivityTrace *int32 `json:"logActivityTrace,omitempty"`
|
||||
}
|
||||
|
||||
// RunbookCreateOrUpdateParameters is the parameters supplied to the create or update runbook operation.
|
||||
type RunbookCreateOrUpdateParameters struct {
|
||||
*RunbookCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
@@ -1522,8 +1439,7 @@ type RunbookCreateOrUpdateParameters struct {
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// RunbookCreateOrUpdateProperties is the parameters supplied to the create or
|
||||
// update runbook properties.
|
||||
// RunbookCreateOrUpdateProperties is the parameters supplied to the create or update runbook properties.
|
||||
type RunbookCreateOrUpdateProperties struct {
|
||||
LogVerbose *bool `json:"logVerbose,omitempty"`
|
||||
LogProgress *bool `json:"logProgress,omitempty"`
|
||||
@@ -1545,8 +1461,7 @@ type RunbookDraft struct {
|
||||
OutputTypes *[]string `json:"outputTypes,omitempty"`
|
||||
}
|
||||
|
||||
// RunbookDraftUndoEditResult is the response model for the undoedit runbook
|
||||
// operation.
|
||||
// RunbookDraftUndoEditResult is the response model for the undoedit runbook operation.
|
||||
type RunbookDraftUndoEditResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
|
||||
@@ -1599,8 +1514,7 @@ type RunbookProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// RunbookUpdateParameters is the parameters supplied to the update runbook
|
||||
// operation.
|
||||
// RunbookUpdateParameters is the parameters supplied to the update runbook operation.
|
||||
type RunbookUpdateParameters struct {
|
||||
*RunbookUpdateProperties `json:"properties,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
@@ -1608,8 +1522,7 @@ type RunbookUpdateParameters struct {
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// RunbookUpdateProperties is the parameters supplied to the update runbook
|
||||
// properties.
|
||||
// RunbookUpdateProperties is the parameters supplied to the update runbook properties.
|
||||
type RunbookUpdateProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
LogVerbose *bool `json:"logVerbose,omitempty"`
|
||||
@@ -1625,21 +1538,18 @@ type Schedule struct {
|
||||
*ScheduleProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ScheduleAssociationProperty is the schedule property associated with the
|
||||
// entity.
|
||||
// ScheduleAssociationProperty is the schedule property associated with the entity.
|
||||
type ScheduleAssociationProperty struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// ScheduleCreateOrUpdateParameters is the parameters supplied to the create or
|
||||
// update schedule operation.
|
||||
// ScheduleCreateOrUpdateParameters is the parameters supplied to the create or update schedule operation.
|
||||
type ScheduleCreateOrUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*ScheduleCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ScheduleCreateOrUpdateProperties is the parameters supplied to the create or
|
||||
// update schedule operation.
|
||||
// ScheduleCreateOrUpdateProperties is the parameters supplied to the create or update schedule operation.
|
||||
type ScheduleCreateOrUpdateProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
StartTime *date.Time `json:"startTime,omitempty"`
|
||||
@@ -1687,15 +1597,13 @@ type ScheduleProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// ScheduleUpdateParameters is the parameters supplied to the update schedule
|
||||
// operation.
|
||||
// ScheduleUpdateParameters is the parameters supplied to the update schedule operation.
|
||||
type ScheduleUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*ScheduleUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ScheduleUpdateProperties is the parameters supplied to the update schedule
|
||||
// operation.
|
||||
// ScheduleUpdateProperties is the parameters supplied to the update schedule operation.
|
||||
type ScheduleUpdateProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
IsEnabled *bool `json:"isEnabled,omitempty"`
|
||||
@@ -1717,8 +1625,7 @@ type Statistics struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
// StatisticsListResult is the response model for the list statistics
|
||||
// operation.
|
||||
// StatisticsListResult is the response model for the list statistics operation.
|
||||
type StatisticsListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Statistics `json:"value,omitempty"`
|
||||
@@ -1730,6 +1637,11 @@ type String struct {
|
||||
Value *string `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// SubResource is the Sub Resource definition.
|
||||
type SubResource struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
// TestJob is definition of the test job.
|
||||
type TestJob struct {
|
||||
autorest.Response `json:"-"`
|
||||
@@ -1745,8 +1657,7 @@ type TestJob struct {
|
||||
Parameters *map[string]*string `json:"parameters,omitempty"`
|
||||
}
|
||||
|
||||
// TestJobCreateParameters is the parameters supplied to the create test job
|
||||
// operation.
|
||||
// TestJobCreateParameters is the parameters supplied to the create test job operation.
|
||||
type TestJobCreateParameters struct {
|
||||
RunbookName *string `json:"runbookName,omitempty"`
|
||||
Parameters *map[string]*string `json:"parameters,omitempty"`
|
||||
@@ -1795,15 +1706,13 @@ type Variable struct {
|
||||
*VariableProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// VariableCreateOrUpdateParameters is the parameters supplied to the create or
|
||||
// update variable operation.
|
||||
// VariableCreateOrUpdateParameters is the parameters supplied to the create or update variable operation.
|
||||
type VariableCreateOrUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*VariableCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// VariableCreateOrUpdateProperties is the properties of the create variable
|
||||
// operation.
|
||||
// VariableCreateOrUpdateProperties is the properties of the create variable operation.
|
||||
type VariableCreateOrUpdateProperties struct {
|
||||
Value *string `json:"value,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
@@ -1838,8 +1747,7 @@ type VariableProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// VariableUpdateParameters is the parameters supplied to the update variable
|
||||
// operation.
|
||||
// VariableUpdateParameters is the parameters supplied to the update variable operation.
|
||||
type VariableUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*VariableUpdateProperties `json:"properties,omitempty"`
|
||||
@@ -1859,15 +1767,13 @@ type Webhook struct {
|
||||
*WebhookProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// WebhookCreateOrUpdateParameters is the parameters supplied to the create or
|
||||
// update webhook operation.
|
||||
// WebhookCreateOrUpdateParameters is the parameters supplied to the create or update webhook operation.
|
||||
type WebhookCreateOrUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*WebhookCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// WebhookCreateOrUpdateProperties is the properties of the create webhook
|
||||
// operation.
|
||||
// WebhookCreateOrUpdateProperties is the properties of the create webhook operation.
|
||||
type WebhookCreateOrUpdateProperties struct {
|
||||
IsEnabled *bool `json:"isEnabled,omitempty"`
|
||||
URI *string `json:"uri,omitempty"`
|
||||
@@ -1910,8 +1816,7 @@ type WebhookProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// WebhookUpdateParameters is the parameters supplied to the update webhook
|
||||
// operation.
|
||||
// WebhookUpdateParameters is the parameters supplied to the update webhook operation.
|
||||
type WebhookUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*WebhookUpdateProperties `json:"properties,omitempty"`
|
||||
|
||||
+57
-16
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ModuleClient is the composite Swagger json for Azure Automation Client
|
||||
// ModuleClient is the automation Client
|
||||
type ModuleClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -42,9 +41,8 @@ func NewModuleClientWithBaseURI(baseURI string, subscriptionID string) ModuleCli
|
||||
|
||||
// CreateOrUpdate create or Update the module identified by module name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. moduleName is the name of module. parameters is the
|
||||
// create or update parameters for module.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is
|
||||
// the name of module. parameters is the create or update parameters for module.
|
||||
func (client ModuleClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters) (result Module, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -127,8 +125,8 @@ func (client ModuleClient) CreateOrUpdateResponder(resp *http.Response) (result
|
||||
|
||||
// Delete delete the module by name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. moduleName is the module name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is
|
||||
// the module name.
|
||||
func (client ModuleClient) Delete(resourceGroupName string, automationAccountName string, moduleName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -199,8 +197,8 @@ func (client ModuleClient) DeleteResponder(resp *http.Response) (result autorest
|
||||
|
||||
// Get retrieve the module identified by module name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. moduleName is the module name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is
|
||||
// the module name.
|
||||
func (client ModuleClient) Get(resourceGroupName string, automationAccountName string, moduleName string) (result Module, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -272,8 +270,7 @@ func (client ModuleClient) GetResponder(resp *http.Response) (result Module, err
|
||||
|
||||
// ListByAutomationAccount retrieve a list of modules.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client ModuleClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result ModuleListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -366,11 +363,55 @@ func (client ModuleClient) ListByAutomationAccountNextResults(lastResults Module
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client ModuleClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Module, <-chan error) {
|
||||
resultChan := make(chan Module)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByAutomationAccountNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// Update update the module identified by module name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. moduleName is the name of module. parameters is the
|
||||
// update parameters for module.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is
|
||||
// the name of module. parameters is the update parameters for module.
|
||||
func (client ModuleClient) Update(resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleUpdateParameters) (result Module, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+55
-15
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// NodeReportsClient is the composite Swagger json for Azure Automation Client
|
||||
// NodeReportsClient is the automation Client
|
||||
type NodeReportsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,17 +34,15 @@ func NewNodeReportsClient(subscriptionID string) NodeReportsClient {
|
||||
return NewNodeReportsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient
|
||||
// client.
|
||||
// NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient client.
|
||||
func NewNodeReportsClientWithBaseURI(baseURI string, subscriptionID string) NodeReportsClient {
|
||||
return NodeReportsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get retrieve the Dsc node report data by node id and report id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. nodeID is the Dsc node id. reportID is the report
|
||||
// id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is the
|
||||
// Dsc node id. reportID is the report id.
|
||||
func (client NodeReportsClient) Get(resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result DscNodeReport, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -118,9 +115,8 @@ func (client NodeReportsClient) GetResponder(resp *http.Response) (result DscNod
|
||||
|
||||
// GetContent retrieve the Dsc node reports by node id and report id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. nodeID is the Dsc node id. reportID is the report
|
||||
// id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is the
|
||||
// Dsc node id. reportID is the report id.
|
||||
func (client NodeReportsClient) GetContent(resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result ReadCloser, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -192,9 +188,8 @@ func (client NodeReportsClient) GetContentResponder(resp *http.Response) (result
|
||||
|
||||
// ListByNode retrieve the Dsc node report list by node id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. nodeID is the parameters supplied to the list
|
||||
// operation. filter is the filter to apply on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is the
|
||||
// parameters supplied to the list operation. filter is the filter to apply on the operation.
|
||||
func (client NodeReportsClient) ListByNode(resourceGroupName string, automationAccountName string, nodeID string, filter string) (result DscNodeReportListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -290,3 +285,48 @@ func (client NodeReportsClient) ListByNodeNextResults(lastResults DscNodeReportL
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByNodeComplete gets all elements from the list without paging.
|
||||
func (client NodeReportsClient) ListByNodeComplete(resourceGroupName string, automationAccountName string, nodeID string, filter string, cancel <-chan struct{}) (<-chan DscNodeReport, <-chan error) {
|
||||
resultChan := make(chan DscNodeReport)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByNode(resourceGroupName, automationAccountName, nodeID, filter)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByNodeNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
+11
-18
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,30 +24,25 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ObjectDataTypesClient is the composite Swagger json for Azure Automation
|
||||
// Client
|
||||
// ObjectDataTypesClient is the automation Client
|
||||
type ObjectDataTypesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewObjectDataTypesClient creates an instance of the ObjectDataTypesClient
|
||||
// client.
|
||||
// NewObjectDataTypesClient creates an instance of the ObjectDataTypesClient client.
|
||||
func NewObjectDataTypesClient(subscriptionID string) ObjectDataTypesClient {
|
||||
return NewObjectDataTypesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewObjectDataTypesClientWithBaseURI creates an instance of the
|
||||
// ObjectDataTypesClient client.
|
||||
// NewObjectDataTypesClientWithBaseURI creates an instance of the ObjectDataTypesClient client.
|
||||
func NewObjectDataTypesClientWithBaseURI(baseURI string, subscriptionID string) ObjectDataTypesClient {
|
||||
return ObjectDataTypesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// ListFieldsByModuleAndType retrieve a list of fields of a given type
|
||||
// identified by module name.
|
||||
// ListFieldsByModuleAndType retrieve a list of fields of a given type identified by module name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. moduleName is the name of module. typeName is the
|
||||
// name of type.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is
|
||||
// the name of module. typeName is the name of type.
|
||||
func (client ObjectDataTypesClient) ListFieldsByModuleAndType(resourceGroupName string, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -119,11 +113,10 @@ func (client ObjectDataTypesClient) ListFieldsByModuleAndTypeResponder(resp *htt
|
||||
return
|
||||
}
|
||||
|
||||
// ListFieldsByType retrieve a list of fields of a given type across all
|
||||
// accessible modules.
|
||||
// ListFieldsByType retrieve a list of fields of a given type across all accessible modules.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. typeName is the name of type.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. typeName is the
|
||||
// name of type.
|
||||
func (client ObjectDataTypesClient) ListFieldsByType(resourceGroupName string, automationAccountName string, typeName string) (result TypeFieldListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+4
-6
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,7 +23,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// OperationsClient is the composite Swagger json for Azure Automation Client
|
||||
// OperationsClient is the automation Client
|
||||
type OperationsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -34,8 +33,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient {
|
||||
return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient
|
||||
// client.
|
||||
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
|
||||
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
|
||||
return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
+59
-18
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// RunbookClient is the composite Swagger json for Azure Automation Client
|
||||
// RunbookClient is the automation Client
|
||||
type RunbookClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -42,9 +41,8 @@ func NewRunbookClientWithBaseURI(baseURI string, subscriptionID string) RunbookC
|
||||
|
||||
// CreateOrUpdate create the runbook identified by runbook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name. parameters is the
|
||||
// create or update parameters for runbook. Provide either content link for a
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name. parameters is the create or update parameters for runbook. Provide either content link for a
|
||||
// published runbook or draft, not both.
|
||||
func (client RunbookClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
@@ -135,8 +133,8 @@ func (client RunbookClient) CreateOrUpdateResponder(resp *http.Response) (result
|
||||
|
||||
// Delete delete the runbook by name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client RunbookClient) Delete(resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -207,8 +205,8 @@ func (client RunbookClient) DeleteResponder(resp *http.Response) (result autores
|
||||
|
||||
// Get retrieve the runbook identified by runbook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client RunbookClient) Get(resourceGroupName string, automationAccountName string, runbookName string) (result Runbook, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -280,8 +278,8 @@ func (client RunbookClient) GetResponder(resp *http.Response) (result Runbook, e
|
||||
|
||||
// GetContent retrieve the content of runbook identified by runbook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client RunbookClient) GetContent(resourceGroupName string, automationAccountName string, runbookName string) (result ReadCloser, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -352,8 +350,7 @@ func (client RunbookClient) GetContentResponder(resp *http.Response) (result Rea
|
||||
|
||||
// ListByAutomationAccount retrieve a list of runbooks.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client RunbookClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result RunbookListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -446,11 +443,55 @@ func (client RunbookClient) ListByAutomationAccountNextResults(lastResults Runbo
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client RunbookClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Runbook, <-chan error) {
|
||||
resultChan := make(chan Runbook)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByAutomationAccountNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// Update update the runbook identified by runbook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name. parameters is the
|
||||
// update parameters for runbook.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name. parameters is the update parameters for runbook.
|
||||
func (client RunbookClient) Update(resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookUpdateParameters) (result Runbook, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+25
-27
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -26,7 +25,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// RunbookDraftClient is the composite Swagger json for Azure Automation Client
|
||||
// RunbookDraftClient is the automation Client
|
||||
type RunbookDraftClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -36,21 +35,18 @@ func NewRunbookDraftClient(subscriptionID string) RunbookDraftClient {
|
||||
return NewRunbookDraftClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewRunbookDraftClientWithBaseURI creates an instance of the
|
||||
// RunbookDraftClient client.
|
||||
// NewRunbookDraftClientWithBaseURI creates an instance of the RunbookDraftClient client.
|
||||
func NewRunbookDraftClientWithBaseURI(baseURI string, subscriptionID string) RunbookDraftClient {
|
||||
return RunbookDraftClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate updates the runbook draft with runbookStream as its content.
|
||||
// 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
|
||||
// CreateOrUpdate updates the runbook draft with runbookStream as its content. 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 resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name. runbookContent is
|
||||
// the runbook draft content. runbookContent will be closed upon successful
|
||||
// return. Callers should ensure closure when receiving an error.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name. runbookContent is the runbook draft content. runbookContent will be closed upon successful return.
|
||||
// Callers should ensure closure when receiving an error.
|
||||
func (client RunbookDraftClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, runbookName string, runbookContent io.ReadCloser, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -67,8 +63,10 @@ func (client RunbookDraftClient) CreateOrUpdate(resourceGroupName string, automa
|
||||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -138,8 +136,8 @@ func (client RunbookDraftClient) CreateOrUpdateResponder(resp *http.Response) (r
|
||||
|
||||
// Get retrieve the runbook draft identified by runbook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client RunbookDraftClient) Get(resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraft, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -211,8 +209,8 @@ func (client RunbookDraftClient) GetResponder(resp *http.Response) (result Runbo
|
||||
|
||||
// GetContent retrieve the content of runbook draft identified by runbook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client RunbookDraftClient) GetContent(resourceGroupName string, automationAccountName string, runbookName string) (result ReadCloser, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -281,13 +279,11 @@ func (client RunbookDraftClient) GetContentResponder(resp *http.Response) (resul
|
||||
return
|
||||
}
|
||||
|
||||
// Publish publish runbook draft. 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.
|
||||
// Publish publish runbook draft. 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 resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the parameters supplied to the
|
||||
// publish runbook operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the parameters supplied to the publish runbook operation.
|
||||
func (client RunbookDraftClient) Publish(resourceGroupName string, automationAccountName string, runbookName string, cancel <-chan struct{}) (<-chan Runbook, <-chan error) {
|
||||
resultChan := make(chan Runbook, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -304,8 +300,10 @@ func (client RunbookDraftClient) Publish(resourceGroupName string, automationAcc
|
||||
var err error
|
||||
var result Runbook
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -375,8 +373,8 @@ func (client RunbookDraftClient) PublishResponder(resp *http.Response) (result R
|
||||
|
||||
// UndoEdit retrieve the runbook identified by runbook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client RunbookDraftClient) UndoEdit(resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraftUndoEditResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+58
-18
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ScheduleClient is the composite Swagger json for Azure Automation Client
|
||||
// ScheduleClient is the automation Client
|
||||
type ScheduleClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,17 +34,15 @@ func NewScheduleClient(subscriptionID string) ScheduleClient {
|
||||
return NewScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewScheduleClientWithBaseURI creates an instance of the ScheduleClient
|
||||
// client.
|
||||
// NewScheduleClientWithBaseURI creates an instance of the ScheduleClient client.
|
||||
func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string) ScheduleClient {
|
||||
return ScheduleClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create a schedule.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. scheduleName is the schedule name. parameters is
|
||||
// the parameters supplied to the create or update schedule operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName is
|
||||
// the schedule name. parameters is the parameters supplied to the create or update schedule operation.
|
||||
func (client ScheduleClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters) (result Schedule, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -123,8 +120,8 @@ func (client ScheduleClient) CreateOrUpdateResponder(resp *http.Response) (resul
|
||||
|
||||
// Delete delete the schedule identified by schedule name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. scheduleName is the schedule name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName is
|
||||
// the schedule name.
|
||||
func (client ScheduleClient) Delete(resourceGroupName string, automationAccountName string, scheduleName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -195,8 +192,8 @@ func (client ScheduleClient) DeleteResponder(resp *http.Response) (result autore
|
||||
|
||||
// Get retrieve the schedule identified by schedule name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. scheduleName is the schedule name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName is
|
||||
// the schedule name.
|
||||
func (client ScheduleClient) Get(resourceGroupName string, automationAccountName string, scheduleName string) (result Schedule, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -268,8 +265,7 @@ func (client ScheduleClient) GetResponder(resp *http.Response) (result Schedule,
|
||||
|
||||
// ListByAutomationAccount retrieve a list of schedules.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client ScheduleClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result ScheduleListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -362,11 +358,55 @@ func (client ScheduleClient) ListByAutomationAccountNextResults(lastResults Sche
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client ScheduleClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Schedule, <-chan error) {
|
||||
resultChan := make(chan Schedule)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByAutomationAccountNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// Update update the schedule identified by schedule name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. scheduleName is the schedule name. parameters is
|
||||
// the parameters supplied to the update schedule operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName is
|
||||
// the schedule name. parameters is the parameters supplied to the update schedule operation.
|
||||
func (client ScheduleClient) Update(resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters) (result Schedule, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+6
-8
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// StatisticsClient is the composite Swagger json for Azure Automation Client
|
||||
// StatisticsClient is the automation Client
|
||||
type StatisticsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,16 +34,15 @@ func NewStatisticsClient(subscriptionID string) StatisticsClient {
|
||||
return NewStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient
|
||||
// client.
|
||||
// NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient client.
|
||||
func NewStatisticsClientWithBaseURI(baseURI string, subscriptionID string) StatisticsClient {
|
||||
return StatisticsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// ListByAutomationAccount retrieve the statistics for the account.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. filter is the filter to apply on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the
|
||||
// filter to apply on the operation.
|
||||
func (client StatisticsClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result StatisticsListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+15
-18
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// TestJobsClient is the composite Swagger json for Azure Automation Client
|
||||
// TestJobsClient is the automation Client
|
||||
type TestJobsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,18 +34,16 @@ func NewTestJobsClient(subscriptionID string) TestJobsClient {
|
||||
return NewTestJobsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewTestJobsClientWithBaseURI creates an instance of the TestJobsClient
|
||||
// client.
|
||||
// NewTestJobsClientWithBaseURI creates an instance of the TestJobsClient client.
|
||||
func NewTestJobsClientWithBaseURI(baseURI string, subscriptionID string) TestJobsClient {
|
||||
return TestJobsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create create a test job of the runbook.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the parameters supplied to the
|
||||
// create test job operation. parameters is the parameters supplied to the
|
||||
// create test job operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the parameters supplied to the create test job operation. parameters is the parameters supplied to the create test
|
||||
// job operation.
|
||||
func (client TestJobsClient) Create(resourceGroupName string, automationAccountName string, runbookName string, parameters TestJobCreateParameters) (result TestJob, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -122,8 +119,8 @@ func (client TestJobsClient) CreateResponder(resp *http.Response) (result TestJo
|
||||
|
||||
// Get retrieve the test job for the specified runbook.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client TestJobsClient) Get(resourceGroupName string, automationAccountName string, runbookName string) (result TestJob, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -195,8 +192,8 @@ func (client TestJobsClient) GetResponder(resp *http.Response) (result TestJob,
|
||||
|
||||
// Resume resume the test job.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client TestJobsClient) Resume(resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -267,8 +264,8 @@ func (client TestJobsClient) ResumeResponder(resp *http.Response) (result autore
|
||||
|
||||
// Stop stop the test job.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client TestJobsClient) Stop(resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -339,8 +336,8 @@ func (client TestJobsClient) StopResponder(resp *http.Response) (result autorest
|
||||
|
||||
// Suspend suspend the test job.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client TestJobsClient) Suspend(resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+55
-17
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,29 +24,25 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// TestJobStreamsClient is the composite Swagger json for Azure Automation
|
||||
// Client
|
||||
// TestJobStreamsClient is the automation Client
|
||||
type TestJobStreamsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewTestJobStreamsClient creates an instance of the TestJobStreamsClient
|
||||
// client.
|
||||
// NewTestJobStreamsClient creates an instance of the TestJobStreamsClient client.
|
||||
func NewTestJobStreamsClient(subscriptionID string) TestJobStreamsClient {
|
||||
return NewTestJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewTestJobStreamsClientWithBaseURI creates an instance of the
|
||||
// TestJobStreamsClient client.
|
||||
// NewTestJobStreamsClientWithBaseURI creates an instance of the TestJobStreamsClient client.
|
||||
func NewTestJobStreamsClientWithBaseURI(baseURI string, subscriptionID string) TestJobStreamsClient {
|
||||
return TestJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get retrieve a test job streams identified by runbook name and stream id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name. jobStreamID is the
|
||||
// job stream id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name. jobStreamID is the job stream id.
|
||||
func (client TestJobStreamsClient) Get(resourceGroupName string, automationAccountName string, runbookName string, jobStreamID string) (result JobStream, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -118,12 +113,10 @@ func (client TestJobStreamsClient) GetResponder(resp *http.Response) (result Job
|
||||
return
|
||||
}
|
||||
|
||||
// ListByTestJob retrieve a list of test job streams identified by runbook
|
||||
// name.
|
||||
// ListByTestJob retrieve a list of test job streams identified by runbook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name. filter is the
|
||||
// filter to apply on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name. filter is the filter to apply on the operation.
|
||||
func (client TestJobStreamsClient) ListByTestJob(resourceGroupName string, automationAccountName string, runbookName string, filter string) (result JobStreamListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -219,3 +212,48 @@ func (client TestJobStreamsClient) ListByTestJobNextResults(lastResults JobStrea
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByTestJobComplete gets all elements from the list without paging.
|
||||
func (client TestJobStreamsClient) ListByTestJobComplete(resourceGroupName string, automationAccountName string, runbookName string, filter string, cancel <-chan struct{}) (<-chan JobStream, <-chan error) {
|
||||
resultChan := make(chan JobStream)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByTestJob(resourceGroupName, automationAccountName, runbookName, filter)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByTestJobNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
+4
-6
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// UsagesClient is the composite Swagger json for Azure Automation Client
|
||||
// UsagesClient is the automation Client
|
||||
type UsagesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -42,8 +41,7 @@ func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesCli
|
||||
|
||||
// ListByAutomationAccount retrieve the usage for the account id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client UsagesClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result UsageListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+58
-18
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// VariableClient is the composite Swagger json for Azure Automation Client
|
||||
// VariableClient is the automation Client
|
||||
type VariableClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,17 +34,15 @@ func NewVariableClient(subscriptionID string) VariableClient {
|
||||
return NewVariableClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewVariableClientWithBaseURI creates an instance of the VariableClient
|
||||
// client.
|
||||
// NewVariableClientWithBaseURI creates an instance of the VariableClient client.
|
||||
func NewVariableClientWithBaseURI(baseURI string, subscriptionID string) VariableClient {
|
||||
return VariableClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create a variable.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. variableName is the variable name. parameters is
|
||||
// the parameters supplied to the create or update variable operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName is
|
||||
// the variable name. parameters is the parameters supplied to the create or update variable operation.
|
||||
func (client VariableClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters) (result Variable, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -122,8 +119,8 @@ func (client VariableClient) CreateOrUpdateResponder(resp *http.Response) (resul
|
||||
|
||||
// Delete delete the variable.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. variableName is the name of variable.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName is
|
||||
// the name of variable.
|
||||
func (client VariableClient) Delete(resourceGroupName string, automationAccountName string, variableName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -194,8 +191,8 @@ func (client VariableClient) DeleteResponder(resp *http.Response) (result autore
|
||||
|
||||
// Get retrieve the variable identified by variable name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. variableName is the name of variable.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName is
|
||||
// the name of variable.
|
||||
func (client VariableClient) Get(resourceGroupName string, automationAccountName string, variableName string) (result Variable, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -267,8 +264,7 @@ func (client VariableClient) GetResponder(resp *http.Response) (result Variable,
|
||||
|
||||
// ListByAutomationAccount retrieve a list of variables.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client VariableClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result VariableListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -361,11 +357,55 @@ func (client VariableClient) ListByAutomationAccountNextResults(lastResults Vari
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client VariableClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Variable, <-chan error) {
|
||||
resultChan := make(chan Variable)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByAutomationAccountNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// Update update a variable.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. variableName is the variable name. parameters is
|
||||
// the parameters supplied to the update variable operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName is
|
||||
// the variable name. parameters is the parameters supplied to the update variable operation.
|
||||
func (client VariableClient) Update(resourceGroupName string, automationAccountName string, variableName string, parameters VariableUpdateParameters) (result Variable, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
+4
-5
@@ -14,16 +14,15 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
// UserAgent returns the UserAgent string to use when sending http.Requests.
|
||||
func UserAgent() string {
|
||||
return "Azure-SDK-For-Go/v10.1.0-beta arm-automation/"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-automation/2015-10-31"
|
||||
}
|
||||
|
||||
// Version returns the semantic version (see http://semver.org) of the client.
|
||||
func Version() string {
|
||||
return "v10.1.0-beta"
|
||||
return "v11.0.0-beta"
|
||||
}
|
||||
|
||||
+59
-18
@@ -14,9 +14,8 @@ package automation
|
||||
// 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.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// WebhookClient is the composite Swagger json for Azure Automation Client
|
||||
// WebhookClient is the automation Client
|
||||
type WebhookClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -42,9 +41,8 @@ func NewWebhookClientWithBaseURI(baseURI string, subscriptionID string) WebhookC
|
||||
|
||||
// CreateOrUpdate create the webhook identified by webhook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. webhookName is the webhook name. parameters is the
|
||||
// create or update parameters for webhook.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName is
|
||||
// the webhook name. parameters is the create or update parameters for webhook.
|
||||
func (client WebhookClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters) (result Webhook, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -121,8 +119,8 @@ func (client WebhookClient) CreateOrUpdateResponder(resp *http.Response) (result
|
||||
|
||||
// Delete delete the webhook by name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. webhookName is the webhook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName is
|
||||
// the webhook name.
|
||||
func (client WebhookClient) Delete(resourceGroupName string, automationAccountName string, webhookName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -193,8 +191,7 @@ func (client WebhookClient) DeleteResponder(resp *http.Response) (result autores
|
||||
|
||||
// GenerateURI generates a Uri for use in creating a webhook.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client WebhookClient) GenerateURI(resourceGroupName string, automationAccountName string) (result String, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -265,8 +262,8 @@ func (client WebhookClient) GenerateURIResponder(resp *http.Response) (result St
|
||||
|
||||
// Get retrieve the webhook identified by webhook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. webhookName is the webhook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName is
|
||||
// the webhook name.
|
||||
func (client WebhookClient) Get(resourceGroupName string, automationAccountName string, webhookName string) (result Webhook, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -338,8 +335,8 @@ func (client WebhookClient) GetResponder(resp *http.Response) (result Webhook, e
|
||||
|
||||
// ListByAutomationAccount retrieve a list of webhooks.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. filter is the filter to apply on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the
|
||||
// filter to apply on the operation.
|
||||
func (client WebhookClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result WebhookListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -435,11 +432,55 @@ func (client WebhookClient) ListByAutomationAccountNextResults(lastResults Webho
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client WebhookClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, filter string, cancel <-chan struct{}) (<-chan Webhook, <-chan error) {
|
||||
resultChan := make(chan Webhook)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName, filter)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByAutomationAccountNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// Update update the webhook identified by webhook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. webhookName is the webhook name. parameters is the
|
||||
// update parameters for webhook.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName is
|
||||
// the webhook name. parameters is the update parameters for webhook.
|
||||
func (client WebhookClient) Update(resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookUpdateParameters) (result Webhook, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
||||
Reference in New Issue
Block a user