package
0.20240715.1103416
Repository: https://github.com/hashicorp/go-azure-sdk.git
Documentation: pkg.go.dev
# README
github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/bastionhosts
Documentation
The bastionhosts
SDK allows for interaction with the Azure Resource Manager Service network
(API Version 2022-07-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/bastionhosts"
Client Initialization
client := bastionhosts.NewBastionHostsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: BastionHostsClient.CreateOrUpdate
ctx := context.TODO()
id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue")
payload := bastionhosts.BastionHost{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: BastionHostsClient.Delete
ctx := context.TODO()
id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: BastionHostsClient.DeleteBastionShareableLink
ctx := context.TODO()
id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue")
payload := bastionhosts.BastionShareableLinkListRequest{
// ...
}
if err := client.DeleteBastionShareableLinkThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: BastionHostsClient.DisconnectActiveSessions
ctx := context.TODO()
id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue")
payload := bastionhosts.SessionIds{
// ...
}
// alternatively `client.DisconnectActiveSessions(ctx, id, payload)` can be used to do batched pagination
items, err := client.DisconnectActiveSessionsComplete(ctx, id, payload)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: BastionHostsClient.Get
ctx := context.TODO()
id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue")
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: BastionHostsClient.GetActiveSessions
ctx := context.TODO()
id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue")
// alternatively `client.GetActiveSessions(ctx, id)` can be used to do batched pagination
items, err := client.GetActiveSessionsComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: BastionHostsClient.GetBastionShareableLink
ctx := context.TODO()
id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue")
payload := bastionhosts.BastionShareableLinkListRequest{
// ...
}
// alternatively `client.GetBastionShareableLink(ctx, id, payload)` can be used to do batched pagination
items, err := client.GetBastionShareableLinkComplete(ctx, id, payload)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: BastionHostsClient.List
ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")
// 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: BastionHostsClient.ListByResourceGroup
ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")
// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination
items, err := client.ListByResourceGroupComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: BastionHostsClient.PutBastionShareableLink
ctx := context.TODO()
id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue")
payload := bastionhosts.BastionShareableLinkListRequest{
// ...
}
// alternatively `client.PutBastionShareableLink(ctx, id, payload)` can be used to do batched pagination
items, err := client.PutBastionShareableLinkComplete(ctx, id, payload)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: BastionHostsClient.UpdateTags
ctx := context.TODO()
id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue")
payload := bastionhosts.TagsObject{
// ...
}
if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil {
// handle the error
}
# Functions
NewBastionHostID returns a new BastionHostId struct.
No description provided by the author
ParseBastionHostID parses 'input' into a BastionHostId.
ParseBastionHostIDInsensitively parses 'input' case-insensitively into a BastionHostId note: this method should only be used for API response data and not user input.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ValidateBastionHostID checks that 'input' can be parsed as a Bastion Host ID.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
BastionHostId is a struct representing the Resource ID for a Bastion Host.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author