README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances
Documentation
The sapdatabaseinstances
SDK allows for interaction with the Azure Resource Manager Service workloads
(API Version 2023-04-01
).
This readme covers example usages, but further information on using this SDK can be found in the project root.
Import Path
import "github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances"
Client Initialization
client := sapdatabaseinstances.NewSAPDatabaseInstancesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: SAPDatabaseInstancesClient.Create
ctx := context.TODO()
id := sapdatabaseinstances.NewDatabaseInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "databaseInstanceValue")
payload := sapdatabaseinstances.SAPDatabaseInstance{
// ...
}
if err := client.CreateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: SAPDatabaseInstancesClient.Delete
ctx := context.TODO()
id := sapdatabaseinstances.NewDatabaseInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "databaseInstanceValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: SAPDatabaseInstancesClient.Get
ctx := context.TODO()
id := sapdatabaseinstances.NewDatabaseInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "databaseInstanceValue")
read, err := client.Get(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: SAPDatabaseInstancesClient.List
ctx := context.TODO()
id := sapdatabaseinstances.NewSapVirtualInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue")
// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: SAPDatabaseInstancesClient.StartInstance
ctx := context.TODO()
id := sapdatabaseinstances.NewDatabaseInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "databaseInstanceValue")
if err := client.StartInstanceThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: SAPDatabaseInstancesClient.StopInstance
ctx := context.TODO()
id := sapdatabaseinstances.NewDatabaseInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "databaseInstanceValue")
payload := sapdatabaseinstances.StopRequest{
// ...
}
if err := client.StopInstanceThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: SAPDatabaseInstancesClient.Update
ctx := context.TODO()
id := sapdatabaseinstances.NewDatabaseInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "databaseInstanceValue")
payload := sapdatabaseinstances.UpdateSAPDatabaseInstanceRequest{
// ...
}
if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Documentation ¶
Index ¶
- func PossibleValuesForSAPVirtualInstanceStatus() []string
- func PossibleValuesForSapVirtualInstanceProvisioningState() []string
- func ValidateDatabaseInstanceID(input interface{}, key string) (warnings []string, errors []error)
- func ValidateSapVirtualInstanceID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOperationResponse
- type DatabaseInstanceId
- type DatabaseVMDetails
- type DeleteOperationResponse
- type ErrorAdditionalInfo
- type ErrorDefinition
- type ErrorDetail
- type GetOperationResponse
- type ListCompleteResult
- type ListOperationResponse
- type LoadBalancerDetails
- type OperationStatusResult
- type SAPDatabaseInstance
- type SAPDatabaseInstanceOperationPredicate
- type SAPDatabaseInstancesClient
- func (c SAPDatabaseInstancesClient) Create(ctx context.Context, id DatabaseInstanceId, input SAPDatabaseInstance) (result CreateOperationResponse, err error)
- func (c SAPDatabaseInstancesClient) CreateThenPoll(ctx context.Context, id DatabaseInstanceId, input SAPDatabaseInstance) error
- func (c SAPDatabaseInstancesClient) Delete(ctx context.Context, id DatabaseInstanceId) (result DeleteOperationResponse, err error)
- func (c SAPDatabaseInstancesClient) DeleteThenPoll(ctx context.Context, id DatabaseInstanceId) error
- func (c SAPDatabaseInstancesClient) Get(ctx context.Context, id DatabaseInstanceId) (result GetOperationResponse, err error)
- func (c SAPDatabaseInstancesClient) List(ctx context.Context, id SapVirtualInstanceId) (result ListOperationResponse, err error)
- func (c SAPDatabaseInstancesClient) ListComplete(ctx context.Context, id SapVirtualInstanceId) (ListCompleteResult, error)
- func (c SAPDatabaseInstancesClient) ListCompleteMatchingPredicate(ctx context.Context, id SapVirtualInstanceId, ...) (result ListCompleteResult, err error)
- func (c SAPDatabaseInstancesClient) StartInstance(ctx context.Context, id DatabaseInstanceId) (result StartInstanceOperationResponse, err error)
- func (c SAPDatabaseInstancesClient) StartInstanceThenPoll(ctx context.Context, id DatabaseInstanceId) error
- func (c SAPDatabaseInstancesClient) StopInstance(ctx context.Context, id DatabaseInstanceId, input StopRequest) (result StopInstanceOperationResponse, err error)
- func (c SAPDatabaseInstancesClient) StopInstanceThenPoll(ctx context.Context, id DatabaseInstanceId, input StopRequest) error
- func (c SAPDatabaseInstancesClient) Update(ctx context.Context, id DatabaseInstanceId, ...) (result UpdateOperationResponse, err error)
- func (c SAPDatabaseInstancesClient) UpdateThenPoll(ctx context.Context, id DatabaseInstanceId, ...) error
- type SAPDatabaseProperties
- type SAPVirtualInstanceError
- type SAPVirtualInstanceStatus
- type SapVirtualInstanceId
- type SapVirtualInstanceProvisioningState
- type StartInstanceOperationResponse
- type StopInstanceOperationResponse
- type StopRequest
- type StorageInformation
- type UpdateOperationResponse
- type UpdateSAPDatabaseInstanceRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForSAPVirtualInstanceStatus ¶
func PossibleValuesForSAPVirtualInstanceStatus() []string
func PossibleValuesForSapVirtualInstanceProvisioningState ¶
func PossibleValuesForSapVirtualInstanceProvisioningState() []string
func ValidateDatabaseInstanceID ¶
ValidateDatabaseInstanceID checks that 'input' can be parsed as a Database Instance ID
func ValidateSapVirtualInstanceID ¶
func ValidateSapVirtualInstanceID(input interface{}, key string) (warnings []string, errors []error)
ValidateSapVirtualInstanceID checks that 'input' can be parsed as a Sap Virtual Instance ID
Types ¶
type CreateOperationResponse ¶
type DatabaseInstanceId ¶
type DatabaseInstanceId struct { SubscriptionId string ResourceGroupName string SapVirtualInstanceName string DatabaseInstanceName string }
DatabaseInstanceId is a struct representing the Resource ID for a Database Instance
func NewDatabaseInstanceID ¶
func NewDatabaseInstanceID(subscriptionId string, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string) DatabaseInstanceId
NewDatabaseInstanceID returns a new DatabaseInstanceId struct
func ParseDatabaseInstanceID ¶
func ParseDatabaseInstanceID(input string) (*DatabaseInstanceId, error)
ParseDatabaseInstanceID parses 'input' into a DatabaseInstanceId
func ParseDatabaseInstanceIDInsensitively ¶
func ParseDatabaseInstanceIDInsensitively(input string) (*DatabaseInstanceId, error)
ParseDatabaseInstanceIDInsensitively parses 'input' case-insensitively into a DatabaseInstanceId note: this method should only be used for API response data and not user input
func (DatabaseInstanceId) ID ¶
func (id DatabaseInstanceId) ID() string
ID returns the formatted Database Instance ID
func (DatabaseInstanceId) Segments ¶
func (id DatabaseInstanceId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Database Instance ID
func (DatabaseInstanceId) String ¶
func (id DatabaseInstanceId) String() string
String returns a human-readable description of this Database Instance ID
type DatabaseVMDetails ¶
type DatabaseVMDetails struct { Status *SAPVirtualInstanceStatus `json:"status,omitempty"` StorageDetails *[]StorageInformation `json:"storageDetails,omitempty"` VirtualMachineId *string `json:"virtualMachineId,omitempty"` }
type DeleteOperationResponse ¶
type ErrorAdditionalInfo ¶
type ErrorAdditionalInfo struct { Info *interface{} `json:"info,omitempty"` Type *string `json:"type,omitempty"` }
type ErrorDefinition ¶
type ErrorDefinition struct { Code *string `json:"code,omitempty"` Details *[]ErrorDefinition `json:"details,omitempty"` Message *string `json:"message,omitempty"` }
type ErrorDetail ¶
type ErrorDetail struct { AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` Code *string `json:"code,omitempty"` Details *[]ErrorDetail `json:"details,omitempty"` Message *string `json:"message,omitempty"` Target *string `json:"target,omitempty"` }
type GetOperationResponse ¶
type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *SAPDatabaseInstance }
type ListCompleteResult ¶
type ListCompleteResult struct {
Items []SAPDatabaseInstance
}
type ListOperationResponse ¶
type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]SAPDatabaseInstance }
type LoadBalancerDetails ¶
type LoadBalancerDetails struct {
Id *string `json:"id,omitempty"`
}
type OperationStatusResult ¶
type OperationStatusResult struct { EndTime *string `json:"endTime,omitempty"` Error *ErrorDetail `json:"error,omitempty"` Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Operations *[]OperationStatusResult `json:"operations,omitempty"` PercentComplete *float64 `json:"percentComplete,omitempty"` StartTime *string `json:"startTime,omitempty"` Status string `json:"status"` }
func (*OperationStatusResult) GetEndTimeAsTime ¶
func (o *OperationStatusResult) GetEndTimeAsTime() (*time.Time, error)
func (*OperationStatusResult) GetStartTimeAsTime ¶
func (o *OperationStatusResult) GetStartTimeAsTime() (*time.Time, error)
func (*OperationStatusResult) SetEndTimeAsTime ¶
func (o *OperationStatusResult) SetEndTimeAsTime(input time.Time)
func (*OperationStatusResult) SetStartTimeAsTime ¶
func (o *OperationStatusResult) SetStartTimeAsTime(input time.Time)
type SAPDatabaseInstance ¶
type SAPDatabaseInstance struct { Id *string `json:"id,omitempty"` Location string `json:"location"` Name *string `json:"name,omitempty"` Properties *SAPDatabaseProperties `json:"properties,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` }
type SAPDatabaseInstanceOperationPredicate ¶
type SAPDatabaseInstanceOperationPredicate struct { Id *string Location *string Name *string Type *string }
func (SAPDatabaseInstanceOperationPredicate) Matches ¶
func (p SAPDatabaseInstanceOperationPredicate) Matches(input SAPDatabaseInstance) bool
type SAPDatabaseInstancesClient ¶
type SAPDatabaseInstancesClient struct {
Client *resourcemanager.Client
}
func NewSAPDatabaseInstancesClientWithBaseURI ¶
func NewSAPDatabaseInstancesClientWithBaseURI(api environments.Api) (*SAPDatabaseInstancesClient, error)
func (SAPDatabaseInstancesClient) Create ¶
func (c SAPDatabaseInstancesClient) Create(ctx context.Context, id DatabaseInstanceId, input SAPDatabaseInstance) (result CreateOperationResponse, err error)
Create ...
func (SAPDatabaseInstancesClient) CreateThenPoll ¶
func (c SAPDatabaseInstancesClient) CreateThenPoll(ctx context.Context, id DatabaseInstanceId, input SAPDatabaseInstance) error
CreateThenPoll performs Create then polls until it's completed
func (SAPDatabaseInstancesClient) Delete ¶
func (c SAPDatabaseInstancesClient) Delete(ctx context.Context, id DatabaseInstanceId) (result DeleteOperationResponse, err error)
Delete ...
func (SAPDatabaseInstancesClient) DeleteThenPoll ¶
func (c SAPDatabaseInstancesClient) DeleteThenPoll(ctx context.Context, id DatabaseInstanceId) error
DeleteThenPoll performs Delete then polls until it's completed
func (SAPDatabaseInstancesClient) Get ¶
func (c SAPDatabaseInstancesClient) Get(ctx context.Context, id DatabaseInstanceId) (result GetOperationResponse, err error)
Get ...
func (SAPDatabaseInstancesClient) List ¶
func (c SAPDatabaseInstancesClient) List(ctx context.Context, id SapVirtualInstanceId) (result ListOperationResponse, err error)
List ...
func (SAPDatabaseInstancesClient) ListComplete ¶
func (c SAPDatabaseInstancesClient) ListComplete(ctx context.Context, id SapVirtualInstanceId) (ListCompleteResult, error)
ListComplete retrieves all the results into a single object
func (SAPDatabaseInstancesClient) ListCompleteMatchingPredicate ¶
func (c SAPDatabaseInstancesClient) ListCompleteMatchingPredicate(ctx context.Context, id SapVirtualInstanceId, predicate SAPDatabaseInstanceOperationPredicate) (result ListCompleteResult, err error)
ListCompleteMatchingPredicate retrieves all the results and then applies the predicate
func (SAPDatabaseInstancesClient) StartInstance ¶
func (c SAPDatabaseInstancesClient) StartInstance(ctx context.Context, id DatabaseInstanceId) (result StartInstanceOperationResponse, err error)
StartInstance ...
func (SAPDatabaseInstancesClient) StartInstanceThenPoll ¶
func (c SAPDatabaseInstancesClient) StartInstanceThenPoll(ctx context.Context, id DatabaseInstanceId) error
StartInstanceThenPoll performs StartInstance then polls until it's completed
func (SAPDatabaseInstancesClient) StopInstance ¶
func (c SAPDatabaseInstancesClient) StopInstance(ctx context.Context, id DatabaseInstanceId, input StopRequest) (result StopInstanceOperationResponse, err error)
StopInstance ...
func (SAPDatabaseInstancesClient) StopInstanceThenPoll ¶
func (c SAPDatabaseInstancesClient) StopInstanceThenPoll(ctx context.Context, id DatabaseInstanceId, input StopRequest) error
StopInstanceThenPoll performs StopInstance then polls until it's completed
func (SAPDatabaseInstancesClient) Update ¶
func (c SAPDatabaseInstancesClient) Update(ctx context.Context, id DatabaseInstanceId, input UpdateSAPDatabaseInstanceRequest) (result UpdateOperationResponse, err error)
Update ...
func (SAPDatabaseInstancesClient) UpdateThenPoll ¶
func (c SAPDatabaseInstancesClient) UpdateThenPoll(ctx context.Context, id DatabaseInstanceId, input UpdateSAPDatabaseInstanceRequest) error
UpdateThenPoll performs Update then polls until it's completed
type SAPDatabaseProperties ¶
type SAPDatabaseProperties struct { DatabaseSid *string `json:"databaseSid,omitempty"` DatabaseType *string `json:"databaseType,omitempty"` Errors *SAPVirtualInstanceError `json:"errors,omitempty"` IPAddress *string `json:"ipAddress,omitempty"` LoadBalancerDetails *LoadBalancerDetails `json:"loadBalancerDetails,omitempty"` ProvisioningState *SapVirtualInstanceProvisioningState `json:"provisioningState,omitempty"` Status *SAPVirtualInstanceStatus `json:"status,omitempty"` Subnet *string `json:"subnet,omitempty"` VMDetails *[]DatabaseVMDetails `json:"vmDetails,omitempty"` }
type SAPVirtualInstanceError ¶
type SAPVirtualInstanceError struct {
Properties *ErrorDefinition `json:"properties,omitempty"`
}
type SAPVirtualInstanceStatus ¶
type SAPVirtualInstanceStatus string
const ( SAPVirtualInstanceStatusOffline SAPVirtualInstanceStatus = "Offline" SAPVirtualInstanceStatusPartiallyRunning SAPVirtualInstanceStatus = "PartiallyRunning" SAPVirtualInstanceStatusRunning SAPVirtualInstanceStatus = "Running" SAPVirtualInstanceStatusSoftShutdown SAPVirtualInstanceStatus = "SoftShutdown" SAPVirtualInstanceStatusStarting SAPVirtualInstanceStatus = "Starting" SAPVirtualInstanceStatusStopping SAPVirtualInstanceStatus = "Stopping" )
func (*SAPVirtualInstanceStatus) UnmarshalJSON ¶ added in v0.20230406.1124617
func (s *SAPVirtualInstanceStatus) UnmarshalJSON(bytes []byte) error
type SapVirtualInstanceId ¶
type SapVirtualInstanceId struct { SubscriptionId string ResourceGroupName string SapVirtualInstanceName string }
SapVirtualInstanceId is a struct representing the Resource ID for a Sap Virtual Instance
func NewSapVirtualInstanceID ¶
func NewSapVirtualInstanceID(subscriptionId string, resourceGroupName string, sapVirtualInstanceName string) SapVirtualInstanceId
NewSapVirtualInstanceID returns a new SapVirtualInstanceId struct
func ParseSapVirtualInstanceID ¶
func ParseSapVirtualInstanceID(input string) (*SapVirtualInstanceId, error)
ParseSapVirtualInstanceID parses 'input' into a SapVirtualInstanceId
func ParseSapVirtualInstanceIDInsensitively ¶
func ParseSapVirtualInstanceIDInsensitively(input string) (*SapVirtualInstanceId, error)
ParseSapVirtualInstanceIDInsensitively parses 'input' case-insensitively into a SapVirtualInstanceId note: this method should only be used for API response data and not user input
func (SapVirtualInstanceId) ID ¶
func (id SapVirtualInstanceId) ID() string
ID returns the formatted Sap Virtual Instance ID
func (SapVirtualInstanceId) Segments ¶
func (id SapVirtualInstanceId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Sap Virtual Instance ID
func (SapVirtualInstanceId) String ¶
func (id SapVirtualInstanceId) String() string
String returns a human-readable description of this Sap Virtual Instance ID
type SapVirtualInstanceProvisioningState ¶
type SapVirtualInstanceProvisioningState string
const ( SapVirtualInstanceProvisioningStateCreating SapVirtualInstanceProvisioningState = "Creating" SapVirtualInstanceProvisioningStateDeleting SapVirtualInstanceProvisioningState = "Deleting" SapVirtualInstanceProvisioningStateFailed SapVirtualInstanceProvisioningState = "Failed" SapVirtualInstanceProvisioningStateSucceeded SapVirtualInstanceProvisioningState = "Succeeded" SapVirtualInstanceProvisioningStateUpdating SapVirtualInstanceProvisioningState = "Updating" )
func (*SapVirtualInstanceProvisioningState) UnmarshalJSON ¶ added in v0.20230406.1124617
func (s *SapVirtualInstanceProvisioningState) UnmarshalJSON(bytes []byte) error
type StopRequest ¶
type StopRequest struct {
SoftStopTimeoutSeconds *int64 `json:"softStopTimeoutSeconds,omitempty"`
}
type StorageInformation ¶
type StorageInformation struct {
Id *string `json:"id,omitempty"`
}
type UpdateOperationResponse ¶
Source Files ¶
- client.go
- constants.go
- id_databaseinstance.go
- id_sapvirtualinstance.go
- method_create.go
- method_delete.go
- method_get.go
- method_list.go
- method_startinstance.go
- method_stopinstance.go
- method_update.go
- model_databasevmdetails.go
- model_erroradditionalinfo.go
- model_errordefinition.go
- model_errordetail.go
- model_loadbalancerdetails.go
- model_operationstatusresult.go
- model_sapdatabaseinstance.go
- model_sapdatabaseproperties.go
- model_sapvirtualinstanceerror.go
- model_stoprequest.go
- model_storageinformation.go
- model_updatesapdatabaseinstancerequest.go
- predicates.go
- version.go