Documentation
¶
Index ¶
- type CloudError
- type CloudErrorBody
- type DisableSerialConsoleResult
- type EnableSerialConsoleResult
- type GetSerialConsoleSubscriptionNotFound
- type MicrosoftSerialConsoleClient
- func (client *MicrosoftSerialConsoleClient) DisableConsole(ctx context.Context, defaultParam string, ...) (MicrosoftSerialConsoleClientDisableConsoleResponse, error)
- func (client *MicrosoftSerialConsoleClient) EnableConsole(ctx context.Context, defaultParam string, ...) (MicrosoftSerialConsoleClientEnableConsoleResponse, error)
- func (client *MicrosoftSerialConsoleClient) GetConsoleStatus(ctx context.Context, defaultParam string, ...) (MicrosoftSerialConsoleClientGetConsoleStatusResponse, error)
- func (client *MicrosoftSerialConsoleClient) ListOperations(ctx context.Context, ...) (MicrosoftSerialConsoleClientListOperationsResponse, error)
- type MicrosoftSerialConsoleClientDisableConsoleOptions
- type MicrosoftSerialConsoleClientDisableConsoleResponse
- type MicrosoftSerialConsoleClientEnableConsoleOptions
- type MicrosoftSerialConsoleClientEnableConsoleResponse
- type MicrosoftSerialConsoleClientGetConsoleStatusOptions
- type MicrosoftSerialConsoleClientGetConsoleStatusResponse
- type MicrosoftSerialConsoleClientListOperationsOptions
- type MicrosoftSerialConsoleClientListOperationsResponse
- type Operations
- type OperationsValueItem
- type OperationsValueItemDisplay
- type ProxyResource
- type Resource
- type SerialPort
- type SerialPortConnectResult
- type SerialPortListResult
- type SerialPortProperties
- type SerialPortState
- type SerialPortsClient
- func (client *SerialPortsClient) Connect(ctx context.Context, resourceGroupName string, ...) (SerialPortsClientConnectResponse, error)
- func (client *SerialPortsClient) Create(ctx context.Context, resourceGroupName string, ...) (SerialPortsClientCreateResponse, error)
- func (client *SerialPortsClient) Delete(ctx context.Context, resourceGroupName string, ...) (SerialPortsClientDeleteResponse, error)
- func (client *SerialPortsClient) Get(ctx context.Context, resourceGroupName string, ...) (SerialPortsClientGetResponse, error)
- func (client *SerialPortsClient) List(ctx context.Context, resourceGroupName string, ...) (SerialPortsClientListResponse, error)
- func (client *SerialPortsClient) ListBySubscriptions(ctx context.Context, options *SerialPortsClientListBySubscriptionsOptions) (SerialPortsClientListBySubscriptionsResponse, error)
- type SerialPortsClientConnectOptions
- type SerialPortsClientConnectResponse
- type SerialPortsClientCreateOptions
- type SerialPortsClientCreateResponse
- type SerialPortsClientDeleteOptions
- type SerialPortsClientDeleteResponse
- type SerialPortsClientGetOptions
- type SerialPortsClientGetResponse
- type SerialPortsClientListBySubscriptionsOptions
- type SerialPortsClientListBySubscriptionsResponse
- type SerialPortsClientListOptions
- type SerialPortsClientListResponse
- type Status
Examples ¶
- MicrosoftSerialConsoleClient.DisableConsole
- MicrosoftSerialConsoleClient.EnableConsole
- MicrosoftSerialConsoleClient.GetConsoleStatus
- MicrosoftSerialConsoleClient.ListOperations
- SerialPortsClient.Connect
- SerialPortsClient.Create
- SerialPortsClient.Delete
- SerialPortsClient.Get
- SerialPortsClient.List
- SerialPortsClient.ListBySubscriptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudError ¶
type CloudError struct { // Cloud error body. Error *CloudErrorBody `json:"error,omitempty"` }
CloudError - An error response from the service.
type CloudErrorBody ¶
type CloudErrorBody struct { // An identifier for the error. Codes are invariant and are intended to be consumed programmatically. Code *string `json:"code,omitempty"` // A list of additional details about the error. Details []*CloudErrorBody `json:"details,omitempty"` // A message describing the error, intended to be suitable for display in a user interface. Message *string `json:"message,omitempty"` // The target of the particular error. For example, the name of the property in error. Target *string `json:"target,omitempty"` }
CloudErrorBody - An error response from the Batch service.
type DisableSerialConsoleResult ¶
type DisableSerialConsoleResult struct { // Whether or not Serial Console is disabled. Disabled *bool `json:"disabled,omitempty"` }
DisableSerialConsoleResult - Returns whether or not Serial Console is disabled.
type EnableSerialConsoleResult ¶
type EnableSerialConsoleResult struct { // Whether or not Serial Console is disabled (enabled). Disabled *bool `json:"disabled,omitempty"` }
EnableSerialConsoleResult - Returns whether or not Serial Console is disabled (enabled).
type GetSerialConsoleSubscriptionNotFound ¶
type GetSerialConsoleSubscriptionNotFound struct { // Error code Code *string `json:"code,omitempty"` // Subscription not found message Message *string `json:"message,omitempty"` }
GetSerialConsoleSubscriptionNotFound - Error saying that the provided subscription could not be found
type MicrosoftSerialConsoleClient ¶
type MicrosoftSerialConsoleClient struct {
// contains filtered or unexported fields
}
MicrosoftSerialConsoleClient contains the methods for the MicrosoftSerialConsoleClient group. Don't use this type directly, use NewMicrosoftSerialConsoleClient() instead.
func NewMicrosoftSerialConsoleClient ¶
func NewMicrosoftSerialConsoleClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MicrosoftSerialConsoleClient, error)
NewMicrosoftSerialConsoleClient creates a new instance of MicrosoftSerialConsoleClient with the specified values. subscriptionID - Subscription ID which uniquely identifies the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call requiring it. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*MicrosoftSerialConsoleClient) DisableConsole ¶
func (client *MicrosoftSerialConsoleClient) DisableConsole(ctx context.Context, defaultParam string, options *MicrosoftSerialConsoleClientDisableConsoleOptions) (MicrosoftSerialConsoleClientDisableConsoleResponse, error)
DisableConsole - Disables the Serial Console service for all VMs and VM scale sets in the provided subscription If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-05-01 defaultParam - Default parameter. Leave the value as "default". options - MicrosoftSerialConsoleClientDisableConsoleOptions contains the optional parameters for the MicrosoftSerialConsoleClient.DisableConsole method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/DisableConsoleExamples.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/serialconsole/armserialconsole" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armserialconsole.NewMicrosoftSerialConsoleClient("00000000-00000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.DisableConsole(ctx, "default", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*MicrosoftSerialConsoleClient) EnableConsole ¶
func (client *MicrosoftSerialConsoleClient) EnableConsole(ctx context.Context, defaultParam string, options *MicrosoftSerialConsoleClientEnableConsoleOptions) (MicrosoftSerialConsoleClientEnableConsoleResponse, error)
EnableConsole - Enables the Serial Console service for all VMs and VM scale sets in the provided subscription If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-05-01 defaultParam - Default parameter. Leave the value as "default". options - MicrosoftSerialConsoleClientEnableConsoleOptions contains the optional parameters for the MicrosoftSerialConsoleClient.EnableConsole method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/EnableConsoleExamples.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/serialconsole/armserialconsole" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armserialconsole.NewMicrosoftSerialConsoleClient("00000000-00000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.EnableConsole(ctx, "default", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*MicrosoftSerialConsoleClient) GetConsoleStatus ¶
func (client *MicrosoftSerialConsoleClient) GetConsoleStatus(ctx context.Context, defaultParam string, options *MicrosoftSerialConsoleClientGetConsoleStatusOptions) (MicrosoftSerialConsoleClientGetConsoleStatusResponse, error)
GetConsoleStatus - Gets whether or not Serial Console is disabled for a given subscription If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-05-01 defaultParam - Default parameter. Leave the value as "default". options - MicrosoftSerialConsoleClientGetConsoleStatusOptions contains the optional parameters for the MicrosoftSerialConsoleClient.GetConsoleStatus method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/SerialConsoleStatus.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/serialconsole/armserialconsole" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armserialconsole.NewMicrosoftSerialConsoleClient("00000000-00000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetConsoleStatus(ctx, "default", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*MicrosoftSerialConsoleClient) ListOperations ¶
func (client *MicrosoftSerialConsoleClient) ListOperations(ctx context.Context, options *MicrosoftSerialConsoleClientListOperationsOptions) (MicrosoftSerialConsoleClientListOperationsResponse, error)
ListOperations - Gets a list of Serial Console API operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-05-01 options - MicrosoftSerialConsoleClientListOperationsOptions contains the optional parameters for the MicrosoftSerialConsoleClient.ListOperations method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/GetOperationsExample.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/serialconsole/armserialconsole" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armserialconsole.NewMicrosoftSerialConsoleClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.ListOperations(ctx, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type MicrosoftSerialConsoleClientDisableConsoleOptions ¶
type MicrosoftSerialConsoleClientDisableConsoleOptions struct { }
MicrosoftSerialConsoleClientDisableConsoleOptions contains the optional parameters for the MicrosoftSerialConsoleClient.DisableConsole method.
type MicrosoftSerialConsoleClientDisableConsoleResponse ¶
type MicrosoftSerialConsoleClientDisableConsoleResponse struct {
// // Possible types are DisableSerialConsoleResult, GetSerialConsoleSubscriptionNotFound
Value interface{}
}
MicrosoftSerialConsoleClientDisableConsoleResponse contains the response from method MicrosoftSerialConsoleClient.DisableConsole.
type MicrosoftSerialConsoleClientEnableConsoleOptions ¶
type MicrosoftSerialConsoleClientEnableConsoleOptions struct { }
MicrosoftSerialConsoleClientEnableConsoleOptions contains the optional parameters for the MicrosoftSerialConsoleClient.EnableConsole method.
type MicrosoftSerialConsoleClientEnableConsoleResponse ¶
type MicrosoftSerialConsoleClientEnableConsoleResponse struct {
// // Possible types are EnableSerialConsoleResult, GetSerialConsoleSubscriptionNotFound
Value interface{}
}
MicrosoftSerialConsoleClientEnableConsoleResponse contains the response from method MicrosoftSerialConsoleClient.EnableConsole.
type MicrosoftSerialConsoleClientGetConsoleStatusOptions ¶
type MicrosoftSerialConsoleClientGetConsoleStatusOptions struct { }
MicrosoftSerialConsoleClientGetConsoleStatusOptions contains the optional parameters for the MicrosoftSerialConsoleClient.GetConsoleStatus method.
type MicrosoftSerialConsoleClientGetConsoleStatusResponse ¶
type MicrosoftSerialConsoleClientGetConsoleStatusResponse struct {
// // Possible types are Status, GetSerialConsoleSubscriptionNotFound
Value interface{}
}
MicrosoftSerialConsoleClientGetConsoleStatusResponse contains the response from method MicrosoftSerialConsoleClient.GetConsoleStatus.
type MicrosoftSerialConsoleClientListOperationsOptions ¶
type MicrosoftSerialConsoleClientListOperationsOptions struct { }
MicrosoftSerialConsoleClientListOperationsOptions contains the optional parameters for the MicrosoftSerialConsoleClient.ListOperations method.
type MicrosoftSerialConsoleClientListOperationsResponse ¶
type MicrosoftSerialConsoleClientListOperationsResponse struct {
Operations
}
MicrosoftSerialConsoleClientListOperationsResponse contains the response from method MicrosoftSerialConsoleClient.ListOperations.
type Operations ¶ added in v0.2.0
type Operations struct { // A list of Serial Console operations Value []*OperationsValueItem `json:"value,omitempty"` }
Operations - Serial Console operations
type OperationsValueItem ¶ added in v0.2.0
type OperationsValueItem struct { Display *OperationsValueItemDisplay `json:"display,omitempty"` IsDataAction *string `json:"isDataAction,omitempty"` Name *string `json:"name,omitempty"` }
type OperationsValueItemDisplay ¶ added in v0.2.0
type ProxyResource ¶
type ProxyResource struct { // READ-ONLY; Resource Id ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type Type *string `json:"type,omitempty" azure:"ro"` }
ProxyResource - The resource model definition for a ARM proxy resource. It will have everything other than required location and tags
type Resource ¶
type Resource struct { // READ-ONLY; Resource Id ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type Type *string `json:"type,omitempty" azure:"ro"` }
Resource - The Resource model definition.
type SerialPort ¶
type SerialPort struct { // The properties of the serial port. Properties *SerialPortProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type Type *string `json:"type,omitempty" azure:"ro"` }
SerialPort - Represents the serial port of the parent resource.
type SerialPortConnectResult ¶
type SerialPortConnectResult struct { // Connection string to the serial port of the resource. ConnectionString *string `json:"connectionString,omitempty"` }
SerialPortConnectResult - Returns a connection string to the serial port of the resource.
type SerialPortListResult ¶
type SerialPortListResult struct { // The list of serial ports. Value []*SerialPort `json:"value,omitempty"` }
SerialPortListResult - The list serial ports operation response.
type SerialPortProperties ¶
type SerialPortProperties struct { // Specifies whether the port is enabled for a serial console connection. State *SerialPortState `json:"state,omitempty"` }
SerialPortProperties - The properties of the serial port.
type SerialPortState ¶
type SerialPortState string
SerialPortState - Specifies whether the port is enabled for a serial console connection.
const ( SerialPortStateEnabled SerialPortState = "enabled" SerialPortStateDisabled SerialPortState = "disabled" )
func PossibleSerialPortStateValues ¶
func PossibleSerialPortStateValues() []SerialPortState
PossibleSerialPortStateValues returns the possible values for the SerialPortState const type.
type SerialPortsClient ¶
type SerialPortsClient struct {
// contains filtered or unexported fields
}
SerialPortsClient contains the methods for the SerialPorts group. Don't use this type directly, use NewSerialPortsClient() instead.
func NewSerialPortsClient ¶
func NewSerialPortsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SerialPortsClient, error)
NewSerialPortsClient creates a new instance of SerialPortsClient with the specified values. subscriptionID - Subscription ID which uniquely identifies the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call requiring it. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*SerialPortsClient) Connect ¶
func (client *SerialPortsClient) Connect(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourceType string, parentResource string, serialPort string, options *SerialPortsClientConnectOptions) (SerialPortsClientConnectResponse, error)
Connect - Connect to serial port of the target resource If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-05-01 resourceGroupName - The name of the resource group. resourceProviderNamespace - The namespace of the resource provider. parentResourceType - The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets' parentResource - The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine. serialPort - The name of the serial port to connect to. options - SerialPortsClientConnectOptions contains the optional parameters for the SerialPortsClient.Connect method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/SerialPortConnectVMSS.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/serialconsole/armserialconsole" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armserialconsole.NewSerialPortsClient("00000000-00000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Connect(ctx, "myResourceGroup", "Microsoft.Compute", "virtualMachineScaleSets", "myscaleset/virtualMachines/2", "0", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*SerialPortsClient) Create ¶
func (client *SerialPortsClient) Create(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourceType string, parentResource string, serialPort string, parameters SerialPort, options *SerialPortsClientCreateOptions) (SerialPortsClientCreateResponse, error)
Create - Creates or updates a serial port If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-05-01 resourceGroupName - The name of the resource group. resourceProviderNamespace - The namespace of the resource provider. parentResourceType - The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets' parentResource - The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine. serialPort - The name of the serial port to create. parameters - Parameters supplied to create the serial port. options - SerialPortsClientCreateOptions contains the optional parameters for the SerialPortsClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/CreateSerialPort.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/serialconsole/armserialconsole" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armserialconsole.NewSerialPortsClient("00000000-00000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Create(ctx, "myResourceGroup", "Microsoft.Compute", "virtualMachines", "myVM", "0", armserialconsole.SerialPort{ Properties: &armserialconsole.SerialPortProperties{ State: to.Ptr(armserialconsole.SerialPortStateEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*SerialPortsClient) Delete ¶
func (client *SerialPortsClient) Delete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourceType string, parentResource string, serialPort string, options *SerialPortsClientDeleteOptions) (SerialPortsClientDeleteResponse, error)
Delete - Deletes a serial port If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-05-01 resourceGroupName - The name of the resource group. resourceProviderNamespace - The namespace of the resource provider. parentResourceType - The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets' parentResource - The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine. serialPort - The name of the serial port to delete. options - SerialPortsClientDeleteOptions contains the optional parameters for the SerialPortsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/DeleteSerialPort.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/serialconsole/armserialconsole" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armserialconsole.NewSerialPortsClient("00000000-00000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Delete(ctx, "myResourceGroup", "Microsoft.Compute", "virtualMachines", "myVM", "0", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*SerialPortsClient) Get ¶
func (client *SerialPortsClient) Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourceType string, parentResource string, serialPort string, options *SerialPortsClientGetOptions) (SerialPortsClientGetResponse, error)
Get - Gets the configured settings for a serial port If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-05-01 resourceGroupName - The name of the resource group. resourceProviderNamespace - The namespace of the resource provider. parentResourceType - The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets' parentResource - The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine. serialPort - The name of the serial port to connect to. options - SerialPortsClientGetOptions contains the optional parameters for the SerialPortsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/GetSerialPort.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/serialconsole/armserialconsole" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armserialconsole.NewSerialPortsClient("00000000-00000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "myResourceGroup", "Microsoft.Compute", "virtualMachines", "myVM", "0", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*SerialPortsClient) List ¶
func (client *SerialPortsClient) List(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourceType string, parentResource string, options *SerialPortsClientListOptions) (SerialPortsClientListResponse, error)
List - Lists all of the configured serial ports for a parent resource If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-05-01 resourceGroupName - The name of the resource group. resourceProviderNamespace - The namespace of the resource provider. parentResourceType - The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets' parentResource - The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine. options - SerialPortsClientListOptions contains the optional parameters for the SerialPortsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/ListSerialPort.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/serialconsole/armserialconsole" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armserialconsole.NewSerialPortsClient("00000000-00000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.List(ctx, "myResourceGroup", "Microsoft.Compute", "virtualMachines", "myVM", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*SerialPortsClient) ListBySubscriptions ¶
func (client *SerialPortsClient) ListBySubscriptions(ctx context.Context, options *SerialPortsClientListBySubscriptionsOptions) (SerialPortsClientListBySubscriptionsResponse, error)
ListBySubscriptions - Handles requests to list all SerialPort resources in a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-05-01 options - SerialPortsClientListBySubscriptionsOptions contains the optional parameters for the SerialPortsClient.ListBySubscriptions method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/ListSerialPortSubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/serialconsole/armserialconsole" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armserialconsole.NewSerialPortsClient("00000000-00000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.ListBySubscriptions(ctx, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type SerialPortsClientConnectOptions ¶ added in v0.2.0
type SerialPortsClientConnectOptions struct { }
SerialPortsClientConnectOptions contains the optional parameters for the SerialPortsClient.Connect method.
type SerialPortsClientConnectResponse ¶ added in v0.2.0
type SerialPortsClientConnectResponse struct {
SerialPortConnectResult
}
SerialPortsClientConnectResponse contains the response from method SerialPortsClient.Connect.
type SerialPortsClientCreateOptions ¶ added in v0.2.0
type SerialPortsClientCreateOptions struct { }
SerialPortsClientCreateOptions contains the optional parameters for the SerialPortsClient.Create method.
type SerialPortsClientCreateResponse ¶ added in v0.2.0
type SerialPortsClientCreateResponse struct {
SerialPort
}
SerialPortsClientCreateResponse contains the response from method SerialPortsClient.Create.
type SerialPortsClientDeleteOptions ¶ added in v0.2.0
type SerialPortsClientDeleteOptions struct { }
SerialPortsClientDeleteOptions contains the optional parameters for the SerialPortsClient.Delete method.
type SerialPortsClientDeleteResponse ¶ added in v0.2.0
type SerialPortsClientDeleteResponse struct { }
SerialPortsClientDeleteResponse contains the response from method SerialPortsClient.Delete.
type SerialPortsClientGetOptions ¶ added in v0.2.0
type SerialPortsClientGetOptions struct { }
SerialPortsClientGetOptions contains the optional parameters for the SerialPortsClient.Get method.
type SerialPortsClientGetResponse ¶ added in v0.2.0
type SerialPortsClientGetResponse struct {
SerialPort
}
SerialPortsClientGetResponse contains the response from method SerialPortsClient.Get.
type SerialPortsClientListBySubscriptionsOptions ¶ added in v0.2.0
type SerialPortsClientListBySubscriptionsOptions struct { }
SerialPortsClientListBySubscriptionsOptions contains the optional parameters for the SerialPortsClient.ListBySubscriptions method.
type SerialPortsClientListBySubscriptionsResponse ¶ added in v0.2.0
type SerialPortsClientListBySubscriptionsResponse struct {
SerialPortListResult
}
SerialPortsClientListBySubscriptionsResponse contains the response from method SerialPortsClient.ListBySubscriptions.
type SerialPortsClientListOptions ¶ added in v0.2.0
type SerialPortsClientListOptions struct { }
SerialPortsClientListOptions contains the optional parameters for the SerialPortsClient.List method.
type SerialPortsClientListResponse ¶ added in v0.2.0
type SerialPortsClientListResponse struct {
SerialPortListResult
}
SerialPortsClientListResponse contains the response from method SerialPortsClient.List.