Documentation ¶
Index ¶
- type ActionType
- type CheckNameAvailabilityReason
- type CheckNameAvailabilityRequest
- type CheckNameAvailabilityResponse
- type CreatedByType
- type DataPartitionAddOrRemoveRequest
- type DataPartitionNames
- type DataPartitionProperties
- type DataPartitionsList
- type DataPartitionsListResult
- type EnergyResourceUpdate
- type EnergyService
- type EnergyServiceList
- type EnergyServiceProperties
- type EnergyServicesClient
- func (client *EnergyServicesClient) BeginAddPartition(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[EnergyServicesClientAddPartitionResponse], error)
- func (client *EnergyServicesClient) BeginCreate(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[EnergyServicesClientCreateResponse], error)
- func (client *EnergyServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[EnergyServicesClientDeleteResponse], error)
- func (client *EnergyServicesClient) BeginRemovePartition(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[EnergyServicesClientRemovePartitionResponse], error)
- func (client *EnergyServicesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, ...) (EnergyServicesClientGetResponse, error)
- func (client *EnergyServicesClient) ListPartitions(ctx context.Context, resourceGroupName string, resourceName string, ...) (EnergyServicesClientListPartitionsResponse, error)
- func (client *EnergyServicesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[EnergyServicesClientListByResourceGroupResponse]
- func (client *EnergyServicesClient) NewListBySubscriptionPager(options *EnergyServicesClientListBySubscriptionOptions) *runtime.Pager[EnergyServicesClientListBySubscriptionResponse]
- func (client *EnergyServicesClient) Update(ctx context.Context, resourceGroupName string, resourceName string, ...) (EnergyServicesClientUpdateResponse, error)
- type EnergyServicesClientAddPartitionResponse
- type EnergyServicesClientBeginAddPartitionOptions
- type EnergyServicesClientBeginCreateOptions
- type EnergyServicesClientBeginDeleteOptions
- type EnergyServicesClientBeginRemovePartitionOptions
- type EnergyServicesClientCreateResponse
- type EnergyServicesClientDeleteResponse
- type EnergyServicesClientGetOptions
- type EnergyServicesClientGetResponse
- type EnergyServicesClientListByResourceGroupOptions
- type EnergyServicesClientListByResourceGroupResponse
- type EnergyServicesClientListBySubscriptionOptions
- type EnergyServicesClientListBySubscriptionResponse
- type EnergyServicesClientListPartitionsOptions
- type EnergyServicesClientListPartitionsResponse
- type EnergyServicesClientRemovePartitionResponse
- type EnergyServicesClientUpdateOptions
- type EnergyServicesClientUpdateResponse
- type ErrorAdditionalInfo
- type ErrorDetail
- type ErrorResponse
- type LocationsClient
- type LocationsClientCheckNameAvailabilityOptions
- type LocationsClientCheckNameAvailabilityResponse
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type ProvisioningState
- type Resource
- type SystemData
Examples ¶
- EnergyServicesClient.BeginAddPartition
- EnergyServicesClient.BeginCreate
- EnergyServicesClient.BeginDelete
- EnergyServicesClient.BeginRemovePartition
- EnergyServicesClient.Get
- EnergyServicesClient.ListPartitions
- EnergyServicesClient.NewListByResourceGroupPager
- EnergyServicesClient.NewListBySubscriptionPager
- EnergyServicesClient.Update
- LocationsClient.CheckNameAvailability
- OperationsClient.List
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
const (
ActionTypeInternal ActionType = "Internal"
)
func PossibleActionTypeValues ¶
func PossibleActionTypeValues() []ActionType
PossibleActionTypeValues returns the possible values for the ActionType const type.
type CheckNameAvailabilityReason ¶
type CheckNameAvailabilityReason string
CheckNameAvailabilityReason - The reason why the given name is not available.
const ( CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists" CheckNameAvailabilityReasonInvalid CheckNameAvailabilityReason = "Invalid" )
func PossibleCheckNameAvailabilityReasonValues ¶
func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason
PossibleCheckNameAvailabilityReasonValues returns the possible values for the CheckNameAvailabilityReason const type.
type CheckNameAvailabilityRequest ¶
type CheckNameAvailabilityRequest struct { // The name of the resource for which availability needs to be checked. Name *string `json:"name,omitempty"` // The resource type. Type *string `json:"type,omitempty"` }
CheckNameAvailabilityRequest - The check availability request body.
type CheckNameAvailabilityResponse ¶
type CheckNameAvailabilityResponse struct { // Detailed reason why the given name is available. Message *string `json:"message,omitempty"` // Indicates if the resource name is available. NameAvailable *bool `json:"nameAvailable,omitempty"` // The reason why the given name is not available. Reason *CheckNameAvailabilityReason `json:"reason,omitempty"` }
CheckNameAvailabilityResponse - The check availability result.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type DataPartitionAddOrRemoveRequest ¶ added in v0.4.0
type DataPartitionAddOrRemoveRequest struct { // Name of the data partition Name *string `json:"name,omitempty"` }
DataPartitionAddOrRemoveRequest - Defines the partition add/ delete action properties.
type DataPartitionNames ¶
type DataPartitionNames struct {
Name *string `json:"name,omitempty"`
}
DataPartitionNames - The list of Energy services resource's Data Partition Names.
type DataPartitionProperties ¶ added in v0.4.0
type DataPartitionProperties struct { // Name of the data partition Name *string `json:"name,omitempty"` // Name of the data partition ProvisioningState *string `json:"provisioningState,omitempty"` }
DataPartitionProperties - Defines the properties of an individual data partition.
type DataPartitionsList ¶ added in v0.4.0
type DataPartitionsList struct {
DataPartitionNames []*DataPartitionNames `json:"dataPartitionNames,omitempty"`
}
DataPartitionsList - List of data partitions
type DataPartitionsListResult ¶ added in v0.4.0
type DataPartitionsListResult struct { // List of data partitions along with their properties in a given OEP resource. Value []*DataPartitionProperties `json:"value,omitempty"` }
DataPartitionsListResult - List of data partitions.
type EnergyResourceUpdate ¶
type EnergyResourceUpdate struct { // Resource tags. Tags map[string]*string `json:"tags,omitempty"` }
EnergyResourceUpdate - The resource model definition used for updating a tracked ARM resource.
func (EnergyResourceUpdate) MarshalJSON ¶
func (e EnergyResourceUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EnergyResourceUpdate.
type EnergyService ¶
type EnergyService struct { // REQUIRED; Geo-location where the resource lives. Location *string `json:"location,omitempty"` Properties *EnergyServiceProperties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
func (EnergyService) MarshalJSON ¶
func (e EnergyService) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EnergyService.
type EnergyServiceList ¶
type EnergyServiceList struct { // The link used to get the next page of oep resources list. NextLink *string `json:"nextLink,omitempty"` // The list of oep resources. Value []*EnergyService `json:"value,omitempty"` }
EnergyServiceList - The list of oep resources.
type EnergyServiceProperties ¶
type EnergyServiceProperties struct { AuthAppID *string `json:"authAppId,omitempty"` DataPartitionNames []*DataPartitionNames `json:"dataPartitionNames,omitempty"` // READ-ONLY DNSName *string `json:"dnsName,omitempty" azure:"ro"` // READ-ONLY ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` }
func (EnergyServiceProperties) MarshalJSON ¶
func (e EnergyServiceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EnergyServiceProperties.
type EnergyServicesClient ¶
type EnergyServicesClient struct {
// contains filtered or unexported fields
}
EnergyServicesClient contains the methods for the EnergyServices group. Don't use this type directly, use NewEnergyServicesClient() instead.
func NewEnergyServicesClient ¶
func NewEnergyServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EnergyServicesClient, error)
NewEnergyServicesClient creates a new instance of EnergyServicesClient 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 (*EnergyServicesClient) BeginAddPartition ¶ added in v0.4.0
func (client *EnergyServicesClient) BeginAddPartition(ctx context.Context, resourceGroupName string, resourceName string, options *EnergyServicesClientBeginAddPartitionOptions) (*runtime.Poller[EnergyServicesClientAddPartitionResponse], error)
BeginAddPartition - Method that gets called if new partition is to be added in a resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-04-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The resource name. options - EnergyServicesClientBeginAddPartitionOptions contains the optional parameters for the EnergyServicesClient.BeginAddPartition method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/EnergyServices_AddPartition_MaximumSet_Gen.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/oep/armoep" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armoep.NewEnergyServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginAddPartition(ctx, "rgoep", "a", &armoep.EnergyServicesClientBeginAddPartitionOptions{Body: &armoep.DataPartitionAddOrRemoveRequest{ Name: to.Ptr("aaaaaaaaaaaaaaaaaa"), }, }) 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 (*EnergyServicesClient) BeginCreate ¶
func (client *EnergyServicesClient) BeginCreate(ctx context.Context, resourceGroupName string, resourceName string, options *EnergyServicesClientBeginCreateOptions) (*runtime.Poller[EnergyServicesClientCreateResponse], error)
BeginCreate - Method that gets called if subscribed for ResourceCreationBegin trigger. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-04-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The resource name. options - EnergyServicesClientBeginCreateOptions contains the optional parameters for the EnergyServicesClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_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/oep/armoep" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armoep.NewEnergyServicesClient("0000000-0000-0000-0000-000000000001", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreate(ctx, "DummyResourceGroupName", "DummyResourceName", &armoep.EnergyServicesClientBeginCreateOptions{Body: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*EnergyServicesClient) BeginDelete ¶
func (client *EnergyServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, options *EnergyServicesClientBeginDeleteOptions) (*runtime.Poller[EnergyServicesClientDeleteResponse], error)
BeginDelete - Deletes oep resource If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-04-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The resource name. options - EnergyServicesClientBeginDeleteOptions contains the optional parameters for the EnergyServicesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_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/oep/armoep" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armoep.NewEnergyServicesClient("0000000-0000-0000-0000-000000000001", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "DummyResourceGroupName", "DummyResourceName", 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 (*EnergyServicesClient) BeginRemovePartition ¶ added in v0.4.0
func (client *EnergyServicesClient) BeginRemovePartition(ctx context.Context, resourceGroupName string, resourceName string, options *EnergyServicesClientBeginRemovePartitionOptions) (*runtime.Poller[EnergyServicesClientRemovePartitionResponse], error)
BeginRemovePartition - Method that gets called if new partition is to be removed from a resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-04-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The resource name. options - EnergyServicesClientBeginRemovePartitionOptions contains the optional parameters for the EnergyServicesClient.BeginRemovePartition method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/EnergyServices_RemovePartition_MaximumSet_Gen.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/oep/armoep" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armoep.NewEnergyServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginRemovePartition(ctx, "rgoep", "aaaaaaa", &armoep.EnergyServicesClientBeginRemovePartitionOptions{Body: &armoep.DataPartitionAddOrRemoveRequest{ Name: to.Ptr("aaaaaaaaaaaaaaaaaa"), }, }) 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 (*EnergyServicesClient) Get ¶
func (client *EnergyServicesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *EnergyServicesClientGetOptions) (EnergyServicesClientGetResponse, error)
Get - Returns oep resource for a given name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-04-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The resource name. options - EnergyServicesClientGetOptions contains the optional parameters for the EnergyServicesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_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/oep/armoep" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armoep.NewEnergyServicesClient("0000000-0000-0000-0000-000000000001", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "DummyResourceGroupName", "DummyResourceName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*EnergyServicesClient) ListPartitions ¶ added in v0.4.0
func (client *EnergyServicesClient) ListPartitions(ctx context.Context, resourceGroupName string, resourceName string, options *EnergyServicesClientListPartitionsOptions) (EnergyServicesClientListPartitionsResponse, error)
ListPartitions - Method that gets called when list of partitions is requested. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-04-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The resource name. options - EnergyServicesClientListPartitionsOptions contains the optional parameters for the EnergyServicesClient.ListPartitions method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/EnergyServices_ListPartitions_MaximumSet_Gen.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/oep/armoep" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armoep.NewEnergyServicesClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.ListPartitions(ctx, "rgoep", "aaaaaaaaaaaaaaaaaaa", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*EnergyServicesClient) NewListByResourceGroupPager ¶ added in v0.3.0
func (client *EnergyServicesClient) NewListByResourceGroupPager(resourceGroupName string, options *EnergyServicesClientListByResourceGroupOptions) *runtime.Pager[EnergyServicesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Returns list of oep resources.. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-04-preview resourceGroupName - The name of the resource group. The name is case insensitive. options - EnergyServicesClientListByResourceGroupOptions contains the optional parameters for the EnergyServicesClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_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/oep/armoep" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armoep.NewEnergyServicesClient("0000000-0000-0000-0000-000000000001", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("DummyResourceGroupName", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*EnergyServicesClient) NewListBySubscriptionPager ¶ added in v0.3.0
func (client *EnergyServicesClient) NewListBySubscriptionPager(options *EnergyServicesClientListBySubscriptionOptions) *runtime.Pager[EnergyServicesClientListBySubscriptionResponse]
NewListBySubscriptionPager - Lists a collection of oep resources under the given Azure Subscription ID. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-04-preview options - EnergyServicesClientListBySubscriptionOptions contains the optional parameters for the EnergyServicesClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_ListBySubscriptionId.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/oep/armoep" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armoep.NewEnergyServicesClient("0000000-0000-0000-0000-000000000001", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListBySubscriptionPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*EnergyServicesClient) Update ¶
func (client *EnergyServicesClient) Update(ctx context.Context, resourceGroupName string, resourceName string, options *EnergyServicesClientUpdateOptions) (EnergyServicesClientUpdateResponse, error)
Update - If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-04-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The resource name. options - EnergyServicesClientUpdateOptions contains the optional parameters for the EnergyServicesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_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/oep/armoep" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armoep.NewEnergyServicesClient("0000000-0000-0000-0000-000000000001", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "DummyResourceGroupName", "DummyResourceName", &armoep.EnergyServicesClientUpdateOptions{Body: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type EnergyServicesClientAddPartitionResponse ¶ added in v0.4.0
type EnergyServicesClientAddPartitionResponse struct { }
EnergyServicesClientAddPartitionResponse contains the response from method EnergyServicesClient.AddPartition.
type EnergyServicesClientBeginAddPartitionOptions ¶ added in v0.4.0
type EnergyServicesClientBeginAddPartitionOptions struct { // add partition action payload Body *DataPartitionAddOrRemoveRequest // Resumes the LRO from the provided token. ResumeToken string }
EnergyServicesClientBeginAddPartitionOptions contains the optional parameters for the EnergyServicesClient.BeginAddPartition method.
type EnergyServicesClientBeginCreateOptions ¶
type EnergyServicesClientBeginCreateOptions struct { // Request body. Body *EnergyService // Resumes the LRO from the provided token. ResumeToken string }
EnergyServicesClientBeginCreateOptions contains the optional parameters for the EnergyServicesClient.BeginCreate method.
type EnergyServicesClientBeginDeleteOptions ¶
type EnergyServicesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
EnergyServicesClientBeginDeleteOptions contains the optional parameters for the EnergyServicesClient.BeginDelete method.
type EnergyServicesClientBeginRemovePartitionOptions ¶ added in v0.4.0
type EnergyServicesClientBeginRemovePartitionOptions struct { // remove partition action payload Body *DataPartitionAddOrRemoveRequest // Resumes the LRO from the provided token. ResumeToken string }
EnergyServicesClientBeginRemovePartitionOptions contains the optional parameters for the EnergyServicesClient.BeginRemovePartition method.
type EnergyServicesClientCreateResponse ¶
type EnergyServicesClientCreateResponse struct {
EnergyService
}
EnergyServicesClientCreateResponse contains the response from method EnergyServicesClient.Create.
type EnergyServicesClientDeleteResponse ¶
type EnergyServicesClientDeleteResponse struct { }
EnergyServicesClientDeleteResponse contains the response from method EnergyServicesClient.Delete.
type EnergyServicesClientGetOptions ¶
type EnergyServicesClientGetOptions struct { }
EnergyServicesClientGetOptions contains the optional parameters for the EnergyServicesClient.Get method.
type EnergyServicesClientGetResponse ¶
type EnergyServicesClientGetResponse struct {
EnergyService
}
EnergyServicesClientGetResponse contains the response from method EnergyServicesClient.Get.
type EnergyServicesClientListByResourceGroupOptions ¶
type EnergyServicesClientListByResourceGroupOptions struct { }
EnergyServicesClientListByResourceGroupOptions contains the optional parameters for the EnergyServicesClient.ListByResourceGroup method.
type EnergyServicesClientListByResourceGroupResponse ¶
type EnergyServicesClientListByResourceGroupResponse struct {
EnergyServiceList
}
EnergyServicesClientListByResourceGroupResponse contains the response from method EnergyServicesClient.ListByResourceGroup.
type EnergyServicesClientListBySubscriptionOptions ¶
type EnergyServicesClientListBySubscriptionOptions struct { }
EnergyServicesClientListBySubscriptionOptions contains the optional parameters for the EnergyServicesClient.ListBySubscription method.
type EnergyServicesClientListBySubscriptionResponse ¶
type EnergyServicesClientListBySubscriptionResponse struct {
EnergyServiceList
}
EnergyServicesClientListBySubscriptionResponse contains the response from method EnergyServicesClient.ListBySubscription.
type EnergyServicesClientListPartitionsOptions ¶ added in v0.4.0
type EnergyServicesClientListPartitionsOptions struct { }
EnergyServicesClientListPartitionsOptions contains the optional parameters for the EnergyServicesClient.ListPartitions method.
type EnergyServicesClientListPartitionsResponse ¶ added in v0.4.0
type EnergyServicesClientListPartitionsResponse struct {
DataPartitionsListResult
}
EnergyServicesClientListPartitionsResponse contains the response from method EnergyServicesClient.ListPartitions.
type EnergyServicesClientRemovePartitionResponse ¶ added in v0.4.0
type EnergyServicesClientRemovePartitionResponse struct { }
EnergyServicesClientRemovePartitionResponse contains the response from method EnergyServicesClient.RemovePartition.
type EnergyServicesClientUpdateOptions ¶
type EnergyServicesClientUpdateOptions struct {
Body *EnergyResourceUpdate
}
EnergyServicesClientUpdateOptions contains the optional parameters for the EnergyServicesClient.Update method.
type EnergyServicesClientUpdateResponse ¶
type EnergyServicesClientUpdateResponse struct {
EnergyService
}
EnergyServicesClientUpdateResponse contains the response from method EnergyServicesClient.Update.
type ErrorAdditionalInfo ¶
type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. Info interface{} `json:"info,omitempty" azure:"ro"` // READ-ONLY; The additional info type. Type *string `json:"type,omitempty" azure:"ro"` }
ErrorAdditionalInfo - The resource management error additional info.
type ErrorDetail ¶
type ErrorDetail struct { // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"` // READ-ONLY; The error code. Code *string `json:"code,omitempty" azure:"ro"` // READ-ONLY; The error details. Details []*ErrorDetail `json:"details,omitempty" azure:"ro"` // READ-ONLY; The error message. Message *string `json:"message,omitempty" azure:"ro"` // READ-ONLY; The error target. Target *string `json:"target,omitempty" azure:"ro"` }
ErrorDetail - The error detail.
type ErrorResponse ¶
type ErrorResponse struct { // The error object. Error *ErrorDetail `json:"error,omitempty"` }
ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
type 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 2022-04-04-preview body - NameAvailabilityRequest object. options - LocationsClientCheckNameAvailabilityOptions contains the optional parameters for the LocationsClient.CheckNameAvailability method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/Locations_CheckNameAvailability.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/oep/armoep" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armoep.NewLocationsClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.CheckNameAvailability(ctx, armoep.CheckNameAvailabilityRequest{ Name: to.Ptr("sample-name"), Type: to.Ptr("Microsoft.OEP/oepResource"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type LocationsClientCheckNameAvailabilityOptions ¶
type LocationsClientCheckNameAvailabilityOptions struct { }
LocationsClientCheckNameAvailabilityOptions contains the optional parameters for the LocationsClient.CheckNameAvailability method.
type LocationsClientCheckNameAvailabilityResponse ¶
type LocationsClientCheckNameAvailabilityResponse struct {
CheckNameAvailabilityResponse
}
LocationsClientCheckNameAvailabilityResponse contains the response from method LocationsClient.CheckNameAvailability.
type Operation ¶
type Operation struct { // Localized display information for this particular operation. Display *OperationDisplay `json:"display,omitempty"` // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType `json:"actionType,omitempty" azure:"ro"` // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane // operations. IsDataAction *bool `json:"isDataAction,omitempty" azure:"ro"` // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", // "Microsoft.Compute/virtualMachines/capture/action" Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default // value is "user,system" Origin *Origin `json:"origin,omitempty" azure:"ro"` }
Operation - Details of a REST API operation, returned from the Resource Provider Operations API
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual // Machine", "Restart Virtual Machine". Operation *string `json:"operation,omitempty" azure:"ro"` // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft // Compute". Provider *string `json:"provider,omitempty" azure:"ro"` // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job // Schedule Collections". Resource *string `json:"resource,omitempty" azure:"ro"` }
OperationDisplay - Localized display information for this particular operation.
type OperationListResult ¶
type OperationListResult struct { // READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; List of operations supported by the resource provider Value []*Operation `json:"value,omitempty" azure:"ro"` }
OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*OperationsClient) List ¶
func (client *OperationsClient) List(ctx context.Context, options *OperationsClientListOptions) (OperationsClientListResponse, error)
List - Lists the available operations of Microsoft.OpenEnergyPlatform resource provider. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-04-preview options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-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/oep/armoep" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armoep.NewOperationsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.List(ctx, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct {
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.List.
type Origin ¶
type Origin string
Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
func PossibleOriginValues ¶
func PossibleOriginValues() []Origin
PossibleOriginValues returns the possible values for the Origin const type.
type ProvisioningState ¶
type ProvisioningState string
const ( ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" ProvisioningStateUnknown ProvisioningState = "Unknown" ProvisioningStateUpdating ProvisioningState = "Updating" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type Resource ¶
type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time `json:"createdAt,omitempty"` // The identity that created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The type of identity that created the resource. CreatedByType *CreatedByType `json:"createdByType,omitempty"` // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` // The identity that last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The type of identity that last modified the resource. LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.