Documentation
¶
Index ¶
- type ActionType
- type ArmAsyncOperation
- type CheckNameAvailabilityReason
- type CheckNameAvailabilityRequest
- type CheckNameAvailabilityResponse
- type ClientFactory
- func (c *ClientFactory) NewExtensionsClient() *ExtensionsClient
- func (c *ClientFactory) NewFarmBeatsExtensionsClient() *FarmBeatsExtensionsClient
- func (c *ClientFactory) NewFarmBeatsModelsClient() *FarmBeatsModelsClient
- func (c *ClientFactory) NewLocationsClient() *LocationsClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
- func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
- 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 }
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 // The resource type. Type *string }
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 // Indicates if the resource name is available. NameAvailable *bool // The reason why the given name is not available. Reason *CheckNameAvailabilityReason }
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 ClientFactory ¶ added in v0.8.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v0.8.0
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- 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 (*ClientFactory) NewExtensionsClient ¶ added in v0.8.0
func (c *ClientFactory) NewExtensionsClient() *ExtensionsClient
NewExtensionsClient creates a new instance of ExtensionsClient.
func (*ClientFactory) NewFarmBeatsExtensionsClient ¶ added in v0.8.0
func (c *ClientFactory) NewFarmBeatsExtensionsClient() *FarmBeatsExtensionsClient
NewFarmBeatsExtensionsClient creates a new instance of FarmBeatsExtensionsClient.
func (*ClientFactory) NewFarmBeatsModelsClient ¶ added in v0.8.0
func (c *ClientFactory) NewFarmBeatsModelsClient() *FarmBeatsModelsClient
NewFarmBeatsModelsClient creates a new instance of FarmBeatsModelsClient.
func (*ClientFactory) NewLocationsClient ¶ added in v0.8.0
func (c *ClientFactory) NewLocationsClient() *LocationsClient
NewLocationsClient creates a new instance of LocationsClient.
func (*ClientFactory) NewOperationsClient ¶ added in v0.8.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewPrivateEndpointConnectionsClient ¶ added in v0.8.0
func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.
func (*ClientFactory) NewPrivateLinkResourcesClient ¶ added in v0.8.0
func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.
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 // ApiName available for the farmBeatsExtension. APIName *string // List of customParameters. CustomParameters []*string // List of platformParameters. PlatformParameters []*string // Unit systems info for the data provider. UnitsSupported *UnitSystemsInfo }
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 any // READ-ONLY; The additional info type. Type *string }
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 // READ-ONLY; The error code. Code *string // READ-ONLY; The error details. Details []*ErrorDetail // READ-ONLY; The error message. Message *string // READ-ONLY; The error target. Target *string }
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 }
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 // READ-ONLY; The ETag value to implement optimistic concurrency. ETag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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 // READ-ONLY; Continuation link (absolute URI) to the next page of results in the list. NextLink *string }
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 // READ-ONLY; Extension auth link. ExtensionAuthLink *string // READ-ONLY; Extension category. e.g. weather/sensor/satellite. ExtensionCategory *string // READ-ONLY; Extension Id. ExtensionID *string // READ-ONLY; Installed extension version. InstalledExtensionVersion *string }
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/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewExtensionsClient().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/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewExtensionsClient().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/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewExtensionsClient().Get(ctx, "examples-rg", "examples-farmbeatsResourceName", "provider.extension", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Extension = armagrifood.Extension{ // Name: to.Ptr("provider.extension"), // Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeats/extensions"), // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/extensions/provider.extension"), // SystemData: &armagrifood.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armagrifood.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armagrifood.CreatedByTypeUser), // }, // ETag: to.Ptr("7200b954-0000-0700-0000-603cbbc40000"), // Properties: &armagrifood.ExtensionProperties{ // ExtensionAPIDocsLink: to.Ptr("https://docs.provider.com/documentation/extension"), // ExtensionAuthLink: to.Ptr("https://www.provider.com/extension/"), // ExtensionCategory: to.Ptr("Weather"), // InstalledExtensionVersion: to.Ptr("1.0"), // }, // } }
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.
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.NewListByFarmBeatsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewExtensionsClient().NewListByFarmBeatsPager("examples-rg", "examples-farmbeatsResourceName", &armagrifood.ExtensionsClientListByFarmBeatsOptions{ExtensionIDs: []string{}, ExtensionCategories: []string{}, MaxPageSize: nil, SkipToken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ExtensionListResponse = armagrifood.ExtensionListResponse{ // Value: []*armagrifood.Extension{ // { // Name: to.Ptr("provider.extension"), // Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeats/extensions"), // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/extensions/provider.extension"), // SystemData: &armagrifood.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armagrifood.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armagrifood.CreatedByTypeUser), // }, // ETag: to.Ptr("7200b954-0000-0700-0000-603cbbc40000"), // Properties: &armagrifood.ExtensionProperties{ // ExtensionAPIDocsLink: to.Ptr("https://docs.provider.com/documentation/extension"), // ExtensionAuthLink: to.Ptr("https://www.provider.com/extension/"), // ExtensionCategory: to.Ptr("Weather"), // InstalledExtensionVersion: to.Ptr("1.0"), // }, // }}, // } } }
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/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewExtensionsClient().Update(ctx, "examples-rg", "examples-farmbeatsResourceName", "provider.extension", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Extension = armagrifood.Extension{ // Name: to.Ptr("provider.extension"), // Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeats/extensions"), // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/extensions/provider.extension"), // SystemData: &armagrifood.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armagrifood.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armagrifood.CreatedByTypeUser), // }, // ETag: to.Ptr("7200b954-0000-0700-0000-603cbbc40000"), // Properties: &armagrifood.ExtensionProperties{ // ExtensionAPIDocsLink: to.Ptr("https://docs.provider.com/documentation/extension"), // ExtensionAuthLink: to.Ptr("https://www.provider.com/extension/"), // ExtensionCategory: to.Ptr("Weather"), // InstalledExtensionVersion: to.Ptr("2.0"), // }, // } }
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 resource. 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 resource. 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.NewListByFarmBeatsPager method.
type ExtensionsClientListByFarmBeatsResponse ¶ added in v0.3.0
type ExtensionsClientListByFarmBeatsResponse struct { // Paged response contains list of requested objects and a URL link to get the next set of results. ExtensionListResponse }
ExtensionsClientListByFarmBeatsResponse contains the response from method ExtensionsClient.NewListByFarmBeatsPager.
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 resource. Extension }
ExtensionsClientUpdateResponse contains the response from method ExtensionsClient.Update.
type FarmBeats ¶
type FarmBeats struct { // REQUIRED; The geo-location where the resource lives Location *string // Identity for the resource. Identity *Identity // FarmBeats ARM Resource properties. Properties *FarmBeatsProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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 // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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 // READ-ONLY; Continuation link (absolute URI) to the next page of results in the list. NextLink *string }
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 // 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 // READ-ONLY; FarmBeatsExtension api docs link. ExtensionAPIDocsLink *string // READ-ONLY; FarmBeatsExtension auth link. ExtensionAuthLink *string // READ-ONLY; Category of the extension. e.g. weather/sensor/satellite. ExtensionCategory *string // READ-ONLY; FarmBeatsExtension ID. FarmBeatsExtensionID *string // READ-ONLY; FarmBeatsExtension name. FarmBeatsExtensionName *string // READ-ONLY; FarmBeatsExtension version. FarmBeatsExtensionVersion *string // READ-ONLY; Publisher ID. PublisherID *string // READ-ONLY; Target ResourceType of the farmBeatsExtension. TargetResourceType *string }
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/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFarmBeatsExtensionsClient().Get(ctx, "DTN.ContentServices", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FarmBeatsExtension = armagrifood.FarmBeatsExtension{ // Name: to.Ptr("DTN.ContentServices"), // Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions"), // ID: to.Ptr("Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions/DTN.ContentServices"), // SystemData: &armagrifood.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-12T15:28:06.000Z"); return t}()), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-12T15:30:01.000Z"); return t}()), // }, // Properties: &armagrifood.FarmBeatsExtensionProperties{ // DetailedInformation: []*armagrifood.DetailedInformation{ // { // APIInputParameters: []*string{ // to.Ptr("stationId"), // to.Ptr("lat"), // to.Ptr("lon"), // to.Ptr("days"), // to.Ptr("units"), // to.Ptr("precision"), // to.Ptr("sector")}, // APIName: to.Ptr("GetDailyObservations"), // CustomParameters: []*string{ // to.Ptr("stationId"), // to.Ptr("stationLatitude"), // to.Ptr("stationLongitude"), // to.Ptr("timeZone"), // to.Ptr("sunrise"), // to.Ptr("sunset"), // to.Ptr("weatherCode"), // to.Ptr("weatherDescription"), // to.Ptr("maxTemperature"), // to.Ptr("minTemperature"), // to.Ptr("avgHeatIndex"), // to.Ptr("maxHeatIndex"), // to.Ptr("minHeatIndex"), // to.Ptr("maxWindChill"), // to.Ptr("minWindChill"), // to.Ptr("maxFeelsLike"), // to.Ptr("minFeelsLike"), // to.Ptr("avgFeelsLike"), // to.Ptr("maxWindSpeed"), // to.Ptr("avgWetBulbGlobeTemp"), // to.Ptr("maxWetBulbGlobeTemp"), // to.Ptr("minWetBulbGlobeTemp"), // to.Ptr("minutesOfSunshine"), // to.Ptr("cornHeatUnit"), // to.Ptr("evapotranspiration")}, // PlatformParameters: []*string{ // to.Ptr("cloudCover"), // to.Ptr("dewPoint"), // to.Ptr("growingDegreeDay"), // to.Ptr("precipitation"), // to.Ptr("pressure"), // to.Ptr("relativeHumidity"), // to.Ptr("temperature"), // to.Ptr("wetBulbTemperature"), // to.Ptr("dateTime"), // to.Ptr("windChill"), // to.Ptr("windSpeed"), // to.Ptr("windDirection")}, // UnitsSupported: &armagrifood.UnitSystemsInfo{ // Key: to.Ptr("units"), // Values: []*string{ // to.Ptr("us"), // to.Ptr("si")}, // }, // }, // { // APIInputParameters: []*string{ // to.Ptr("stationId"), // to.Ptr("lat"), // to.Ptr("lon"), // to.Ptr("hours"), // to.Ptr("units"), // to.Ptr("precision"), // to.Ptr("sector")}, // APIName: to.Ptr("GetHourlyObservations"), // CustomParameters: []*string{ // to.Ptr("stationId"), // to.Ptr("stationLatitude"), // to.Ptr("stationLongitude"), // to.Ptr("timeZone"), // to.Ptr("weatherCode"), // to.Ptr("weatherDescription"), // to.Ptr("feelsLike"), // to.Ptr("visibilityWeatherCode"), // to.Ptr("visibilityWeatherDescription"), // to.Ptr("minutesOfSunshine")}, // PlatformParameters: []*string{ // to.Ptr("cloudCover"), // to.Ptr("dewPoint"), // to.Ptr("precipitation"), // to.Ptr("pressure"), // to.Ptr("relativeHumidity"), // to.Ptr("temperature"), // to.Ptr("wetBulbTemperature"), // to.Ptr("dateTime"), // to.Ptr("visibility"), // to.Ptr("windChill"), // to.Ptr("windSpeed"), // to.Ptr("windDirection"), // to.Ptr("windGust")}, // UnitsSupported: &armagrifood.UnitSystemsInfo{ // Key: to.Ptr("units"), // Values: []*string{ // to.Ptr("us"), // to.Ptr("si")}, // }, // }, // { // APIInputParameters: []*string{ // to.Ptr("stationId"), // to.Ptr("lat"), // to.Ptr("lon"), // to.Ptr("days"), // to.Ptr("units"), // to.Ptr("precision"), // to.Ptr("sector")}, // APIName: to.Ptr("GetHourlyForecasts"), // CustomParameters: []*string{ // to.Ptr("stationId"), // to.Ptr("stationLatitude"), // to.Ptr("stationLongitude"), // to.Ptr("timeZone"), // to.Ptr("weatherCode"), // to.Ptr("weatherDescription"), // to.Ptr("feelsLike"), // to.Ptr("visibilityWeatherCode"), // to.Ptr("visibilityWeatherDescription"), // to.Ptr("minutesOfSunshine")}, // PlatformParameters: []*string{ // to.Ptr("cloudCover"), // to.Ptr("dewPoint"), // to.Ptr("precipitation"), // to.Ptr("pressure"), // to.Ptr("relativeHumidity"), // to.Ptr("temperature"), // to.Ptr("wetBulbTemperature"), // to.Ptr("dateTime"), // to.Ptr("visibility"), // to.Ptr("windChill"), // to.Ptr("windSpeed"), // to.Ptr("windDirection"), // to.Ptr("windGust")}, // UnitsSupported: &armagrifood.UnitSystemsInfo{ // Key: to.Ptr("units"), // Values: []*string{ // to.Ptr("us"), // to.Ptr("si")}, // }, // }, // { // APIInputParameters: []*string{ // to.Ptr("stationId"), // to.Ptr("lat"), // to.Ptr("lon"), // to.Ptr("days"), // to.Ptr("units"), // to.Ptr("precision"), // to.Ptr("sector")}, // APIName: to.Ptr("GetDailyForecasts"), // CustomParameters: []*string{ // to.Ptr("stationId"), // to.Ptr("stationLatitude"), // to.Ptr("stationLongitude"), // to.Ptr("timeZone"), // to.Ptr("sunrise"), // to.Ptr("sunset"), // to.Ptr("weatherCode"), // to.Ptr("weatherDescription"), // to.Ptr("maxTemperature"), // to.Ptr("minTemperature"), // to.Ptr("avgHeatIndex"), // to.Ptr("maxHeatIndex"), // to.Ptr("minHeatIndex"), // to.Ptr("maxWindChill"), // to.Ptr("minWindChill"), // to.Ptr("maxFeelsLike"), // to.Ptr("minFeelsLike"), // to.Ptr("avgFeelsLike"), // to.Ptr("maxWindSpeed"), // to.Ptr("avgWetBulbGlobeTemp"), // to.Ptr("maxWetBulbGlobeTemp"), // to.Ptr("minWetBulbGlobeTemp"), // to.Ptr("minutesOfSunshine"), // to.Ptr("cornHeatUnit"), // to.Ptr("evapotranspiration")}, // PlatformParameters: []*string{ // to.Ptr("cloudCover"), // to.Ptr("dewPoint"), // to.Ptr("growingDegreeDay"), // to.Ptr("precipitation"), // to.Ptr("pressure"), // to.Ptr("relativeHumidity"), // to.Ptr("temperature"), // to.Ptr("wetBulbTemperature"), // to.Ptr("dateTime"), // to.Ptr("windChill"), // to.Ptr("windSpeed"), // to.Ptr("windDirection")}, // UnitsSupported: &armagrifood.UnitSystemsInfo{ // Key: to.Ptr("units"), // Values: []*string{ // to.Ptr("us"), // to.Ptr("si")}, // }, // }}, // ExtensionAPIDocsLink: to.Ptr("https://cs-docs.dtn.com/api/weather-observations-and-forecasts-rest-api/"), // ExtensionAuthLink: to.Ptr("https://www.dtn.com/dtn-content-integration/"), // ExtensionCategory: to.Ptr("Weather"), // FarmBeatsExtensionID: to.Ptr("DTN.ContentServices"), // FarmBeatsExtensionName: to.Ptr("DTN"), // FarmBeatsExtensionVersion: to.Ptr("1.0"), // PublisherID: to.Ptr("dtn"), // TargetResourceType: to.Ptr("FarmBeats"), // }, // } }
Output:
func (*FarmBeatsExtensionsClient) NewListPager ¶ added in v0.5.0
func (client *FarmBeatsExtensionsClient) NewListPager(options *FarmBeatsExtensionsClientListOptions) *runtime.Pager[FarmBeatsExtensionsClientListResponse]
NewListPager - Get list of farmBeats extension.
Generated from API version 2021-09-01-preview
- options - FarmBeatsExtensionsClientListOptions contains the optional parameters for the FarmBeatsExtensionsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewFarmBeatsExtensionsClient().NewListPager(&armagrifood.FarmBeatsExtensionsClientListOptions{FarmBeatsExtensionIDs: []string{}, FarmBeatsExtensionNames: []string{}, ExtensionCategories: []string{}, PublisherIDs: []string{}, MaxPageSize: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.FarmBeatsExtensionListResponse = armagrifood.FarmBeatsExtensionListResponse{ // Value: []*armagrifood.FarmBeatsExtension{ // { // Name: to.Ptr("DTN.ContentServices"), // Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions"), // ID: to.Ptr("Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions/DTN.ContentServices"), // SystemData: &armagrifood.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-12T15:28:06.000Z"); return t}()), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-12T15:30:01.000Z"); return t}()), // }, // Properties: &armagrifood.FarmBeatsExtensionProperties{ // DetailedInformation: []*armagrifood.DetailedInformation{ // { // APIInputParameters: []*string{ // to.Ptr("stationId"), // to.Ptr("lat"), // to.Ptr("lon"), // to.Ptr("days"), // to.Ptr("units"), // to.Ptr("precision"), // to.Ptr("sector")}, // APIName: to.Ptr("GetDailyObservations"), // CustomParameters: []*string{ // to.Ptr("stationId"), // to.Ptr("stationLatitude"), // to.Ptr("stationLongitude"), // to.Ptr("timeZone"), // to.Ptr("sunrise"), // to.Ptr("sunset"), // to.Ptr("weatherCode"), // to.Ptr("weatherDescription"), // to.Ptr("maxTemperature"), // to.Ptr("minTemperature"), // to.Ptr("avgHeatIndex"), // to.Ptr("maxHeatIndex"), // to.Ptr("minHeatIndex"), // to.Ptr("maxWindChill"), // to.Ptr("minWindChill"), // to.Ptr("maxFeelsLike"), // to.Ptr("minFeelsLike"), // to.Ptr("avgFeelsLike"), // to.Ptr("maxWindSpeed"), // to.Ptr("avgWetBulbGlobeTemp"), // to.Ptr("maxWetBulbGlobeTemp"), // to.Ptr("minWetBulbGlobeTemp"), // to.Ptr("minutesOfSunshine"), // to.Ptr("cornHeatUnit"), // to.Ptr("evapotranspiration")}, // PlatformParameters: []*string{ // to.Ptr("cloudCover"), // to.Ptr("dewPoint"), // to.Ptr("growingDegreeDay"), // to.Ptr("precipitation"), // to.Ptr("pressure"), // to.Ptr("relativeHumidity"), // to.Ptr("temperature"), // to.Ptr("wetBulbTemperature"), // to.Ptr("dateTime"), // to.Ptr("windChill"), // to.Ptr("windSpeed"), // to.Ptr("windDirection")}, // UnitsSupported: &armagrifood.UnitSystemsInfo{ // Key: to.Ptr("units"), // Values: []*string{ // to.Ptr("us"), // to.Ptr("si")}, // }, // }, // { // APIInputParameters: []*string{ // to.Ptr("stationId"), // to.Ptr("lat"), // to.Ptr("lon"), // to.Ptr("hours"), // to.Ptr("units"), // to.Ptr("precision"), // to.Ptr("sector")}, // APIName: to.Ptr("GetHourlyObservations"), // CustomParameters: []*string{ // to.Ptr("stationId"), // to.Ptr("stationLatitude"), // to.Ptr("stationLongitude"), // to.Ptr("timeZone"), // to.Ptr("weatherCode"), // to.Ptr("weatherDescription"), // to.Ptr("feelsLike"), // to.Ptr("visibilityWeatherCode"), // to.Ptr("visibilityWeatherDescription"), // to.Ptr("minutesOfSunshine")}, // PlatformParameters: []*string{ // to.Ptr("cloudCover"), // to.Ptr("dewPoint"), // to.Ptr("precipitation"), // to.Ptr("pressure"), // to.Ptr("relativeHumidity"), // to.Ptr("temperature"), // to.Ptr("wetBulbTemperature"), // to.Ptr("dateTime"), // to.Ptr("visibility"), // to.Ptr("windChill"), // to.Ptr("windSpeed"), // to.Ptr("windDirection"), // to.Ptr("windGust")}, // UnitsSupported: &armagrifood.UnitSystemsInfo{ // Key: to.Ptr("units"), // Values: []*string{ // to.Ptr("us"), // to.Ptr("si")}, // }, // }, // { // APIInputParameters: []*string{ // to.Ptr("stationId"), // to.Ptr("lat"), // to.Ptr("lon"), // to.Ptr("days"), // to.Ptr("units"), // to.Ptr("precision"), // to.Ptr("sector")}, // APIName: to.Ptr("GetHourlyForecasts"), // CustomParameters: []*string{ // to.Ptr("stationId"), // to.Ptr("stationLatitude"), // to.Ptr("stationLongitude"), // to.Ptr("timeZone"), // to.Ptr("weatherCode"), // to.Ptr("weatherDescription"), // to.Ptr("feelsLike"), // to.Ptr("visibilityWeatherCode"), // to.Ptr("visibilityWeatherDescription"), // to.Ptr("minutesOfSunshine")}, // PlatformParameters: []*string{ // to.Ptr("cloudCover"), // to.Ptr("dewPoint"), // to.Ptr("precipitation"), // to.Ptr("pressure"), // to.Ptr("relativeHumidity"), // to.Ptr("temperature"), // to.Ptr("wetBulbTemperature"), // to.Ptr("dateTime"), // to.Ptr("visibility"), // to.Ptr("windChill"), // to.Ptr("windSpeed"), // to.Ptr("windDirection"), // to.Ptr("windGust")}, // UnitsSupported: &armagrifood.UnitSystemsInfo{ // Key: to.Ptr("units"), // Values: []*string{ // to.Ptr("us"), // to.Ptr("si")}, // }, // }, // { // APIInputParameters: []*string{ // to.Ptr("stationId"), // to.Ptr("lat"), // to.Ptr("lon"), // to.Ptr("days"), // to.Ptr("units"), // to.Ptr("precision"), // to.Ptr("sector")}, // APIName: to.Ptr("GetDailyForecasts"), // CustomParameters: []*string{ // to.Ptr("stationId"), // to.Ptr("stationLatitude"), // to.Ptr("stationLongitude"), // to.Ptr("timeZone"), // to.Ptr("sunrise"), // to.Ptr("sunset"), // to.Ptr("weatherCode"), // to.Ptr("weatherDescription"), // to.Ptr("maxTemperature"), // to.Ptr("minTemperature"), // to.Ptr("avgHeatIndex"), // to.Ptr("maxHeatIndex"), // to.Ptr("minHeatIndex"), // to.Ptr("maxWindChill"), // to.Ptr("minWindChill"), // to.Ptr("maxFeelsLike"), // to.Ptr("minFeelsLike"), // to.Ptr("avgFeelsLike"), // to.Ptr("maxWindSpeed"), // to.Ptr("avgWetBulbGlobeTemp"), // to.Ptr("maxWetBulbGlobeTemp"), // to.Ptr("minWetBulbGlobeTemp"), // to.Ptr("minutesOfSunshine"), // to.Ptr("cornHeatUnit"), // to.Ptr("evapotranspiration")}, // PlatformParameters: []*string{ // to.Ptr("cloudCover"), // to.Ptr("dewPoint"), // to.Ptr("growingDegreeDay"), // to.Ptr("precipitation"), // to.Ptr("pressure"), // to.Ptr("relativeHumidity"), // to.Ptr("temperature"), // to.Ptr("wetBulbTemperature"), // to.Ptr("dateTime"), // to.Ptr("windChill"), // to.Ptr("windSpeed"), // to.Ptr("windDirection")}, // UnitsSupported: &armagrifood.UnitSystemsInfo{ // Key: to.Ptr("units"), // Values: []*string{ // to.Ptr("us"), // to.Ptr("si")}, // }, // }}, // ExtensionAPIDocsLink: to.Ptr("https://cs-docs.dtn.com/api/weather-observations-and-forecasts-rest-api/"), // ExtensionAuthLink: to.Ptr("https://www.dtn.com/dtn-content-integration/"), // ExtensionCategory: to.Ptr("Weather"), // FarmBeatsExtensionID: to.Ptr("DTN.ContentServices"), // FarmBeatsExtensionName: to.Ptr("DTN"), // FarmBeatsExtensionVersion: to.Ptr("1.0"), // PublisherID: to.Ptr("dtn"), // TargetResourceType: to.Ptr("FarmBeats"), // }, // }}, // } } }
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 { // FarmBeats extension resource. 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.NewListPager method.
type FarmBeatsExtensionsClientListResponse ¶ added in v0.3.0
type FarmBeatsExtensionsClientListResponse struct { // Paged response contains list of requested objects and a URL link to get the next set of results. FarmBeatsExtensionListResponse }
FarmBeatsExtensionsClientListResponse contains the response from method FarmBeatsExtensionsClient.NewListPager.
type FarmBeatsListResponse ¶
type FarmBeatsListResponse struct { // List of requested objects. Value []*FarmBeats // READ-ONLY; Continuation link (absolute URI) to the next page of results in the list. NextLink *string }
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/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFarmBeatsModelsClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FarmBeats = armagrifood.FarmBeats{ // Name: to.Ptr("examples-farmBeatsResourceName"), // Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeats"), // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName"), // SystemData: &armagrifood.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armagrifood.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armagrifood.CreatedByTypeUser), // }, // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armagrifood.FarmBeatsProperties{ // InstanceURI: to.Ptr("https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net"), // ProvisioningState: to.Ptr(armagrifood.ProvisioningStateSucceeded), // }, // } }
Output:
Example (FarmBeatsModelsUpdateWithSensor) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFarmBeatsModelsClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FarmBeats = armagrifood.FarmBeats{ // Name: to.Ptr("examples-farmBeatsResourceName"), // Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeats"), // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName"), // SystemData: &armagrifood.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armagrifood.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armagrifood.CreatedByTypeUser), // }, // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Identity: &armagrifood.Identity{ // Type: to.Ptr("SystemAssigned"), // TenantID: to.Ptr("abcdefgh-86f1-41af-91ab-2d7cd011db47"), // }, // Properties: &armagrifood.FarmBeatsProperties{ // InstanceURI: to.Ptr("https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net"), // ProvisioningState: to.Ptr(armagrifood.ProvisioningStateSucceeded), // SensorIntegration: &armagrifood.SensorIntegration{ // Enabled: to.Ptr("True"), // ProvisioningState: to.Ptr(armagrifood.ProvisioningStateSucceeded), // }, // }, // } }
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/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFarmBeatsModelsClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FarmBeats = armagrifood.FarmBeats{ // Name: to.Ptr("examples-farmbeatsResourceName"), // Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeats"), // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName"), // SystemData: &armagrifood.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armagrifood.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armagrifood.CreatedByTypeUser), // }, // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armagrifood.FarmBeatsProperties{ // InstanceURI: to.Ptr("https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net"), // ProvisioningState: to.Ptr(armagrifood.ProvisioningStateSucceeded), // }, // } }
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/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewFarmBeatsModelsClient().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/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFarmBeatsModelsClient().Get(ctx, "examples-rg", "examples-farmBeatsResourceName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FarmBeats = armagrifood.FarmBeats{ // Name: to.Ptr("examples-farmBeatsResourceName"), // Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeats"), // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName"), // SystemData: &armagrifood.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armagrifood.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armagrifood.CreatedByTypeUser), // }, // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armagrifood.FarmBeatsProperties{ // InstanceURI: to.Ptr("https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net"), // ProvisioningState: to.Ptr(armagrifood.ProvisioningStateSucceeded), // }, // } }
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/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFarmBeatsModelsClient().GetOperationResult(ctx, "examples-rg", "examples-farmBeatsResourceName", "resource-provisioning-id-farmBeatsResourceName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ArmAsyncOperation = armagrifood.ArmAsyncOperation{ // Status: to.Ptr("Succeeded"), // } }
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.
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.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewFarmBeatsModelsClient().NewListByResourceGroupPager("examples-rg", &armagrifood.FarmBeatsModelsClientListByResourceGroupOptions{MaxPageSize: nil, SkipToken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.FarmBeatsListResponse = armagrifood.FarmBeatsListResponse{ // Value: []*armagrifood.FarmBeats{ // { // Name: to.Ptr("examples-farmBeatsResourceName"), // Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeats"), // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName"), // SystemData: &armagrifood.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armagrifood.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armagrifood.CreatedByTypeUser), // }, // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armagrifood.FarmBeatsProperties{ // InstanceURI: to.Ptr("https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net"), // ProvisioningState: to.Ptr(armagrifood.ProvisioningStateSucceeded), // }, // }}, // } } }
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.
Generated from API version 2021-09-01-preview
- options - FarmBeatsModelsClientListBySubscriptionOptions contains the optional parameters for the FarmBeatsModelsClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewFarmBeatsModelsClient().NewListBySubscriptionPager(&armagrifood.FarmBeatsModelsClientListBySubscriptionOptions{MaxPageSize: nil, SkipToken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.FarmBeatsListResponse = armagrifood.FarmBeatsListResponse{ // Value: []*armagrifood.FarmBeats{ // { // Name: to.Ptr("examples-farmBeatsResourceName"), // Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeats"), // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName"), // SystemData: &armagrifood.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armagrifood.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armagrifood.CreatedByTypeUser), // }, // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armagrifood.FarmBeatsProperties{ // InstanceURI: to.Ptr("https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net"), // ProvisioningState: to.Ptr(armagrifood.ProvisioningStateSucceeded), // }, // }}, // } } }
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 ARM Resource. 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 { // Arm async operation class. // Ref: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/async-operations. 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 ARM Resource. 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.NewListByResourceGroupPager method.
type FarmBeatsModelsClientListByResourceGroupResponse ¶ added in v0.3.0
type FarmBeatsModelsClientListByResourceGroupResponse struct { // Paged response contains list of requested objects and a URL link to get the next set of results. FarmBeatsListResponse }
FarmBeatsModelsClientListByResourceGroupResponse contains the response from method FarmBeatsModelsClient.NewListByResourceGroupPager.
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.NewListBySubscriptionPager method.
type FarmBeatsModelsClientListBySubscriptionResponse ¶ added in v0.3.0
type FarmBeatsModelsClientListBySubscriptionResponse struct { // Paged response contains list of requested objects and a URL link to get the next set of results. FarmBeatsListResponse }
FarmBeatsModelsClientListBySubscriptionResponse contains the response from method FarmBeatsModelsClient.NewListBySubscriptionPager.
type FarmBeatsModelsClientUpdateResponse ¶ added in v0.3.0
type FarmBeatsModelsClientUpdateResponse struct { // FarmBeats ARM Resource. FarmBeats }
FarmBeatsModelsClientUpdateResponse contains the response from method FarmBeatsModelsClient.BeginUpdate.
type FarmBeatsProperties ¶
type FarmBeatsProperties struct { // Property to allow or block public traffic for an Azure FarmBeats resource. PublicNetworkAccess *PublicNetworkAccess // Sensor integration request model. SensorIntegration *SensorIntegration // READ-ONLY; Uri of the FarmBeats instance. InstanceURI *string // READ-ONLY; The Private Endpoint Connection resource. PrivateEndpointConnections *PrivateEndpointConnection // READ-ONLY; FarmBeats instance provisioning state. ProvisioningState *ProvisioningState }
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 // Sensor integration request model. SensorIntegration *SensorIntegration }
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 // Geo-location where the resource lives. Location *string // FarmBeats ARM Resource properties. Properties *FarmBeatsUpdateProperties // Resource tags. Tags map[string]*string }
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 // READ-ONLY; The principal ID of resource identity. PrincipalID *string // READ-ONLY; The tenant ID of resource. TenantID *string }
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/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLocationsClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.CheckNameAvailabilityResponse = armagrifood.CheckNameAvailabilityResponse{ // Message: to.Ptr("An account named 'existingaccountname' is already in use."), // NameAvailable: to.Ptr(false), // Reason: to.Ptr(armagrifood.CheckNameAvailabilityReasonAlreadyExists), // } }
Output:
Example (LocationsCheckNameAvailabilityAvailable) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLocationsClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.CheckNameAvailabilityResponse = armagrifood.CheckNameAvailabilityResponse{ // NameAvailable: to.Ptr(true), // } }
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 { // The check availability result. CheckNameAvailabilityResponse }
LocationsClientCheckNameAvailabilityResponse contains the response from method LocationsClient.CheckNameAvailability.
type Operation ¶
type Operation struct { // Localized display information for this particular operation. Display *OperationDisplay // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType // 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 // 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 // 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 }
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 // 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 // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft // Compute". Provider *string // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job // Schedule Collections". Resource *string }
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 // READ-ONLY; List of operations supported by the resource provider Value []*Operation }
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.
Generated from API version 2021-09-01-preview
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.OperationListResult = armagrifood.OperationListResult{ // Value: []*armagrifood.Operation{ // { // Name: to.Ptr("Microsoft.AgFoodPlatform/farmBeats/read"), // Display: &armagrifood.OperationDisplay{ // Description: to.Ptr("Gets or Lists existing AgFoodPlatform FarmBeats resource(s)."), // Operation: to.Ptr("Get or List AgFoodPlatform FarmBeats resource(s)."), // Provider: to.Ptr("Microsoft AgFoodPlatform"), // Resource: to.Ptr("AgFoodPlatform FarmBeats"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AgFoodPlatform/farmBeats/write"), // Display: &armagrifood.OperationDisplay{ // Description: to.Ptr("Creates or Updates AgFoodPlatform FarmBeats."), // Operation: to.Ptr("Create or Update AgFoodPlatform FarmBeats."), // Provider: to.Ptr("Microsoft AgFoodPlatform"), // Resource: to.Ptr("AgFoodPlatform FarmBeats"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AgFoodPlatform/farmBeats/delete"), // Display: &armagrifood.OperationDisplay{ // Description: to.Ptr("Deletes an existing AgFoodPlatform FarmBeats resource."), // Operation: to.Ptr("Delete AgFoodPlatform FarmBeats resource."), // Provider: to.Ptr("Microsoft AgFoodPlatform"), // Resource: to.Ptr("AgFoodPlatform FarmBeats"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AgFoodPlatform/locations/checkNameAvailability/action"), // Display: &armagrifood.OperationDisplay{ // Description: to.Ptr("Checks that resource name is valid and is not in use."), // Operation: to.Ptr("Check Name Availability"), // Provider: to.Ptr("Microsoft AgFoodPlatform"), // Resource: to.Ptr("Locations"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AgFoodPlatform/operations/read"), // Display: &armagrifood.OperationDisplay{ // Description: to.Ptr("List all operations in Microsoft AgFoodPlatform resource provider."), // Operation: to.Ptr("List all operations."), // Provider: to.Ptr("Microsoft AgFoodPlatform"), // Resource: to.Ptr("List all operations in Microsoft AgFoodPlatform resource provider."), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AgFoodPlatform/farmBeats/extensions/read"), // Display: &armagrifood.OperationDisplay{ // Description: to.Ptr("Gets or Lists existing AgFoodPlatform Extensions resource(s)."), // Operation: to.Ptr("Get or List AgFoodPlatform Extensions resource(s)."), // Provider: to.Ptr("Microsoft AgFoodPlatform"), // Resource: to.Ptr("AgFoodPlatform Extensions"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AgFoodPlatform/farmBeats/extensions/write"), // Display: &armagrifood.OperationDisplay{ // Description: to.Ptr("Creates or Updates AgFoodPlatform Extensions."), // Operation: to.Ptr("Create or Update AgFoodPlatform Extensions."), // Provider: to.Ptr("Microsoft AgFoodPlatform"), // Resource: to.Ptr("AgFoodPlatform Extensions"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AgFoodPlatform/farmBeats/extensions/delete"), // Display: &armagrifood.OperationDisplay{ // Description: to.Ptr("Deletes an existing AgFoodPlatform Extensions resource."), // Operation: to.Ptr("Delete AgFoodPlatform Extensions resource."), // Provider: to.Ptr("Microsoft AgFoodPlatform"), // Resource: to.Ptr("AgFoodPlatform Extensions"), // }, // IsDataAction: to.Ptr(false), // }}, // } } }
Output:
type OperationsClientListOptions ¶ added in v0.3.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶ added in v0.3.0
type OperationsClientListResponse struct { // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
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 }
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 // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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 }
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 // The resource of private end point. PrivateEndpoint *PrivateEndpoint // READ-ONLY; The provisioning state of the private endpoint connection resource. ProvisioningState *PrivateEndpointConnectionProvisioningState }
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/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPrivateEndpointConnectionsClient().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/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateEndpointConnectionsClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateEndpointConnection = armagrifood.PrivateEndpointConnection{ // Name: to.Ptr("privateEndpointConnectionName"), // Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeats/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateEndpointConnections/privateEndpointConnectionName"), // Properties: &armagrifood.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armagrifood.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName"), // }, // PrivateLinkServiceConnectionState: &armagrifood.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Approved by johndoe@contoso.com"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armagrifood.PrivateEndpointServiceConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armagrifood.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // } }
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/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "examples-rg", "examples-farmbeatsResourceName", "privateEndpointConnectionName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateEndpointConnection = armagrifood.PrivateEndpointConnection{ // Name: to.Ptr("privateEndpointConnectionName"), // Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeats/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateEndpointConnections/privateEndpointConnectionName"), // Properties: &armagrifood.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armagrifood.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName"), // }, // PrivateLinkServiceConnectionState: &armagrifood.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Approved by johndoe@contoso.com"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armagrifood.PrivateEndpointServiceConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armagrifood.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // } }
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.
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.NewListByResourcePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListByResourcePager("examples-rg", "examples-farmbeatsResourceName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PrivateEndpointConnectionListResult = armagrifood.PrivateEndpointConnectionListResult{ // Value: []*armagrifood.PrivateEndpointConnection{ // { // Name: to.Ptr("privateEndpointConnectionName"), // Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeats/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateEndpointConnections/privateEndpointConnectionName"), // Properties: &armagrifood.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armagrifood.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName"), // }, // PrivateLinkServiceConnectionState: &armagrifood.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Approved by johndoe@contoso.com"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armagrifood.PrivateEndpointServiceConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armagrifood.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // }, // { // Name: to.Ptr("privateEndpointConnectionName2"), // Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeats/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateEndpointConnections/privateEndpointConnectionName2"), // Properties: &armagrifood.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armagrifood.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName2"), // }, // PrivateLinkServiceConnectionState: &armagrifood.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Approved by johndoe@contoso.com"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armagrifood.PrivateEndpointServiceConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armagrifood.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // }}, // } } }
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 { // The Private Endpoint Connection resource. 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.BeginDelete.
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 { // The Private Endpoint Connection resource. 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.NewListByResourcePager method.
type PrivateEndpointConnectionsClientListByResourceResponse ¶ added in v0.7.0
type PrivateEndpointConnectionsClientListByResourceResponse struct { // List of private endpoint connection associated with the specified storage account PrivateEndpointConnectionListResult }
PrivateEndpointConnectionsClientListByResourceResponse contains the response from method PrivateEndpointConnectionsClient.NewListByResourcePager.
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 // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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 }
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 // READ-ONLY; The private link resource group id. GroupID *string // READ-ONLY; The private link resource required member names. RequiredMembers []*string }
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/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "examples-rg", "examples-farmbeatsResourceName", "farmbeats", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateLinkResource = armagrifood.PrivateLinkResource{ // Name: to.Ptr("farmbeats"), // Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeats/privateLinkResources"), // ID: to.Ptr("subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateLinkResources/farmbeats"), // Properties: &armagrifood.PrivateLinkResourceProperties{ // GroupID: to.Ptr("farmbeats"), // RequiredMembers: []*string{ // to.Ptr("farmbeats")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.farmbeats.azure.net")}, // }, // } }
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.
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.NewListByResourcePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a7af6049f4b4743ef3b649f3852bcc7bd9a43ee0/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() clientFactory, err := armagrifood.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPrivateLinkResourcesClient().NewListByResourcePager("examples-rg", "examples-farmbeatsResourceName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PrivateLinkResourceListResult = armagrifood.PrivateLinkResourceListResult{ // Value: []*armagrifood.PrivateLinkResource{ // { // Name: to.Ptr("farmbeats"), // Type: to.Ptr("Microsoft.AgFoodPlatform/farmBeats/privateLinkResources"), // ID: to.Ptr("subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateLinkResources/farmbeats"), // Properties: &armagrifood.PrivateLinkResourceProperties{ // GroupID: to.Ptr("farmbeats"), // RequiredMembers: []*string{ // to.Ptr("farmbeats")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.farmbeats.azure.net")}, // }, // }}, // } } }
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 { // A private link resource 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.NewListByResourcePager method.
type PrivateLinkResourcesClientListByResourceResponse ¶ added in v0.7.0
type PrivateLinkResourcesClientListByResourceResponse struct { // A list of private link resources PrivateLinkResourceListResult }
PrivateLinkResourcesClientListByResourceResponse contains the response from method PrivateLinkResourcesClient.NewListByResourcePager.
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 // The reason for approval/rejection of the connection. Description *string // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Status *PrivateEndpointServiceConnectionStatus }
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 // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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 // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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 // 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 // READ-ONLY; Sensor integration instance provisioning state. ProvisioningState *ProvisioningState }
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 // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
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 // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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 // REQUIRED; List of unit systems supported by this data provider. Values []*string }
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.