Documentation ¶
Index ¶
- type ActionType
- type ArmAsyncOperation
- type CheckNameAvailabilityReason
- type CheckNameAvailabilityRequest
- type CheckNameAvailabilityResponse
- type CreatedByType
- type DetailedInformation
- type ErrorAdditionalInfo
- type ErrorDetail
- type ErrorResponse
- type Extension
- type ExtensionListResponse
- type ExtensionProperties
- type ExtensionsClient
- func (client *ExtensionsClient) Create(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, ...) (ExtensionsClientCreateResponse, error)
- func (client *ExtensionsClient) Delete(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, ...) (ExtensionsClientDeleteResponse, error)
- func (client *ExtensionsClient) Get(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, ...) (ExtensionsClientGetResponse, error)
- func (client *ExtensionsClient) NewListByFarmBeatsPager(resourceGroupName string, farmBeatsResourceName string, ...) *runtime.Pager[ExtensionsClientListByFarmBeatsResponse]
- func (client *ExtensionsClient) Update(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, ...) (ExtensionsClientUpdateResponse, error)
- type ExtensionsClientCreateOptions
- type ExtensionsClientCreateResponse
- type ExtensionsClientDeleteOptions
- type ExtensionsClientDeleteResponse
- type ExtensionsClientGetOptions
- type ExtensionsClientGetResponse
- type ExtensionsClientListByFarmBeatsOptions
- type ExtensionsClientListByFarmBeatsResponse
- type ExtensionsClientUpdateOptions
- type ExtensionsClientUpdateResponse
- type FarmBeats
- type FarmBeatsExtension
- type FarmBeatsExtensionListResponse
- type FarmBeatsExtensionProperties
- type FarmBeatsExtensionsClient
- func (client *FarmBeatsExtensionsClient) Get(ctx context.Context, farmBeatsExtensionID string, ...) (FarmBeatsExtensionsClientGetResponse, error)
- func (client *FarmBeatsExtensionsClient) NewListPager(options *FarmBeatsExtensionsClientListOptions) *runtime.Pager[FarmBeatsExtensionsClientListResponse]
- type FarmBeatsExtensionsClientGetOptions
- type FarmBeatsExtensionsClientGetResponse
- type FarmBeatsExtensionsClientListOptions
- type FarmBeatsExtensionsClientListResponse
- type FarmBeatsListResponse
- type FarmBeatsModelsClient
- func (client *FarmBeatsModelsClient) BeginUpdate(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, ...) (*runtime.Poller[FarmBeatsModelsClientUpdateResponse], error)
- func (client *FarmBeatsModelsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, ...) (FarmBeatsModelsClientCreateOrUpdateResponse, error)
- func (client *FarmBeatsModelsClient) Delete(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, ...) (FarmBeatsModelsClientDeleteResponse, error)
- func (client *FarmBeatsModelsClient) Get(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, ...) (FarmBeatsModelsClientGetResponse, error)
- func (client *FarmBeatsModelsClient) GetOperationResult(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, ...) (FarmBeatsModelsClientGetOperationResultResponse, error)
- func (client *FarmBeatsModelsClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[FarmBeatsModelsClientListByResourceGroupResponse]
- func (client *FarmBeatsModelsClient) NewListBySubscriptionPager(options *FarmBeatsModelsClientListBySubscriptionOptions) *runtime.Pager[FarmBeatsModelsClientListBySubscriptionResponse]
- type FarmBeatsModelsClientBeginUpdateOptions
- type FarmBeatsModelsClientCreateOrUpdateOptions
- type FarmBeatsModelsClientCreateOrUpdateResponse
- type FarmBeatsModelsClientDeleteOptions
- type FarmBeatsModelsClientDeleteResponse
- type FarmBeatsModelsClientGetOperationResultOptions
- type FarmBeatsModelsClientGetOperationResultResponse
- type FarmBeatsModelsClientGetOptions
- type FarmBeatsModelsClientGetResponse
- type FarmBeatsModelsClientListByResourceGroupOptions
- type FarmBeatsModelsClientListByResourceGroupResponse
- type FarmBeatsModelsClientListBySubscriptionOptions
- type FarmBeatsModelsClientListBySubscriptionResponse
- type FarmBeatsModelsClientUpdateResponse
- type FarmBeatsProperties
- type FarmBeatsUpdateProperties
- type FarmBeatsUpdateRequestModel
- type Identity
- type LocationsClient
- type LocationsClientCheckNameAvailabilityOptions
- type LocationsClientCheckNameAvailabilityResponse
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type PrivateEndpoint
- type PrivateEndpointConnection
- type PrivateEndpointConnectionListResult
- type PrivateEndpointConnectionProperties
- type PrivateEndpointConnectionProvisioningState
- type PrivateEndpointConnectionsClient
- func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, ...) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
- func (client *PrivateEndpointConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, ...) (PrivateEndpointConnectionsClientCreateOrUpdateResponse, error)
- func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, ...) (PrivateEndpointConnectionsClientGetResponse, error)
- func (client *PrivateEndpointConnectionsClient) NewListByResourcePager(resourceGroupName string, farmBeatsResourceName string, ...) *runtime.Pager[PrivateEndpointConnectionsClientListByResourceResponse]
- type PrivateEndpointConnectionsClientBeginDeleteOptions
- type PrivateEndpointConnectionsClientCreateOrUpdateOptions
- type PrivateEndpointConnectionsClientCreateOrUpdateResponse
- type PrivateEndpointConnectionsClientDeleteResponse
- type PrivateEndpointConnectionsClientGetOptions
- type PrivateEndpointConnectionsClientGetResponse
- type PrivateEndpointConnectionsClientListByResourceOptions
- type PrivateEndpointConnectionsClientListByResourceResponse
- type PrivateEndpointServiceConnectionStatus
- type PrivateLinkResource
- type PrivateLinkResourceListResult
- type PrivateLinkResourceProperties
- type PrivateLinkResourcesClient
- func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, ...) (PrivateLinkResourcesClientGetResponse, error)
- func (client *PrivateLinkResourcesClient) NewListByResourcePager(resourceGroupName string, farmBeatsResourceName string, ...) *runtime.Pager[PrivateLinkResourcesClientListByResourceResponse]
- type PrivateLinkResourcesClientGetOptions
- type PrivateLinkResourcesClientGetResponse
- type PrivateLinkResourcesClientListByResourceOptions
- type PrivateLinkResourcesClientListByResourceResponse
- type PrivateLinkServiceConnectionState
- type ProvisioningState
- type ProxyResource
- type PublicNetworkAccess
- type Resource
- type SensorIntegration
- type SystemData
- type TrackedResource
- type UnitSystemsInfo
Examples ¶
- ExtensionsClient.Create
- ExtensionsClient.Delete
- ExtensionsClient.Get
- ExtensionsClient.NewListByFarmBeatsPager
- ExtensionsClient.Update
- FarmBeatsExtensionsClient.Get
- FarmBeatsExtensionsClient.NewListPager
- FarmBeatsModelsClient.BeginUpdate (FarmBeatsModelsUpdate)
- FarmBeatsModelsClient.BeginUpdate (FarmBeatsModelsUpdateWithSensor)
- FarmBeatsModelsClient.CreateOrUpdate
- FarmBeatsModelsClient.Delete
- FarmBeatsModelsClient.Get
- FarmBeatsModelsClient.GetOperationResult
- FarmBeatsModelsClient.NewListByResourceGroupPager
- FarmBeatsModelsClient.NewListBySubscriptionPager
- LocationsClient.CheckNameAvailability (LocationsCheckNameAvailabilityAlreadyExists)
- LocationsClient.CheckNameAvailability (LocationsCheckNameAvailabilityAvailable)
- OperationsClient.NewListPager
- PrivateEndpointConnectionsClient.BeginDelete
- PrivateEndpointConnectionsClient.CreateOrUpdate
- PrivateEndpointConnectionsClient.Get
- PrivateEndpointConnectionsClient.NewListByResourcePager
- PrivateLinkResourcesClient.Get
- PrivateLinkResourcesClient.NewListByResourcePager
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 ArmAsyncOperation ¶ added in v0.7.0
type ArmAsyncOperation struct { // Status of the async operation. Status *string `json:"status,omitempty"` }
ArmAsyncOperation - Arm async operation class. Ref: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/async-operations.
func (ArmAsyncOperation) MarshalJSON ¶ added in v0.7.0
func (a ArmAsyncOperation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ArmAsyncOperation.
func (*ArmAsyncOperation) UnmarshalJSON ¶ added in v0.7.0
func (a *ArmAsyncOperation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ArmAsyncOperation.
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.
func (CheckNameAvailabilityRequest) MarshalJSON ¶ added in v0.7.0
func (c CheckNameAvailabilityRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityRequest.
func (*CheckNameAvailabilityRequest) UnmarshalJSON ¶ added in v0.7.0
func (c *CheckNameAvailabilityRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityRequest.
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.
func (CheckNameAvailabilityResponse) MarshalJSON ¶ added in v0.7.0
func (c CheckNameAvailabilityResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResponse.
func (*CheckNameAvailabilityResponse) UnmarshalJSON ¶ added in v0.7.0
func (c *CheckNameAvailabilityResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResponse.
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.
func (*DetailedInformation) UnmarshalJSON ¶ added in v0.7.0
func (d *DetailedInformation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller 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.
func (ErrorAdditionalInfo) MarshalJSON ¶ added in v0.7.0
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (*ErrorAdditionalInfo) UnmarshalJSON ¶ added in v0.7.0
func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.
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.
func (ErrorDetail) MarshalJSON ¶
func (e ErrorDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetail.
func (*ErrorDetail) UnmarshalJSON ¶ added in v0.7.0
func (e *ErrorDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.
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.).
func (ErrorResponse) MarshalJSON ¶ added in v0.7.0
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶ added in v0.7.0
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
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; Azure Resource Manager metadata containing createdBy and modifiedBy information. 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.
func (Extension) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Extension.
func (*Extension) UnmarshalJSON ¶ added in v0.7.0
UnmarshalJSON implements the json.Unmarshaller interface for type Extension.
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.
func (ExtensionListResponse) MarshalJSON ¶
func (e ExtensionListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExtensionListResponse.
func (*ExtensionListResponse) UnmarshalJSON ¶ added in v0.7.0
func (e *ExtensionListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExtensionListResponse.
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.
func (ExtensionProperties) MarshalJSON ¶ added in v0.7.0
func (e ExtensionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExtensionProperties.
func (*ExtensionProperties) UnmarshalJSON ¶ added in v0.7.0
func (e *ExtensionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExtensionProperties.
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, resourceGroupName string, farmBeatsResourceName string, extensionID string, options *ExtensionsClientCreateOptions) (ExtensionsClientCreateResponse, error)
Create - Install extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. farmBeatsResourceName - FarmBeats resource name. extensionID - Id of extension resource. 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/2021-09-01-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, "examples-rg", "examples-farmbeatsResourceName", "provider.extension", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ExtensionsClient) Delete ¶
func (client *ExtensionsClient) Delete(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, extensionID string, options *ExtensionsClientDeleteOptions) (ExtensionsClientDeleteResponse, error)
Delete - Uninstall extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. farmBeatsResourceName - FarmBeats resource name. extensionID - Id of extension resource. 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/2021-09-01-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, "examples-rg", "examples-farmbeatsResourceName", "provider.extension", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ExtensionsClient) Get ¶
func (client *ExtensionsClient) Get(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, extensionID 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 2021-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. farmBeatsResourceName - FarmBeats resource name. extensionID - Id of extension resource. 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/2021-09-01-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, "examples-rg", "examples-farmbeatsResourceName", "provider.extension", 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 2021-09-01-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/2021-09-01-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, resourceGroupName string, farmBeatsResourceName string, extensionID string, options *ExtensionsClientUpdateOptions) (ExtensionsClientUpdateResponse, error)
Update - Upgrade to latest extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. farmBeatsResourceName - FarmBeats resource name. extensionID - Id of extension resource. 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/2021-09-01-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, "examples-rg", "examples-farmbeatsResourceName", "provider.extension", 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"` // Identity for the resource. Identity *Identity `json:"identity,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; Azure Resource Manager metadata containing createdBy and modifiedBy information. 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 ¶
MarshalJSON implements the json.Marshaller interface for type FarmBeats.
func (*FarmBeats) UnmarshalJSON ¶ added in v0.7.0
UnmarshalJSON implements the json.Unmarshaller 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; Azure Resource Manager metadata containing createdBy and modifiedBy information. 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.
func (FarmBeatsExtension) MarshalJSON ¶
func (f FarmBeatsExtension) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FarmBeatsExtension.
func (*FarmBeatsExtension) UnmarshalJSON ¶ added in v0.7.0
func (f *FarmBeatsExtension) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FarmBeatsExtension.
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.
func (FarmBeatsExtensionListResponse) MarshalJSON ¶
func (f FarmBeatsExtensionListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FarmBeatsExtensionListResponse.
func (*FarmBeatsExtensionListResponse) UnmarshalJSON ¶ added in v0.7.0
func (f *FarmBeatsExtensionListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FarmBeatsExtensionListResponse.
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.
func (*FarmBeatsExtensionProperties) UnmarshalJSON ¶ added in v0.7.0
func (f *FarmBeatsExtensionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller 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 ¶
func (client *FarmBeatsExtensionsClient) Get(ctx context.Context, farmBeatsExtensionID string, options *FarmBeatsExtensionsClientGetOptions) (FarmBeatsExtensionsClientGetResponse, error)
Get - Get farmBeats extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-09-01-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/2021-09-01-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
func (client *FarmBeatsExtensionsClient) NewListPager(options *FarmBeatsExtensionsClientListOptions) *runtime.Pager[FarmBeatsExtensionsClientListResponse]
NewListPager - Get list of farmBeats extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-09-01-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/2021-09-01-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.
func (FarmBeatsListResponse) MarshalJSON ¶
func (f FarmBeatsListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FarmBeatsListResponse.
func (*FarmBeatsListResponse) UnmarshalJSON ¶ added in v0.7.0
func (f *FarmBeatsListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FarmBeatsListResponse.
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) BeginUpdate ¶ added in v0.7.0
func (client *FarmBeatsModelsClient) BeginUpdate(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, body FarmBeatsUpdateRequestModel, options *FarmBeatsModelsClientBeginUpdateOptions) (*runtime.Poller[FarmBeatsModelsClientUpdateResponse], error)
BeginUpdate - Update a FarmBeats resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. farmBeatsResourceName - FarmBeats resource name. body - Request object. options - FarmBeatsModelsClientBeginUpdateOptions contains the optional parameters for the FarmBeatsModelsClient.BeginUpdate method.
Example (FarmBeatsModelsUpdate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-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) } poller, err := client.BeginUpdate(ctx, "examples-rg", "examples-farmBeatsResourceName", 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) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
Example (FarmBeatsModelsUpdateWithSensor) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/FarmBeatsModels_UpdateWithSensor.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) } poller, err := client.BeginUpdate(ctx, "examples-rg", "examples-farmBeatsResourceName", armagrifood.FarmBeatsUpdateRequestModel{ Identity: &armagrifood.Identity{ Type: to.Ptr("SystemAssigned"), }, Properties: &armagrifood.FarmBeatsUpdateProperties{ SensorIntegration: &armagrifood.SensorIntegration{ Enabled: to.Ptr("True"), }, }, 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) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*FarmBeatsModelsClient) CreateOrUpdate ¶
func (client *FarmBeatsModelsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, farmBeatsResourceName 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 2021-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. farmBeatsResourceName - FarmBeats resource name. 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/2021-09-01-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-rg", "examples-farmbeatsResourceName", 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 2021-09-01-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/2021-09-01-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 2021-09-01-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/2021-09-01-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) GetOperationResult ¶ added in v0.7.0
func (client *FarmBeatsModelsClient) GetOperationResult(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, operationResultsID string, options *FarmBeatsModelsClientGetOperationResultOptions) (FarmBeatsModelsClientGetOperationResultResponse, error)
GetOperationResult - Get operationResults for a FarmBeats resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. farmBeatsResourceName - FarmBeats resource name. operationResultsID - The operation results id. options - FarmBeatsModelsClientGetOperationResultOptions contains the optional parameters for the FarmBeatsModelsClient.GetOperationResult method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/FarmBeatsModels_GetOperationResult.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.GetOperationResult(ctx, "examples-rg", "examples-farmBeatsResourceName", "resource-provisioning-id-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
func (client *FarmBeatsModelsClient) NewListByResourceGroupPager(resourceGroupName string, options *FarmBeatsModelsClientListByResourceGroupOptions) *runtime.Pager[FarmBeatsModelsClientListByResourceGroupResponse]
NewListByResourceGroupPager - Lists the FarmBeats instances for a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-09-01-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/2021-09-01-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
func (client *FarmBeatsModelsClient) NewListBySubscriptionPager(options *FarmBeatsModelsClientListBySubscriptionOptions) *runtime.Pager[FarmBeatsModelsClientListBySubscriptionResponse]
NewListBySubscriptionPager - Lists the FarmBeats instances for a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-09-01-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/2021-09-01-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:
type FarmBeatsModelsClientBeginUpdateOptions ¶ added in v0.7.0
type FarmBeatsModelsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FarmBeatsModelsClientBeginUpdateOptions contains the optional parameters for the FarmBeatsModelsClient.BeginUpdate method.
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 FarmBeatsModelsClientGetOperationResultOptions ¶ added in v0.7.0
type FarmBeatsModelsClientGetOperationResultOptions struct { }
FarmBeatsModelsClientGetOperationResultOptions contains the optional parameters for the FarmBeatsModelsClient.GetOperationResult method.
type FarmBeatsModelsClientGetOperationResultResponse ¶ added in v0.7.0
type FarmBeatsModelsClientGetOperationResultResponse struct {
ArmAsyncOperation
}
FarmBeatsModelsClientGetOperationResultResponse contains the response from method FarmBeatsModelsClient.GetOperationResult.
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 FarmBeatsModelsClientUpdateResponse ¶ added in v0.3.0
type FarmBeatsModelsClientUpdateResponse struct {
FarmBeats
}
FarmBeatsModelsClientUpdateResponse contains the response from method FarmBeatsModelsClient.Update.
type FarmBeatsProperties ¶
type FarmBeatsProperties struct { // Property to allow or block public traffic for an Azure FarmBeats resource. PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` // Sensor integration request model. SensorIntegration *SensorIntegration `json:"sensorIntegration,omitempty"` // READ-ONLY; Uri of the FarmBeats instance. InstanceURI *string `json:"instanceUri,omitempty" azure:"ro"` // READ-ONLY; The Private Endpoint Connection resource. PrivateEndpointConnections *PrivateEndpointConnection `json:"privateEndpointConnections,omitempty" azure:"ro"` // READ-ONLY; FarmBeats instance provisioning state. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` }
FarmBeatsProperties - FarmBeats ARM Resource properties.
func (FarmBeatsProperties) MarshalJSON ¶ added in v0.7.0
func (f FarmBeatsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FarmBeatsProperties.
func (*FarmBeatsProperties) UnmarshalJSON ¶ added in v0.7.0
func (f *FarmBeatsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FarmBeatsProperties.
type FarmBeatsUpdateProperties ¶ added in v0.7.0
type FarmBeatsUpdateProperties struct { // Property to allow or block public traffic for an Azure FarmBeats resource. PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` // Sensor integration request model. SensorIntegration *SensorIntegration `json:"sensorIntegration,omitempty"` }
FarmBeatsUpdateProperties - FarmBeats ARM Resource properties.
func (FarmBeatsUpdateProperties) MarshalJSON ¶ added in v0.7.0
func (f FarmBeatsUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FarmBeatsUpdateProperties.
func (*FarmBeatsUpdateProperties) UnmarshalJSON ¶ added in v0.7.0
func (f *FarmBeatsUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FarmBeatsUpdateProperties.
type FarmBeatsUpdateRequestModel ¶
type FarmBeatsUpdateRequestModel struct { // Identity for the resource. Identity *Identity `json:"identity,omitempty"` // Geo-location where the resource lives. Location *string `json:"location,omitempty"` // FarmBeats ARM Resource properties. Properties *FarmBeatsUpdateProperties `json:"properties,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.
func (*FarmBeatsUpdateRequestModel) UnmarshalJSON ¶ added in v0.7.0
func (f *FarmBeatsUpdateRequestModel) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FarmBeatsUpdateRequestModel.
type Identity ¶ added in v0.7.0
type Identity struct { // The identity type. Type *string `json:"type,omitempty"` // READ-ONLY; The principal ID of resource identity. PrincipalID *string `json:"principalId,omitempty" azure:"ro"` // READ-ONLY; The tenant ID of resource. TenantID *string `json:"tenantId,omitempty" azure:"ro"` }
Identity for the resource.
func (Identity) MarshalJSON ¶ added in v0.7.0
MarshalJSON implements the json.Marshaller interface for type Identity.
func (*Identity) UnmarshalJSON ¶ added in v0.7.0
UnmarshalJSON implements the json.Unmarshaller interface for type Identity.
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 ¶
func (client *LocationsClient) CheckNameAvailability(ctx context.Context, body CheckNameAvailabilityRequest, options *LocationsClientCheckNameAvailabilityOptions) (LocationsClientCheckNameAvailabilityResponse, error)
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 2021-09-01-preview body - NameAvailabilityRequest object. options - LocationsClientCheckNameAvailabilityOptions contains the optional parameters for the LocationsClient.CheckNameAvailability method.
Example (LocationsCheckNameAvailabilityAlreadyExists) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-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:
Example (LocationsCheckNameAvailabilityAvailable) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Locations_CheckNameAvailability_Available.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("newaccountname"), 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
func (Operation) MarshalJSON ¶ added in v0.7.0
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶ added in v0.7.0
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
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.
func (OperationDisplay) MarshalJSON ¶ added in v0.7.0
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶ added in v0.7.0
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
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.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶ added in v0.7.0
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
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
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists the available operations of Microsoft.AgFoodPlatform resource provider. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-09-01-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/2021-09-01-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"
func PossibleOriginValues ¶
func PossibleOriginValues() []Origin
PossibleOriginValues returns the possible values for the Origin const type.
type PrivateEndpoint ¶ added in v0.7.0
type PrivateEndpoint struct { // READ-ONLY; The ARM identifier for Private Endpoint ID *string `json:"id,omitempty" azure:"ro"` }
PrivateEndpoint - The Private Endpoint resource.
func (PrivateEndpoint) MarshalJSON ¶ added in v0.7.0
func (p PrivateEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.
func (*PrivateEndpoint) UnmarshalJSON ¶ added in v0.7.0
func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.
type PrivateEndpointConnection ¶ added in v0.7.0
type PrivateEndpointConnection struct { // Resource properties. Properties *PrivateEndpointConnectionProperties `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; Azure Resource Manager metadata containing createdBy and modifiedBy information. 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"` }
PrivateEndpointConnection - The Private Endpoint Connection resource.
func (PrivateEndpointConnection) MarshalJSON ¶ added in v0.7.0
func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.
func (*PrivateEndpointConnection) UnmarshalJSON ¶ added in v0.7.0
func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.
type PrivateEndpointConnectionListResult ¶ added in v0.7.0
type PrivateEndpointConnectionListResult struct { // Array of private endpoint connections Value []*PrivateEndpointConnection `json:"value,omitempty"` }
PrivateEndpointConnectionListResult - List of private endpoint connection associated with the specified storage account
func (PrivateEndpointConnectionListResult) MarshalJSON ¶ added in v0.7.0
func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.
func (*PrivateEndpointConnectionListResult) UnmarshalJSON ¶ added in v0.7.0
func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.
type PrivateEndpointConnectionProperties ¶ added in v0.7.0
type PrivateEndpointConnectionProperties struct { // REQUIRED; A collection of information about the state of the connection between service consumer and provider. PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` // The resource of private end point. PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` // READ-ONLY; The provisioning state of the private endpoint connection resource. ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty" azure:"ro"` }
PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties.
func (PrivateEndpointConnectionProperties) MarshalJSON ¶ added in v0.7.0
func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.
func (*PrivateEndpointConnectionProperties) UnmarshalJSON ¶ added in v0.7.0
func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.
type PrivateEndpointConnectionProvisioningState ¶ added in v0.7.0
type PrivateEndpointConnectionProvisioningState string
PrivateEndpointConnectionProvisioningState - The current provisioning state.
const ( PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" )
func PossiblePrivateEndpointConnectionProvisioningStateValues ¶ added in v0.7.0
func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState
PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.
type PrivateEndpointConnectionsClient ¶ added in v0.7.0
type PrivateEndpointConnectionsClient struct {
// contains filtered or unexported fields
}
PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.
func NewPrivateEndpointConnectionsClient ¶ added in v0.7.0
func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient 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 (*PrivateEndpointConnectionsClient) BeginDelete ¶ added in v0.7.0
func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
BeginDelete - Delete Private endpoint connection request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. farmBeatsResourceName - FarmBeats resource name. privateEndpointConnectionName - Private endpoint connection name. options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/PrivateEndpointConnections_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.NewPrivateEndpointConnectionsClient("11111111-2222-3333-4444-555555555555", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "examples-rg", "examples-farmbeatsResourceName", "privateEndpointConnectionName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*PrivateEndpointConnectionsClient) CreateOrUpdate ¶ added in v0.7.0
func (client *PrivateEndpointConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, privateEndpointConnectionName string, body PrivateEndpointConnection, options *PrivateEndpointConnectionsClientCreateOrUpdateOptions) (PrivateEndpointConnectionsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Approves or Rejects a Private endpoint connection request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. farmBeatsResourceName - FarmBeats resource name. privateEndpointConnectionName - Private endpoint connection name. body - Request object. options - PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/PrivateEndpointConnections_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.NewPrivateEndpointConnectionsClient("11111111-2222-3333-4444-555555555555", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.CreateOrUpdate(ctx, "examples-rg", "examples-farmbeatsResourceName", "privateEndpointConnectionName", armagrifood.PrivateEndpointConnection{ Properties: &armagrifood.PrivateEndpointConnectionProperties{ PrivateLinkServiceConnectionState: &armagrifood.PrivateLinkServiceConnectionState{ Description: to.Ptr("Approved by johndoe@contoso.com"), Status: to.Ptr(armagrifood.PrivateEndpointServiceConnectionStatusApproved), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PrivateEndpointConnectionsClient) Get ¶ added in v0.7.0
func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)
Get - Get Private endpoint connection object. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. farmBeatsResourceName - FarmBeats resource name. privateEndpointConnectionName - Private endpoint connection name. options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/PrivateEndpointConnections_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.NewPrivateEndpointConnectionsClient("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", "privateEndpointConnectionName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PrivateEndpointConnectionsClient) NewListByResourcePager ¶ added in v0.7.0
func (client *PrivateEndpointConnectionsClient) NewListByResourcePager(resourceGroupName string, farmBeatsResourceName string, options *PrivateEndpointConnectionsClientListByResourceOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByResourceResponse]
NewListByResourcePager - Get list of Private endpoint connections. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. farmBeatsResourceName - FarmBeats resource name. options - PrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.ListByResource method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/PrivateEndpointConnections_ListByResource.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.NewPrivateEndpointConnectionsClient("11111111-2222-3333-4444-555555555555", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourcePager("examples-rg", "examples-farmbeatsResourceName", 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 PrivateEndpointConnectionsClientBeginDeleteOptions ¶ added in v0.7.0
type PrivateEndpointConnectionsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
type PrivateEndpointConnectionsClientCreateOrUpdateOptions ¶ added in v0.7.0
type PrivateEndpointConnectionsClientCreateOrUpdateOptions struct { }
PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate method.
type PrivateEndpointConnectionsClientCreateOrUpdateResponse ¶ added in v0.7.0
type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct {
PrivateEndpointConnection
}
PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.CreateOrUpdate.
type PrivateEndpointConnectionsClientDeleteResponse ¶ added in v0.7.0
type PrivateEndpointConnectionsClientDeleteResponse struct { }
PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.Delete.
type PrivateEndpointConnectionsClientGetOptions ¶ added in v0.7.0
type PrivateEndpointConnectionsClientGetOptions struct { }
PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
type PrivateEndpointConnectionsClientGetResponse ¶ added in v0.7.0
type PrivateEndpointConnectionsClientGetResponse struct {
PrivateEndpointConnection
}
PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.
type PrivateEndpointConnectionsClientListByResourceOptions ¶ added in v0.7.0
type PrivateEndpointConnectionsClientListByResourceOptions struct { }
PrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.ListByResource method.
type PrivateEndpointConnectionsClientListByResourceResponse ¶ added in v0.7.0
type PrivateEndpointConnectionsClientListByResourceResponse struct {
PrivateEndpointConnectionListResult
}
PrivateEndpointConnectionsClientListByResourceResponse contains the response from method PrivateEndpointConnectionsClient.ListByResource.
type PrivateEndpointServiceConnectionStatus ¶ added in v0.7.0
type PrivateEndpointServiceConnectionStatus string
PrivateEndpointServiceConnectionStatus - The private endpoint connection status.
const ( PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" )
func PossiblePrivateEndpointServiceConnectionStatusValues ¶ added in v0.7.0
func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus
PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type.
type PrivateLinkResource ¶ added in v0.7.0
type PrivateLinkResource struct { // Resource properties. Properties *PrivateLinkResourceProperties `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; Azure Resource Manager metadata containing createdBy and modifiedBy information. 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"` }
PrivateLinkResource - A private link resource
func (PrivateLinkResource) MarshalJSON ¶ added in v0.7.0
func (p PrivateLinkResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.
func (*PrivateLinkResource) UnmarshalJSON ¶ added in v0.7.0
func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.
type PrivateLinkResourceListResult ¶ added in v0.7.0
type PrivateLinkResourceListResult struct { // Array of private link resources Value []*PrivateLinkResource `json:"value,omitempty"` }
PrivateLinkResourceListResult - A list of private link resources
func (PrivateLinkResourceListResult) MarshalJSON ¶ added in v0.7.0
func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.
func (*PrivateLinkResourceListResult) UnmarshalJSON ¶ added in v0.7.0
func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.
type PrivateLinkResourceProperties ¶ added in v0.7.0
type PrivateLinkResourceProperties struct { // The private link resource Private link DNS zone name. RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"` // READ-ONLY; The private link resource group id. GroupID *string `json:"groupId,omitempty" azure:"ro"` // READ-ONLY; The private link resource required member names. RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` }
PrivateLinkResourceProperties - Properties of a private link resource.
func (PrivateLinkResourceProperties) MarshalJSON ¶ added in v0.7.0
func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.
func (*PrivateLinkResourceProperties) UnmarshalJSON ¶ added in v0.7.0
func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.
type PrivateLinkResourcesClient ¶ added in v0.7.0
type PrivateLinkResourcesClient struct {
// contains filtered or unexported fields
}
PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.
func NewPrivateLinkResourcesClient ¶ added in v0.7.0
func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient 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 (*PrivateLinkResourcesClient) Get ¶ added in v0.7.0
func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, farmBeatsResourceName string, subResourceName string, options *PrivateLinkResourcesClientGetOptions) (PrivateLinkResourcesClientGetResponse, error)
Get - Get Private link resource object. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. farmBeatsResourceName - FarmBeats resource name. subResourceName - Sub resource name. options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/PrivateLinkResources_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.NewPrivateLinkResourcesClient("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", "farmbeats", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PrivateLinkResourcesClient) NewListByResourcePager ¶ added in v0.7.0
func (client *PrivateLinkResourcesClient) NewListByResourcePager(resourceGroupName string, farmBeatsResourceName string, options *PrivateLinkResourcesClientListByResourceOptions) *runtime.Pager[PrivateLinkResourcesClientListByResourceResponse]
NewListByResourcePager - Get list of Private link resources. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. farmBeatsResourceName - FarmBeats resource name. options - PrivateLinkResourcesClientListByResourceOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByResource method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/PrivateLinkResources_ListByResource.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.NewPrivateLinkResourcesClient("11111111-2222-3333-4444-555555555555", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourcePager("examples-rg", "examples-farmbeatsResourceName", 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 PrivateLinkResourcesClientGetOptions ¶ added in v0.7.0
type PrivateLinkResourcesClientGetOptions struct { }
PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
type PrivateLinkResourcesClientGetResponse ¶ added in v0.7.0
type PrivateLinkResourcesClientGetResponse struct {
PrivateLinkResource
}
PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.
type PrivateLinkResourcesClientListByResourceOptions ¶ added in v0.7.0
type PrivateLinkResourcesClientListByResourceOptions struct { }
PrivateLinkResourcesClientListByResourceOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByResource method.
type PrivateLinkResourcesClientListByResourceResponse ¶ added in v0.7.0
type PrivateLinkResourcesClientListByResourceResponse struct {
PrivateLinkResourceListResult
}
PrivateLinkResourcesClientListByResourceResponse contains the response from method PrivateLinkResourcesClient.ListByResource.
type PrivateLinkServiceConnectionState ¶ added in v0.7.0
type PrivateLinkServiceConnectionState struct { // A message indicating if changes on the service provider require any updates on the consumer. ActionsRequired *string `json:"actionsRequired,omitempty"` // The reason for approval/rejection of the connection. Description *string `json:"description,omitempty"` // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` }
PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
func (PrivateLinkServiceConnectionState) MarshalJSON ¶ added in v0.7.0
func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.
func (*PrivateLinkServiceConnectionState) UnmarshalJSON ¶ added in v0.7.0
func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - Sensor integration instance provisioning state.
const ( ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" ProvisioningStateUpdating ProvisioningState = "Updating" )
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; Azure Resource Manager metadata containing createdBy and modifiedBy information. 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"` }
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
func (ProxyResource) MarshalJSON ¶ added in v0.7.0
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶ added in v0.7.0
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
type PublicNetworkAccess ¶ added in v0.7.0
type PublicNetworkAccess string
PublicNetworkAccess - Property to allow or block public traffic for an Azure FarmBeats resource.
const ( PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" PublicNetworkAccessHybrid PublicNetworkAccess = "Hybrid" )
func PossiblePublicNetworkAccessValues ¶ added in v0.7.0
func PossiblePublicNetworkAccessValues() []PublicNetworkAccess
PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.
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; Azure Resource Manager metadata containing createdBy and modifiedBy information. 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"` }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶ added in v0.7.0
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type SensorIntegration ¶ added in v0.7.0
type SensorIntegration struct { // Sensor integration enable state. Allowed values are True, None Enabled *string `json:"enabled,omitempty"` // Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows // the OData error response format.). ProvisioningInfo *ErrorResponse `json:"provisioningInfo,omitempty"` // READ-ONLY; Sensor integration instance provisioning state. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` }
SensorIntegration - Sensor integration request model.
func (SensorIntegration) MarshalJSON ¶ added in v0.7.0
func (s SensorIntegration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SensorIntegration.
func (*SensorIntegration) UnmarshalJSON ¶ added in v0.7.0
func (s *SensorIntegration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SensorIntegration.
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; Azure Resource Manager metadata containing createdBy and modifiedBy information. 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"` }
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.
func (*TrackedResource) UnmarshalJSON ¶ added in v0.7.0
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller 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.
func (*UnitSystemsInfo) UnmarshalJSON ¶ added in v0.7.0
func (u *UnitSystemsInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UnitSystemsInfo.