Documentation ¶
Index ¶
- type Client
- func (client *Client) GetSetting(ctx context.Context, settingName string, options *GetSettingOptions) (GetSettingResponse, error)
- func (client *Client) GetSettings(ctx context.Context, options *GetSettingsOptions) (GetSettingsResponse, error)
- func (client *Client) UpdateSetting(ctx context.Context, settingName string, parameters UpdateSettingRequest, ...) (UpdateSettingResponse, error)
- type ClientOptions
- type GetSettingOptions
- type GetSettingResponse
- type GetSettingsOptions
- type GetSettingsResponse
- type ListResult
- type Setting
- type SettingType
- type UpdateSettingOptions
- type UpdateSettingRequest
- type UpdateSettingResponse
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client contains the methods for the Client group. Don't use this type directly, use a constructor function instead.
func NewClient ¶
func NewClient(vaultURL string, credential azcore.TokenCredential, options *ClientOptions) (*Client, error)
NewClient creates a client that provides methods to update, get, and list settings for a Managed HSM. You should validate that vaultURL references a valid Managed HSM. See https://aka.ms/azsdk/blog/vault-uri for details.
Example ¶
package main import ( "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azadmin/settings" ) func main() { vaultURL := "https://<TODO: your vault name>.managedhsm.azure.net/" cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { // TODO: handle error } client, err := settings.NewClient(vaultURL, cred, nil) if err != nil { // TODO: handle error } _ = client }
Output:
func (*Client) GetSetting ¶
func (client *Client) GetSetting(ctx context.Context, settingName string, options *GetSettingOptions) (GetSettingResponse, error)
GetSetting - Retrieves the setting object of a specified setting name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 7.5
- settingName - The name of the account setting. Must be a valid settings option.
- options - GetSettingOptions contains the optional parameters for the Client.GetSetting method.
Example ¶
package main import ( "context" "fmt" "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azadmin/settings" ) var client settings.Client func main() { name := "AllowKeyManagementOperationsThroughARM" setting, err := client.GetSetting(context.TODO(), name, nil) if err != nil { // TODO: handle error } fmt.Printf("Setting Name: %s\tSetting Value: %s", *setting.Name, *setting.Value) }
Output:
func (*Client) GetSettings ¶
func (client *Client) GetSettings(ctx context.Context, options *GetSettingsOptions) (GetSettingsResponse, error)
GetSettings - Retrieves a list of all the available account settings that can be configured. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 7.5
- options - GetSettingsOptions contains the optional parameters for the Client.GetSettings method.
Example ¶
package main import ( "context" "fmt" "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azadmin/settings" ) var client settings.Client func main() { settings, err := client.GetSettings(context.TODO(), nil) if err != nil { // TODO: handle error } for _, setting := range settings.Settings { fmt.Printf("Setting Name: %s\tSetting Value: %s", *setting.Name, *setting.Value) } }
Output:
func (*Client) UpdateSetting ¶
func (client *Client) UpdateSetting(ctx context.Context, settingName string, parameters UpdateSettingRequest, options *UpdateSettingOptions) (UpdateSettingResponse, error)
UpdateSetting - Description of the pool setting to be updated If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 7.5
- settingName - The name of the account setting. Must be a valid settings option.
- parameters - The parameters to update an account setting.
- options - UpdateSettingOptions contains the optional parameters for the Client.UpdateSetting method.
Example ¶
package main import ( "context" "fmt" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azadmin/settings" ) var client settings.Client func main() { name := "AllowKeyManagementOperationsThroughARM" parameters := settings.UpdateSettingRequest{Value: to.Ptr("true")} updatedSetting, err := client.UpdateSetting(context.TODO(), name, parameters, nil) if err != nil { // TODO: handle error } fmt.Printf("Setting Name: %s\tSetting Value: %s", *updatedSetting.Name, *updatedSetting.Value) }
Output:
type ClientOptions ¶
type ClientOptions struct { azcore.ClientOptions // DisableChallengeResourceVerification controls whether the policy requires the // authentication challenge resource to match the Key Vault or Managed HSM domain. // See https://aka.ms/azsdk/blog/vault-uri for more information. DisableChallengeResourceVerification bool }
ClientOptions contains optional settings for Client.
type GetSettingOptions ¶
type GetSettingOptions struct { }
GetSettingOptions contains the optional parameters for the Client.GetSetting method.
type GetSettingResponse ¶
type GetSettingResponse struct { // A Key Vault setting. Setting }
GetSettingResponse contains the response from method Client.GetSetting.
type GetSettingsOptions ¶
type GetSettingsOptions struct { }
GetSettingsOptions contains the optional parameters for the Client.GetSettings method.
type GetSettingsResponse ¶
type GetSettingsResponse struct { // The settings list result. ListResult }
GetSettingsResponse contains the response from method Client.GetSettings.
type ListResult ¶
type ListResult struct { // READ-ONLY; A response message containing a list of account settings with their associated value. Settings []*Setting }
ListResult - The settings list result.
func (ListResult) MarshalJSON ¶
func (l ListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListResult.
func (*ListResult) UnmarshalJSON ¶
func (l *ListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ListResult.
type Setting ¶
type Setting struct { // REQUIRED; The account setting to be updated Name *string // REQUIRED; The value of the pool setting. Value *string // The type specifier of the value. Type *SettingType }
Setting - A Key Vault setting.
func (Setting) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Setting.
func (*Setting) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Setting.
type SettingType ¶
type SettingType string
SettingType - The type specifier of the value.
const (
SettingTypeBoolean SettingType = "boolean"
)
func PossibleSettingTypeValues ¶
func PossibleSettingTypeValues() []SettingType
PossibleSettingTypeValues returns the possible values for the SettingType const type.
type UpdateSettingOptions ¶
type UpdateSettingOptions struct { }
UpdateSettingOptions contains the optional parameters for the Client.UpdateSetting method.
type UpdateSettingRequest ¶
type UpdateSettingRequest struct { // REQUIRED; The value of the pool setting. Value *string }
UpdateSettingRequest - The update settings request object.
func (UpdateSettingRequest) MarshalJSON ¶
func (u UpdateSettingRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateSettingRequest.
func (*UpdateSettingRequest) UnmarshalJSON ¶
func (u *UpdateSettingRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateSettingRequest.
type UpdateSettingResponse ¶
type UpdateSettingResponse struct { // A Key Vault setting. Setting }
UpdateSettingResponse contains the response from method Client.UpdateSetting.