armagrifood

package module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2022 License: MIT Imports: 17 Imported by: 2

README

Azure AgriFood Module for Go

PkgGoDev

The armagrifood module provides operations for working with Azure AgriFood.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure AgriFood module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/agrifood/armagrifood

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure AgriFood. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Clients

Azure AgriFood modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client, err := armagrifood.NewExtensionsClient(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
client, err := armagrifood.NewExtensionsClient(<subscription ID>, cred, &options)

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the AgriFood label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType

type ActionType string

ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.

const (
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type CheckNameAvailabilityReason

type CheckNameAvailabilityReason string

CheckNameAvailabilityReason - The reason why the given name is not available.

const (
	CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists"
	CheckNameAvailabilityReasonInvalid       CheckNameAvailabilityReason = "Invalid"
)

func PossibleCheckNameAvailabilityReasonValues

func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason

PossibleCheckNameAvailabilityReasonValues returns the possible values for the CheckNameAvailabilityReason const type.

type CheckNameAvailabilityRequest

type CheckNameAvailabilityRequest struct {
	// The name of the resource for which availability needs to be checked.
	Name *string `json:"name,omitempty"`

	// The resource type.
	Type *string `json:"type,omitempty"`
}

CheckNameAvailabilityRequest - The check availability request body.

type CheckNameAvailabilityResponse

type CheckNameAvailabilityResponse struct {
	// Detailed reason why the given name is available.
	Message *string `json:"message,omitempty"`

	// Indicates if the resource name is available.
	NameAvailable *bool `json:"nameAvailable,omitempty"`

	// The reason why the given name is not available.
	Reason *CheckNameAvailabilityReason `json:"reason,omitempty"`
}

CheckNameAvailabilityResponse - The check availability result.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type DetailedInformation

type DetailedInformation struct {
	// List of apiInputParameters.
	APIInputParameters []*string `json:"apiInputParameters,omitempty"`

	// ApiName available for the farmBeatsExtension.
	APIName *string `json:"apiName,omitempty"`

	// List of customParameters.
	CustomParameters []*string `json:"customParameters,omitempty"`

	// List of platformParameters.
	PlatformParameters []*string `json:"platformParameters,omitempty"`

	// Unit systems info for the data provider.
	UnitsSupported *UnitSystemsInfo `json:"unitsSupported,omitempty"`
}

DetailedInformation - Model to capture detailed information for farmBeatsExtensions.

func (DetailedInformation) MarshalJSON

func (d DetailedInformation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DetailedInformation.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info interface{} `json:"info,omitempty" azure:"ro"`

	// READ-ONLY; The additional info type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

ErrorAdditionalInfo - The resource management error additional info.

type ErrorDetail

type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"`

	// READ-ONLY; The error code.
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; The error details.
	Details []*ErrorDetail `json:"details,omitempty" azure:"ro"`

	// READ-ONLY; The error message.
	Message *string `json:"message,omitempty" azure:"ro"`

	// READ-ONLY; The error target.
	Target *string `json:"target,omitempty" azure:"ro"`
}

ErrorDetail - The error detail.

type ErrorResponse

type ErrorResponse struct {
	// The error object.
	Error *ErrorDetail `json:"error,omitempty"`
}

ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

type Extension

type Extension struct {
	// Extension resource properties.
	Properties *ExtensionProperties `json:"properties,omitempty"`

	// READ-ONLY; The ETag value to implement optimistic concurrency.
	ETag *string `json:"eTag,omitempty" azure:"ro"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Extension resource.

type ExtensionListResponse

type ExtensionListResponse struct {
	// List of requested objects.
	Value []*Extension `json:"value,omitempty"`

	// READ-ONLY; Continuation link (absolute URI) to the next page of results in the list.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

ExtensionListResponse - Paged response contains list of requested objects and a URL link to get the next set of results.

type ExtensionProperties

type ExtensionProperties struct {
	// READ-ONLY; Extension api docs link.
	ExtensionAPIDocsLink *string `json:"extensionApiDocsLink,omitempty" azure:"ro"`

	// READ-ONLY; Extension auth link.
	ExtensionAuthLink *string `json:"extensionAuthLink,omitempty" azure:"ro"`

	// READ-ONLY; Extension category. e.g. weather/sensor/satellite.
	ExtensionCategory *string `json:"extensionCategory,omitempty" azure:"ro"`

	// READ-ONLY; Extension Id.
	ExtensionID *string `json:"extensionId,omitempty" azure:"ro"`

	// READ-ONLY; Installed extension version.
	InstalledExtensionVersion *string `json:"installedExtensionVersion,omitempty" azure:"ro"`
}

ExtensionProperties - Extension resource properties.

type ExtensionsClient

type ExtensionsClient struct {
	// contains filtered or unexported fields
}

ExtensionsClient contains the methods for the Extensions group. Don't use this type directly, use NewExtensionsClient() instead.

func NewExtensionsClient

func NewExtensionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExtensionsClient, error)

NewExtensionsClient creates a new instance of ExtensionsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ExtensionsClient) Create

func (client *ExtensionsClient) Create(ctx context.Context, extensionID string, farmBeatsResourceName string, resourceGroupName string, options *ExtensionsClientCreateOptions) (ExtensionsClientCreateResponse, error)

Create - Install extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-12-preview extensionID - Id of extension resource. farmBeatsResourceName - FarmBeats resource name. resourceGroupName - The name of the resource group. The name is case insensitive. options - ExtensionsClientCreateOptions contains the optional parameters for the ExtensionsClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2020-05-12-preview/examples/Extensions_Create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/agrifood/armagrifood"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armagrifood.NewExtensionsClient("11111111-2222-3333-4444-555555555555", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Create(ctx,
		"provider.extension",
		"examples-farmbeatsResourceName",
		"examples-rg",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ExtensionsClient) Delete

func (client *ExtensionsClient) Delete(ctx context.Context, extensionID string, farmBeatsResourceName string, resourceGroupName string, options *ExtensionsClientDeleteOptions) (ExtensionsClientDeleteResponse, error)

Delete - Uninstall extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-12-preview extensionID - Id of extension resource. farmBeatsResourceName - FarmBeats resource name. resourceGroupName - The name of the resource group. The name is case insensitive. options - ExtensionsClientDeleteOptions contains the optional parameters for the ExtensionsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2020-05-12-preview/examples/Extensions_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/agrifood/armagrifood"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armagrifood.NewExtensionsClient("11111111-2222-3333-4444-555555555555", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"provider.extension",
		"examples-farmbeatsResourceName",
		"examples-rg",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ExtensionsClient) Get

func (client *ExtensionsClient) Get(ctx context.Context, extensionID string, farmBeatsResourceName string, resourceGroupName string, options *ExtensionsClientGetOptions) (ExtensionsClientGetResponse, error)

Get - Get installed extension details by extension id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-12-preview extensionID - Id of extension resource. farmBeatsResourceName - FarmBeats resource name. resourceGroupName - The name of the resource group. The name is case insensitive. options - ExtensionsClientGetOptions contains the optional parameters for the ExtensionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2020-05-12-preview/examples/Extensions_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/agrifood/armagrifood"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armagrifood.NewExtensionsClient("11111111-2222-3333-4444-555555555555", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"provider.extension",
		"examples-farmbeatsResourceName",
		"examples-rg",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ExtensionsClient) NewListByFarmBeatsPager added in v0.5.0

func (client *ExtensionsClient) NewListByFarmBeatsPager(resourceGroupName string, farmBeatsResourceName string, options *ExtensionsClientListByFarmBeatsOptions) *runtime.Pager[ExtensionsClientListByFarmBeatsResponse]

NewListByFarmBeatsPager - Get installed extensions details. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-12-preview resourceGroupName - The name of the resource group. The name is case insensitive. farmBeatsResourceName - FarmBeats resource name. options - ExtensionsClientListByFarmBeatsOptions contains the optional parameters for the ExtensionsClient.ListByFarmBeats method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2020-05-12-preview/examples/Extensions_ListByFarmBeats.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/agrifood/armagrifood"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armagrifood.NewExtensionsClient("11111111-2222-3333-4444-555555555555", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByFarmBeatsPager("examples-rg",
		"examples-farmbeatsResourceName",
		&armagrifood.ExtensionsClientListByFarmBeatsOptions{ExtensionIDs: []string{},
			ExtensionCategories: []string{},
			MaxPageSize:         nil,
			SkipToken:           nil,
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ExtensionsClient) Update

func (client *ExtensionsClient) Update(ctx context.Context, extensionID string, farmBeatsResourceName string, resourceGroupName string, options *ExtensionsClientUpdateOptions) (ExtensionsClientUpdateResponse, error)

Update - Upgrade to latest extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-12-preview extensionID - Id of extension resource. farmBeatsResourceName - FarmBeats resource name. resourceGroupName - The name of the resource group. The name is case insensitive. options - ExtensionsClientUpdateOptions contains the optional parameters for the ExtensionsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2020-05-12-preview/examples/Extensions_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/agrifood/armagrifood"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armagrifood.NewExtensionsClient("11111111-2222-3333-4444-555555555555", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"provider.extension",
		"examples-farmbeatsResourceName",
		"examples-rg",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ExtensionsClientCreateOptions added in v0.3.0

type ExtensionsClientCreateOptions struct {
}

ExtensionsClientCreateOptions contains the optional parameters for the ExtensionsClient.Create method.

type ExtensionsClientCreateResponse added in v0.3.0

type ExtensionsClientCreateResponse struct {
	Extension
}

ExtensionsClientCreateResponse contains the response from method ExtensionsClient.Create.

type ExtensionsClientDeleteOptions added in v0.3.0

type ExtensionsClientDeleteOptions struct {
}

ExtensionsClientDeleteOptions contains the optional parameters for the ExtensionsClient.Delete method.

type ExtensionsClientDeleteResponse added in v0.3.0

type ExtensionsClientDeleteResponse struct {
}

ExtensionsClientDeleteResponse contains the response from method ExtensionsClient.Delete.

type ExtensionsClientGetOptions added in v0.3.0

type ExtensionsClientGetOptions struct {
}

ExtensionsClientGetOptions contains the optional parameters for the ExtensionsClient.Get method.

type ExtensionsClientGetResponse added in v0.3.0

type ExtensionsClientGetResponse struct {
	Extension
}

ExtensionsClientGetResponse contains the response from method ExtensionsClient.Get.

type ExtensionsClientListByFarmBeatsOptions added in v0.3.0

type ExtensionsClientListByFarmBeatsOptions struct {
	// Installed extension categories.
	ExtensionCategories []string
	// Installed extension ids.
	ExtensionIDs []string
	// Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50.
	MaxPageSize *int32
	// Skip token for getting next set of results.
	SkipToken *string
}

ExtensionsClientListByFarmBeatsOptions contains the optional parameters for the ExtensionsClient.ListByFarmBeats method.

type ExtensionsClientListByFarmBeatsResponse added in v0.3.0

type ExtensionsClientListByFarmBeatsResponse struct {
	ExtensionListResponse
}

ExtensionsClientListByFarmBeatsResponse contains the response from method ExtensionsClient.ListByFarmBeats.

type ExtensionsClientUpdateOptions added in v0.3.0

type ExtensionsClientUpdateOptions struct {
}

ExtensionsClientUpdateOptions contains the optional parameters for the ExtensionsClient.Update method.

type ExtensionsClientUpdateResponse added in v0.3.0

type ExtensionsClientUpdateResponse struct {
	Extension
}

ExtensionsClientUpdateResponse contains the response from method ExtensionsClient.Update.

type FarmBeats

type FarmBeats struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// FarmBeats ARM Resource properties.
	Properties *FarmBeatsProperties `json:"properties,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

FarmBeats ARM Resource.

func (FarmBeats) MarshalJSON

func (f FarmBeats) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FarmBeats.

type FarmBeatsExtension

type FarmBeatsExtension struct {
	// FarmBeatsExtension properties.
	Properties *FarmBeatsExtensionProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

FarmBeatsExtension - FarmBeats extension resource.

type FarmBeatsExtensionListResponse

type FarmBeatsExtensionListResponse struct {
	// List of requested objects.
	Value []*FarmBeatsExtension `json:"value,omitempty"`

	// READ-ONLY; Continuation link (absolute URI) to the next page of results in the list.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

FarmBeatsExtensionListResponse - Paged response contains list of requested objects and a URL link to get the next set of results.

type FarmBeatsExtensionProperties

type FarmBeatsExtensionProperties struct {
	// READ-ONLY; Textual description.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; Detailed information which shows summary of requested data. Used in descriptive get extension metadata call.
	// Information for weather category per api included are apisSupported, customParameters,
	// PlatformParameters and Units supported.
	DetailedInformation []*DetailedInformation `json:"detailedInformation,omitempty" azure:"ro"`

	// READ-ONLY; FarmBeatsExtension api docs link.
	ExtensionAPIDocsLink *string `json:"extensionApiDocsLink,omitempty" azure:"ro"`

	// READ-ONLY; FarmBeatsExtension auth link.
	ExtensionAuthLink *string `json:"extensionAuthLink,omitempty" azure:"ro"`

	// READ-ONLY; Category of the extension. e.g. weather/sensor/satellite.
	ExtensionCategory *string `json:"extensionCategory,omitempty" azure:"ro"`

	// READ-ONLY; FarmBeatsExtension ID.
	FarmBeatsExtensionID *string `json:"farmBeatsExtensionId,omitempty" azure:"ro"`

	// READ-ONLY; FarmBeatsExtension name.
	FarmBeatsExtensionName *string `json:"farmBeatsExtensionName,omitempty" azure:"ro"`

	// READ-ONLY; FarmBeatsExtension version.
	FarmBeatsExtensionVersion *string `json:"farmBeatsExtensionVersion,omitempty" azure:"ro"`

	// READ-ONLY; Publisher ID.
	PublisherID *string `json:"publisherId,omitempty" azure:"ro"`

	// READ-ONLY; Target ResourceType of the farmBeatsExtension.
	TargetResourceType *string `json:"targetResourceType,omitempty" azure:"ro"`
}

FarmBeatsExtensionProperties - FarmBeatsExtension properties.

func (FarmBeatsExtensionProperties) MarshalJSON

func (f FarmBeatsExtensionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FarmBeatsExtensionProperties.

type FarmBeatsExtensionsClient

type FarmBeatsExtensionsClient struct {
	// contains filtered or unexported fields
}

FarmBeatsExtensionsClient contains the methods for the FarmBeatsExtensions group. Don't use this type directly, use NewFarmBeatsExtensionsClient() instead.

func NewFarmBeatsExtensionsClient

func NewFarmBeatsExtensionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*FarmBeatsExtensionsClient, error)

NewFarmBeatsExtensionsClient creates a new instance of FarmBeatsExtensionsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*FarmBeatsExtensionsClient) Get

Get - Get farmBeats extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-12-preview farmBeatsExtensionID - farmBeatsExtensionId to be queried. options - FarmBeatsExtensionsClientGetOptions contains the optional parameters for the FarmBeatsExtensionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2020-05-12-preview/examples/FarmBeatsExtensions_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/agrifood/armagrifood"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armagrifood.NewFarmBeatsExtensionsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"DTN.ContentServices",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*FarmBeatsExtensionsClient) NewListPager added in v0.5.0

NewListPager - Get list of farmBeats extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-12-preview options - FarmBeatsExtensionsClientListOptions contains the optional parameters for the FarmBeatsExtensionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2020-05-12-preview/examples/FarmBeatsExtensions_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/agrifood/armagrifood"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armagrifood.NewFarmBeatsExtensionsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(&armagrifood.FarmBeatsExtensionsClientListOptions{FarmBeatsExtensionIDs: []string{},
		FarmBeatsExtensionNames: []string{},
		ExtensionCategories:     []string{},
		PublisherIDs:            []string{},
		MaxPageSize:             nil,
	})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type FarmBeatsExtensionsClientGetOptions added in v0.3.0

type FarmBeatsExtensionsClientGetOptions struct {
}

FarmBeatsExtensionsClientGetOptions contains the optional parameters for the FarmBeatsExtensionsClient.Get method.

type FarmBeatsExtensionsClientGetResponse added in v0.3.0

type FarmBeatsExtensionsClientGetResponse struct {
	FarmBeatsExtension
}

FarmBeatsExtensionsClientGetResponse contains the response from method FarmBeatsExtensionsClient.Get.

type FarmBeatsExtensionsClientListOptions added in v0.3.0

type FarmBeatsExtensionsClientListOptions struct {
	// Extension categories.
	ExtensionCategories []string
	// FarmBeatsExtension ids.
	FarmBeatsExtensionIDs []string
	// FarmBeats extension names.
	FarmBeatsExtensionNames []string
	// Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50.
	MaxPageSize *int32
	// Publisher ids.
	PublisherIDs []string
}

FarmBeatsExtensionsClientListOptions contains the optional parameters for the FarmBeatsExtensionsClient.List method.

type FarmBeatsExtensionsClientListResponse added in v0.3.0

type FarmBeatsExtensionsClientListResponse struct {
	FarmBeatsExtensionListResponse
}

FarmBeatsExtensionsClientListResponse contains the response from method FarmBeatsExtensionsClient.List.

type FarmBeatsListResponse

type FarmBeatsListResponse struct {
	// List of requested objects.
	Value []*FarmBeats `json:"value,omitempty"`

	// READ-ONLY; Continuation link (absolute URI) to the next page of results in the list.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

FarmBeatsListResponse - Paged response contains list of requested objects and a URL link to get the next set of results.

type FarmBeatsModelsClient

type FarmBeatsModelsClient struct {
	// contains filtered or unexported fields
}

FarmBeatsModelsClient contains the methods for the FarmBeatsModels group. Don't use this type directly, use NewFarmBeatsModelsClient() instead.

func NewFarmBeatsModelsClient

func NewFarmBeatsModelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FarmBeatsModelsClient, error)

NewFarmBeatsModelsClient creates a new instance of FarmBeatsModelsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*FarmBeatsModelsClient) CreateOrUpdate

func (client *FarmBeatsModelsClient) CreateOrUpdate(ctx context.Context, farmBeatsResourceName string, resourceGroupName string, body FarmBeats, options *FarmBeatsModelsClientCreateOrUpdateOptions) (FarmBeatsModelsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update FarmBeats resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-12-preview farmBeatsResourceName - FarmBeats resource name. resourceGroupName - The name of the resource group. The name is case insensitive. body - FarmBeats resource create or update request object. options - FarmBeatsModelsClientCreateOrUpdateOptions contains the optional parameters for the FarmBeatsModelsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2020-05-12-preview/examples/FarmBeatsModels_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/agrifood/armagrifood"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armagrifood.NewFarmBeatsModelsClient("11111111-2222-3333-4444-555555555555", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"examples-farmbeatsResourceName",
		"examples-rg",
		armagrifood.FarmBeats{
			Location: to.Ptr("eastus2"),
			Tags: map[string]*string{
				"key1": to.Ptr("value1"),
				"key2": to.Ptr("value2"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*FarmBeatsModelsClient) Delete

func (client *FarmBeatsModelsClient) Delete(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, options *FarmBeatsModelsClientDeleteOptions) (FarmBeatsModelsClientDeleteResponse, error)

Delete - Delete a FarmBeats resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-12-preview resourceGroupName - The name of the resource group. The name is case insensitive. farmBeatsResourceName - FarmBeats resource name. options - FarmBeatsModelsClientDeleteOptions contains the optional parameters for the FarmBeatsModelsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2020-05-12-preview/examples/FarmBeatsModels_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/agrifood/armagrifood"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armagrifood.NewFarmBeatsModelsClient("11111111-2222-3333-4444-555555555555", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"examples-rg",
		"examples-farmBeatsResourceName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*FarmBeatsModelsClient) Get

func (client *FarmBeatsModelsClient) Get(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, options *FarmBeatsModelsClientGetOptions) (FarmBeatsModelsClientGetResponse, error)

Get - Get FarmBeats resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-12-preview resourceGroupName - The name of the resource group. The name is case insensitive. farmBeatsResourceName - FarmBeats resource name. options - FarmBeatsModelsClientGetOptions contains the optional parameters for the FarmBeatsModelsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2020-05-12-preview/examples/FarmBeatsModels_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/agrifood/armagrifood"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armagrifood.NewFarmBeatsModelsClient("11111111-2222-3333-4444-555555555555", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"examples-rg",
		"examples-farmBeatsResourceName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*FarmBeatsModelsClient) NewListByResourceGroupPager added in v0.5.0

NewListByResourceGroupPager - Lists the FarmBeats instances for a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-12-preview resourceGroupName - The name of the resource group. The name is case insensitive. options - FarmBeatsModelsClientListByResourceGroupOptions contains the optional parameters for the FarmBeatsModelsClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2020-05-12-preview/examples/FarmBeatsModels_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/agrifood/armagrifood"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armagrifood.NewFarmBeatsModelsClient("11111111-2222-3333-4444-555555555555", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("examples-rg",
		&armagrifood.FarmBeatsModelsClientListByResourceGroupOptions{MaxPageSize: nil,
			SkipToken: nil,
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*FarmBeatsModelsClient) NewListBySubscriptionPager added in v0.5.0

NewListBySubscriptionPager - Lists the FarmBeats instances for a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-12-preview options - FarmBeatsModelsClientListBySubscriptionOptions contains the optional parameters for the FarmBeatsModelsClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2020-05-12-preview/examples/FarmBeatsModels_ListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/agrifood/armagrifood"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armagrifood.NewFarmBeatsModelsClient("11111111-2222-3333-4444-555555555555", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(&armagrifood.FarmBeatsModelsClientListBySubscriptionOptions{MaxPageSize: nil,
		SkipToken: nil,
	})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*FarmBeatsModelsClient) Update

Update - Update a FarmBeats resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-12-preview farmBeatsResourceName - FarmBeats resource name. resourceGroupName - The name of the resource group. The name is case insensitive. body - Request object. options - FarmBeatsModelsClientUpdateOptions contains the optional parameters for the FarmBeatsModelsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2020-05-12-preview/examples/FarmBeatsModels_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/agrifood/armagrifood"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armagrifood.NewFarmBeatsModelsClient("11111111-2222-3333-4444-555555555555", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"examples-farmBeatsResourceName",
		"examples-rg",
		armagrifood.FarmBeatsUpdateRequestModel{
			Tags: map[string]*string{
				"key1": to.Ptr("value1"),
				"key2": to.Ptr("value2"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type FarmBeatsModelsClientCreateOrUpdateOptions added in v0.3.0

type FarmBeatsModelsClientCreateOrUpdateOptions struct {
}

FarmBeatsModelsClientCreateOrUpdateOptions contains the optional parameters for the FarmBeatsModelsClient.CreateOrUpdate method.

type FarmBeatsModelsClientCreateOrUpdateResponse added in v0.3.0

type FarmBeatsModelsClientCreateOrUpdateResponse struct {
	FarmBeats
}

FarmBeatsModelsClientCreateOrUpdateResponse contains the response from method FarmBeatsModelsClient.CreateOrUpdate.

type FarmBeatsModelsClientDeleteOptions added in v0.3.0

type FarmBeatsModelsClientDeleteOptions struct {
}

FarmBeatsModelsClientDeleteOptions contains the optional parameters for the FarmBeatsModelsClient.Delete method.

type FarmBeatsModelsClientDeleteResponse added in v0.3.0

type FarmBeatsModelsClientDeleteResponse struct {
}

FarmBeatsModelsClientDeleteResponse contains the response from method FarmBeatsModelsClient.Delete.

type FarmBeatsModelsClientGetOptions added in v0.3.0

type FarmBeatsModelsClientGetOptions struct {
}

FarmBeatsModelsClientGetOptions contains the optional parameters for the FarmBeatsModelsClient.Get method.

type FarmBeatsModelsClientGetResponse added in v0.3.0

type FarmBeatsModelsClientGetResponse struct {
	FarmBeats
}

FarmBeatsModelsClientGetResponse contains the response from method FarmBeatsModelsClient.Get.

type FarmBeatsModelsClientListByResourceGroupOptions added in v0.3.0

type FarmBeatsModelsClientListByResourceGroupOptions struct {
	// Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50.
	MaxPageSize *int32
	// Continuation token for getting next set of results.
	SkipToken *string
}

FarmBeatsModelsClientListByResourceGroupOptions contains the optional parameters for the FarmBeatsModelsClient.ListByResourceGroup method.

type FarmBeatsModelsClientListByResourceGroupResponse added in v0.3.0

type FarmBeatsModelsClientListByResourceGroupResponse struct {
	FarmBeatsListResponse
}

FarmBeatsModelsClientListByResourceGroupResponse contains the response from method FarmBeatsModelsClient.ListByResourceGroup.

type FarmBeatsModelsClientListBySubscriptionOptions added in v0.3.0

type FarmBeatsModelsClientListBySubscriptionOptions struct {
	// Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50.
	MaxPageSize *int32
	// Skip token for getting next set of results.
	SkipToken *string
}

FarmBeatsModelsClientListBySubscriptionOptions contains the optional parameters for the FarmBeatsModelsClient.ListBySubscription method.

type FarmBeatsModelsClientListBySubscriptionResponse added in v0.3.0

type FarmBeatsModelsClientListBySubscriptionResponse struct {
	FarmBeatsListResponse
}

FarmBeatsModelsClientListBySubscriptionResponse contains the response from method FarmBeatsModelsClient.ListBySubscription.

type FarmBeatsModelsClientUpdateOptions added in v0.3.0

type FarmBeatsModelsClientUpdateOptions struct {
}

FarmBeatsModelsClientUpdateOptions contains the optional parameters for the FarmBeatsModelsClient.Update method.

type FarmBeatsModelsClientUpdateResponse added in v0.3.0

type FarmBeatsModelsClientUpdateResponse struct {
	FarmBeats
}

FarmBeatsModelsClientUpdateResponse contains the response from method FarmBeatsModelsClient.Update.

type FarmBeatsProperties

type FarmBeatsProperties struct {
	// READ-ONLY; Uri of the FarmBeats instance.
	InstanceURI *string `json:"instanceUri,omitempty" azure:"ro"`

	// READ-ONLY; FarmBeats instance provisioning state.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

FarmBeatsProperties - FarmBeats ARM Resource properties.

type FarmBeatsUpdateRequestModel

type FarmBeatsUpdateRequestModel struct {
	// Geo-location where the resource lives.
	Location *string `json:"location,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`
}

FarmBeatsUpdateRequestModel - FarmBeats update request.

func (FarmBeatsUpdateRequestModel) MarshalJSON

func (f FarmBeatsUpdateRequestModel) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FarmBeatsUpdateRequestModel.

type LocationsClient

type LocationsClient struct {
	// contains filtered or unexported fields
}

LocationsClient contains the methods for the Locations group. Don't use this type directly, use NewLocationsClient() instead.

func NewLocationsClient

func NewLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocationsClient, error)

NewLocationsClient creates a new instance of LocationsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*LocationsClient) CheckNameAvailability

CheckNameAvailability - Checks the name availability of the resource with requested resource name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-12-preview body - NameAvailabilityRequest object. options - LocationsClientCheckNameAvailabilityOptions contains the optional parameters for the LocationsClient.CheckNameAvailability method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2020-05-12-preview/examples/Locations_CheckNameAvailability_AlreadyExists.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/agrifood/armagrifood"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armagrifood.NewLocationsClient("11111111-2222-3333-4444-555555555555", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CheckNameAvailability(ctx,
		armagrifood.CheckNameAvailabilityRequest{
			Name: to.Ptr("existingaccountname"),
			Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeats"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type LocationsClientCheckNameAvailabilityOptions added in v0.3.0

type LocationsClientCheckNameAvailabilityOptions struct {
}

LocationsClientCheckNameAvailabilityOptions contains the optional parameters for the LocationsClient.CheckNameAvailability method.

type LocationsClientCheckNameAvailabilityResponse added in v0.3.0

type LocationsClientCheckNameAvailabilityResponse struct {
	CheckNameAvailabilityResponse
}

LocationsClientCheckNameAvailabilityResponse contains the response from method LocationsClient.CheckNameAvailability.

type Operation

type Operation struct {
	// Localized display information for this particular operation.
	Display *OperationDisplay `json:"display,omitempty"`

	// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType `json:"actionType,omitempty" azure:"ro"`

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
	// operations.
	IsDataAction *bool `json:"isDataAction,omitempty" azure:"ro"`

	// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
	// "Microsoft.Compute/virtualMachines/capture/action"
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
	// value is "user,system"
	Origin *Origin `json:"origin,omitempty" azure:"ro"`
}

Operation - Details of a REST API operation, returned from the Resource Provider Operations API

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
	// Machine", "Restart Virtual Machine".
	Operation *string `json:"operation,omitempty" azure:"ro"`

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string `json:"provider,omitempty" azure:"ro"`

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string `json:"resource,omitempty" azure:"ro"`
}

OperationDisplay - Localized display information for this particular operation.

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results (if there are any).
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; List of operations supported by the resource provider
	Value []*Operation `json:"value,omitempty" azure:"ro"`
}

OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationsClient) NewListPager added in v0.5.0

NewListPager - Lists the available operations of Microsoft.AgFoodPlatform resource provider. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-12-preview options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2020-05-12-preview/examples/Operations_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/agrifood/armagrifood"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armagrifood.NewOperationsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type OperationsClientListOptions added in v0.3.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

type OperationsClientListResponse added in v0.3.0

type OperationsClientListResponse struct {
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type Origin

type Origin string

Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"

const (
	OriginSystem     Origin = "system"
	OriginUser       Origin = "user"
	OriginUserSystem Origin = "user,system"
)

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type ProvisioningState

type ProvisioningState string

ProvisioningState - FarmBeats instance provisioning state.

const (
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ProxyResource

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// The type of identity that created the resource.
	CreatedByType *CreatedByType `json:"createdByType,omitempty"`

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"`

	// The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TrackedResource

type TrackedResource struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'

func (TrackedResource) MarshalJSON

func (t TrackedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

type UnitSystemsInfo

type UnitSystemsInfo struct {
	// REQUIRED; UnitSystem key sent as part of ProviderInput.
	Key *string `json:"key,omitempty"`

	// REQUIRED; List of unit systems supported by this data provider.
	Values []*string `json:"values,omitempty"`
}

UnitSystemsInfo - Unit systems info for the data provider.

func (UnitSystemsInfo) MarshalJSON

func (u UnitSystemsInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UnitSystemsInfo.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL