mongorbacs

package
v0.20240327.1133120 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/mongorbacs Documentation

The mongorbacs SDK allows for interaction with the Azure Resource Manager Service cosmosdb (API Version 2023-04-15).

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/cosmosdb/2023-04-15/mongorbacs"

Client Initialization

client := mongorbacs.NewMongorbacsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MongorbacsClient.MongoDBResourcesCreateUpdateMongoRoleDefinition

ctx := context.TODO()
id := mongorbacs.NewMongodbRoleDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue", "mongoRoleDefinitionIdValue")

payload := mongorbacs.MongoRoleDefinitionCreateUpdateParameters{
	// ...
}


if err := client.MongoDBResourcesCreateUpdateMongoRoleDefinitionThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: MongorbacsClient.MongoDBResourcesCreateUpdateMongoUserDefinition

ctx := context.TODO()
id := mongorbacs.NewMongodbUserDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue", "mongoUserDefinitionIdValue")

payload := mongorbacs.MongoUserDefinitionCreateUpdateParameters{
	// ...
}


if err := client.MongoDBResourcesCreateUpdateMongoUserDefinitionThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: MongorbacsClient.MongoDBResourcesDeleteMongoRoleDefinition

ctx := context.TODO()
id := mongorbacs.NewMongodbRoleDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue", "mongoRoleDefinitionIdValue")

if err := client.MongoDBResourcesDeleteMongoRoleDefinitionThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: MongorbacsClient.MongoDBResourcesDeleteMongoUserDefinition

ctx := context.TODO()
id := mongorbacs.NewMongodbUserDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue", "mongoUserDefinitionIdValue")

if err := client.MongoDBResourcesDeleteMongoUserDefinitionThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: MongorbacsClient.MongoDBResourcesGetMongoRoleDefinition

ctx := context.TODO()
id := mongorbacs.NewMongodbRoleDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue", "mongoRoleDefinitionIdValue")

read, err := client.MongoDBResourcesGetMongoRoleDefinition(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: MongorbacsClient.MongoDBResourcesGetMongoUserDefinition

ctx := context.TODO()
id := mongorbacs.NewMongodbUserDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue", "mongoUserDefinitionIdValue")

read, err := client.MongoDBResourcesGetMongoUserDefinition(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: MongorbacsClient.MongoDBResourcesListMongoRoleDefinitions

ctx := context.TODO()
id := mongorbacs.NewDatabaseAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue")

read, err := client.MongoDBResourcesListMongoRoleDefinitions(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: MongorbacsClient.MongoDBResourcesListMongoUserDefinitions

ctx := context.TODO()
id := mongorbacs.NewDatabaseAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue")

read, err := client.MongoDBResourcesListMongoUserDefinitions(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForMongoRoleDefinitionType

func PossibleValuesForMongoRoleDefinitionType() []string

func ValidateDatabaseAccountID

func ValidateDatabaseAccountID(input interface{}, key string) (warnings []string, errors []error)

ValidateDatabaseAccountID checks that 'input' can be parsed as a Database Account ID

func ValidateMongodbRoleDefinitionID

func ValidateMongodbRoleDefinitionID(input interface{}, key string) (warnings []string, errors []error)

ValidateMongodbRoleDefinitionID checks that 'input' can be parsed as a Mongodb Role Definition ID

func ValidateMongodbUserDefinitionID

func ValidateMongodbUserDefinitionID(input interface{}, key string) (warnings []string, errors []error)

ValidateMongodbUserDefinitionID checks that 'input' can be parsed as a Mongodb User Definition ID

Types

type DatabaseAccountId

type DatabaseAccountId struct {
	SubscriptionId      string
	ResourceGroupName   string
	DatabaseAccountName string
}

DatabaseAccountId is a struct representing the Resource ID for a Database Account

func NewDatabaseAccountID

func NewDatabaseAccountID(subscriptionId string, resourceGroupName string, databaseAccountName string) DatabaseAccountId

NewDatabaseAccountID returns a new DatabaseAccountId struct

func ParseDatabaseAccountID

func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error)

ParseDatabaseAccountID parses 'input' into a DatabaseAccountId

func ParseDatabaseAccountIDInsensitively

func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, error)

ParseDatabaseAccountIDInsensitively parses 'input' case-insensitively into a DatabaseAccountId note: this method should only be used for API response data and not user input

func (*DatabaseAccountId) FromParseResult

func (id *DatabaseAccountId) FromParseResult(input resourceids.ParseResult) error

func (DatabaseAccountId) ID

func (id DatabaseAccountId) ID() string

ID returns the formatted Database Account ID

func (DatabaseAccountId) Segments

func (id DatabaseAccountId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Database Account ID

func (DatabaseAccountId) String

func (id DatabaseAccountId) String() string

String returns a human-readable description of this Database Account ID

type MongoDBResourcesCreateUpdateMongoRoleDefinitionOperationResponse

type MongoDBResourcesCreateUpdateMongoRoleDefinitionOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MongoRoleDefinitionGetResults
}

type MongoDBResourcesCreateUpdateMongoUserDefinitionOperationResponse

type MongoDBResourcesCreateUpdateMongoUserDefinitionOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MongoUserDefinitionGetResults
}

type MongoDBResourcesDeleteMongoRoleDefinitionOperationResponse

type MongoDBResourcesDeleteMongoRoleDefinitionOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type MongoDBResourcesDeleteMongoUserDefinitionOperationResponse

type MongoDBResourcesDeleteMongoUserDefinitionOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type MongoDBResourcesGetMongoRoleDefinitionOperationResponse

type MongoDBResourcesGetMongoRoleDefinitionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MongoRoleDefinitionGetResults
}

type MongoDBResourcesGetMongoUserDefinitionOperationResponse

type MongoDBResourcesGetMongoUserDefinitionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MongoUserDefinitionGetResults
}

type MongoDBResourcesListMongoRoleDefinitionsOperationResponse

type MongoDBResourcesListMongoRoleDefinitionsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MongoRoleDefinitionListResult
}

type MongoDBResourcesListMongoUserDefinitionsOperationResponse

type MongoDBResourcesListMongoUserDefinitionsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MongoUserDefinitionListResult
}

type MongoRoleDefinitionCreateUpdateParameters

type MongoRoleDefinitionCreateUpdateParameters struct {
	Properties *MongoRoleDefinitionResource `json:"properties,omitempty"`
}

type MongoRoleDefinitionGetResults

type MongoRoleDefinitionGetResults struct {
	Id         *string                      `json:"id,omitempty"`
	Name       *string                      `json:"name,omitempty"`
	Properties *MongoRoleDefinitionResource `json:"properties,omitempty"`
	Type       *string                      `json:"type,omitempty"`
}

type MongoRoleDefinitionListResult

type MongoRoleDefinitionListResult struct {
	Value *[]MongoRoleDefinitionGetResults `json:"value,omitempty"`
}

type MongoRoleDefinitionResource

type MongoRoleDefinitionResource struct {
	DatabaseName *string                  `json:"databaseName,omitempty"`
	Privileges   *[]Privilege             `json:"privileges,omitempty"`
	RoleName     *string                  `json:"roleName,omitempty"`
	Roles        *[]Role                  `json:"roles,omitempty"`
	Type         *MongoRoleDefinitionType `json:"type,omitempty"`
}

type MongoRoleDefinitionType

type MongoRoleDefinitionType string
const (
	MongoRoleDefinitionTypeBuiltInRole MongoRoleDefinitionType = "BuiltInRole"
	MongoRoleDefinitionTypeCustomRole  MongoRoleDefinitionType = "CustomRole"
)

func (*MongoRoleDefinitionType) UnmarshalJSON added in v0.20240306.1111727

func (s *MongoRoleDefinitionType) UnmarshalJSON(bytes []byte) error

type MongoUserDefinitionCreateUpdateParameters

type MongoUserDefinitionCreateUpdateParameters struct {
	Properties *MongoUserDefinitionResource `json:"properties,omitempty"`
}

type MongoUserDefinitionGetResults

type MongoUserDefinitionGetResults struct {
	Id         *string                      `json:"id,omitempty"`
	Name       *string                      `json:"name,omitempty"`
	Properties *MongoUserDefinitionResource `json:"properties,omitempty"`
	Type       *string                      `json:"type,omitempty"`
}

type MongoUserDefinitionListResult

type MongoUserDefinitionListResult struct {
	Value *[]MongoUserDefinitionGetResults `json:"value,omitempty"`
}

type MongoUserDefinitionResource

type MongoUserDefinitionResource struct {
	CustomData   *string `json:"customData,omitempty"`
	DatabaseName *string `json:"databaseName,omitempty"`
	Mechanisms   *string `json:"mechanisms,omitempty"`
	Password     *string `json:"password,omitempty"`
	Roles        *[]Role `json:"roles,omitempty"`
	UserName     *string `json:"userName,omitempty"`
}

type MongodbRoleDefinitionId

type MongodbRoleDefinitionId struct {
	SubscriptionId        string
	ResourceGroupName     string
	DatabaseAccountName   string
	MongoRoleDefinitionId string
}

MongodbRoleDefinitionId is a struct representing the Resource ID for a Mongodb Role Definition

func NewMongodbRoleDefinitionID

func NewMongodbRoleDefinitionID(subscriptionId string, resourceGroupName string, databaseAccountName string, mongoRoleDefinitionId string) MongodbRoleDefinitionId

NewMongodbRoleDefinitionID returns a new MongodbRoleDefinitionId struct

func ParseMongodbRoleDefinitionID

func ParseMongodbRoleDefinitionID(input string) (*MongodbRoleDefinitionId, error)

ParseMongodbRoleDefinitionID parses 'input' into a MongodbRoleDefinitionId

func ParseMongodbRoleDefinitionIDInsensitively

func ParseMongodbRoleDefinitionIDInsensitively(input string) (*MongodbRoleDefinitionId, error)

ParseMongodbRoleDefinitionIDInsensitively parses 'input' case-insensitively into a MongodbRoleDefinitionId note: this method should only be used for API response data and not user input

func (*MongodbRoleDefinitionId) FromParseResult

func (id *MongodbRoleDefinitionId) FromParseResult(input resourceids.ParseResult) error

func (MongodbRoleDefinitionId) ID

ID returns the formatted Mongodb Role Definition ID

func (MongodbRoleDefinitionId) Segments

Segments returns a slice of Resource ID Segments which comprise this Mongodb Role Definition ID

func (MongodbRoleDefinitionId) String

func (id MongodbRoleDefinitionId) String() string

String returns a human-readable description of this Mongodb Role Definition ID

type MongodbUserDefinitionId

type MongodbUserDefinitionId struct {
	SubscriptionId        string
	ResourceGroupName     string
	DatabaseAccountName   string
	MongoUserDefinitionId string
}

MongodbUserDefinitionId is a struct representing the Resource ID for a Mongodb User Definition

func NewMongodbUserDefinitionID

func NewMongodbUserDefinitionID(subscriptionId string, resourceGroupName string, databaseAccountName string, mongoUserDefinitionId string) MongodbUserDefinitionId

NewMongodbUserDefinitionID returns a new MongodbUserDefinitionId struct

func ParseMongodbUserDefinitionID

func ParseMongodbUserDefinitionID(input string) (*MongodbUserDefinitionId, error)

ParseMongodbUserDefinitionID parses 'input' into a MongodbUserDefinitionId

func ParseMongodbUserDefinitionIDInsensitively

func ParseMongodbUserDefinitionIDInsensitively(input string) (*MongodbUserDefinitionId, error)

ParseMongodbUserDefinitionIDInsensitively parses 'input' case-insensitively into a MongodbUserDefinitionId note: this method should only be used for API response data and not user input

func (*MongodbUserDefinitionId) FromParseResult

func (id *MongodbUserDefinitionId) FromParseResult(input resourceids.ParseResult) error

func (MongodbUserDefinitionId) ID

ID returns the formatted Mongodb User Definition ID

func (MongodbUserDefinitionId) Segments

Segments returns a slice of Resource ID Segments which comprise this Mongodb User Definition ID

func (MongodbUserDefinitionId) String

func (id MongodbUserDefinitionId) String() string

String returns a human-readable description of this Mongodb User Definition ID

type MongorbacsClient

type MongorbacsClient struct {
	Client *resourcemanager.Client
}

func NewMongorbacsClientWithBaseURI

func NewMongorbacsClientWithBaseURI(sdkApi sdkEnv.Api) (*MongorbacsClient, error)

func (MongorbacsClient) MongoDBResourcesCreateUpdateMongoRoleDefinition

MongoDBResourcesCreateUpdateMongoRoleDefinition ...

func (MongorbacsClient) MongoDBResourcesCreateUpdateMongoRoleDefinitionThenPoll

func (c MongorbacsClient) MongoDBResourcesCreateUpdateMongoRoleDefinitionThenPoll(ctx context.Context, id MongodbRoleDefinitionId, input MongoRoleDefinitionCreateUpdateParameters) error

MongoDBResourcesCreateUpdateMongoRoleDefinitionThenPoll performs MongoDBResourcesCreateUpdateMongoRoleDefinition then polls until it's completed

func (MongorbacsClient) MongoDBResourcesCreateUpdateMongoUserDefinition

MongoDBResourcesCreateUpdateMongoUserDefinition ...

func (MongorbacsClient) MongoDBResourcesCreateUpdateMongoUserDefinitionThenPoll

func (c MongorbacsClient) MongoDBResourcesCreateUpdateMongoUserDefinitionThenPoll(ctx context.Context, id MongodbUserDefinitionId, input MongoUserDefinitionCreateUpdateParameters) error

MongoDBResourcesCreateUpdateMongoUserDefinitionThenPoll performs MongoDBResourcesCreateUpdateMongoUserDefinition then polls until it's completed

func (MongorbacsClient) MongoDBResourcesDeleteMongoRoleDefinition

func (c MongorbacsClient) MongoDBResourcesDeleteMongoRoleDefinition(ctx context.Context, id MongodbRoleDefinitionId) (result MongoDBResourcesDeleteMongoRoleDefinitionOperationResponse, err error)

MongoDBResourcesDeleteMongoRoleDefinition ...

func (MongorbacsClient) MongoDBResourcesDeleteMongoRoleDefinitionThenPoll

func (c MongorbacsClient) MongoDBResourcesDeleteMongoRoleDefinitionThenPoll(ctx context.Context, id MongodbRoleDefinitionId) error

MongoDBResourcesDeleteMongoRoleDefinitionThenPoll performs MongoDBResourcesDeleteMongoRoleDefinition then polls until it's completed

func (MongorbacsClient) MongoDBResourcesDeleteMongoUserDefinition

func (c MongorbacsClient) MongoDBResourcesDeleteMongoUserDefinition(ctx context.Context, id MongodbUserDefinitionId) (result MongoDBResourcesDeleteMongoUserDefinitionOperationResponse, err error)

MongoDBResourcesDeleteMongoUserDefinition ...

func (MongorbacsClient) MongoDBResourcesDeleteMongoUserDefinitionThenPoll

func (c MongorbacsClient) MongoDBResourcesDeleteMongoUserDefinitionThenPoll(ctx context.Context, id MongodbUserDefinitionId) error

MongoDBResourcesDeleteMongoUserDefinitionThenPoll performs MongoDBResourcesDeleteMongoUserDefinition then polls until it's completed

func (MongorbacsClient) MongoDBResourcesGetMongoRoleDefinition

func (c MongorbacsClient) MongoDBResourcesGetMongoRoleDefinition(ctx context.Context, id MongodbRoleDefinitionId) (result MongoDBResourcesGetMongoRoleDefinitionOperationResponse, err error)

MongoDBResourcesGetMongoRoleDefinition ...

func (MongorbacsClient) MongoDBResourcesGetMongoUserDefinition

func (c MongorbacsClient) MongoDBResourcesGetMongoUserDefinition(ctx context.Context, id MongodbUserDefinitionId) (result MongoDBResourcesGetMongoUserDefinitionOperationResponse, err error)

MongoDBResourcesGetMongoUserDefinition ...

func (MongorbacsClient) MongoDBResourcesListMongoRoleDefinitions

func (c MongorbacsClient) MongoDBResourcesListMongoRoleDefinitions(ctx context.Context, id DatabaseAccountId) (result MongoDBResourcesListMongoRoleDefinitionsOperationResponse, err error)

MongoDBResourcesListMongoRoleDefinitions ...

func (MongorbacsClient) MongoDBResourcesListMongoUserDefinitions

func (c MongorbacsClient) MongoDBResourcesListMongoUserDefinitions(ctx context.Context, id DatabaseAccountId) (result MongoDBResourcesListMongoUserDefinitionsOperationResponse, err error)

MongoDBResourcesListMongoUserDefinitions ...

type Privilege

type Privilege struct {
	Actions  *[]string          `json:"actions,omitempty"`
	Resource *PrivilegeResource `json:"resource,omitempty"`
}

type PrivilegeResource

type PrivilegeResource struct {
	Collection *string `json:"collection,omitempty"`
	Db         *string `json:"db,omitempty"`
}

type Role

type Role struct {
	Db   *string `json:"db,omitempty"`
	Role *string `json:"role,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL