department

package
v0.20240710.1075622 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/department Documentation

The department SDK allows for interaction with the Azure Resource Manager Service billing (API Version 2024-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/billing/2024-04-01/department"

Client Initialization

client := department.NewDepartmentClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DepartmentClient.Get

ctx := context.TODO()
id := department.NewDepartmentID("billingAccountValue", "departmentValue")

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: DepartmentClient.ListByBillingAccount

ctx := context.TODO()
id := department.NewBillingAccountID("billingAccountValue")

// alternatively `client.ListByBillingAccount(ctx, id, department.DefaultListByBillingAccountOperationOptions())` can be used to do batched pagination
items, err := client.ListByBillingAccountComplete(ctx, id, department.DefaultListByBillingAccountOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateBillingAccountID

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

ValidateBillingAccountID checks that 'input' can be parsed as a Billing Account ID

func ValidateDepartmentID

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

ValidateDepartmentID checks that 'input' can be parsed as a Department ID

Types

type BillingAccountId

type BillingAccountId struct {
	BillingAccountName string
}

BillingAccountId is a struct representing the Resource ID for a Billing Account

func NewBillingAccountID

func NewBillingAccountID(billingAccountName string) BillingAccountId

NewBillingAccountID returns a new BillingAccountId struct

func ParseBillingAccountID

func ParseBillingAccountID(input string) (*BillingAccountId, error)

ParseBillingAccountID parses 'input' into a BillingAccountId

func ParseBillingAccountIDInsensitively

func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error)

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

func (*BillingAccountId) FromParseResult

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

func (BillingAccountId) ID

func (id BillingAccountId) ID() string

ID returns the formatted Billing Account ID

func (BillingAccountId) Segments

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

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

func (BillingAccountId) String

func (id BillingAccountId) String() string

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

type Department

type Department struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *DepartmentProperties  `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type DepartmentClient

type DepartmentClient struct {
	Client *resourcemanager.Client
}

func NewDepartmentClientWithBaseURI

func NewDepartmentClientWithBaseURI(sdkApi sdkEnv.Api) (*DepartmentClient, error)

func (DepartmentClient) Get

Get ...

func (DepartmentClient) ListByBillingAccount

ListByBillingAccount ...

func (DepartmentClient) ListByBillingAccountComplete

ListByBillingAccountComplete retrieves all the results into a single object

func (DepartmentClient) ListByBillingAccountCompleteMatchingPredicate

func (c DepartmentClient) ListByBillingAccountCompleteMatchingPredicate(ctx context.Context, id BillingAccountId, options ListByBillingAccountOperationOptions, predicate DepartmentOperationPredicate) (result ListByBillingAccountCompleteResult, err error)

ListByBillingAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate

type DepartmentId

type DepartmentId struct {
	BillingAccountName string
	DepartmentName     string
}

DepartmentId is a struct representing the Resource ID for a Department

func NewDepartmentID

func NewDepartmentID(billingAccountName string, departmentName string) DepartmentId

NewDepartmentID returns a new DepartmentId struct

func ParseDepartmentID

func ParseDepartmentID(input string) (*DepartmentId, error)

ParseDepartmentID parses 'input' into a DepartmentId

func ParseDepartmentIDInsensitively

func ParseDepartmentIDInsensitively(input string) (*DepartmentId, error)

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

func (*DepartmentId) FromParseResult

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

func (DepartmentId) ID

func (id DepartmentId) ID() string

ID returns the formatted Department ID

func (DepartmentId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Department ID

func (DepartmentId) String

func (id DepartmentId) String() string

String returns a human-readable description of this Department ID

type DepartmentOperationPredicate

type DepartmentOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (DepartmentOperationPredicate) Matches

func (p DepartmentOperationPredicate) Matches(input Department) bool

type DepartmentProperties

type DepartmentProperties struct {
	CostCenter  *string `json:"costCenter,omitempty"`
	DisplayName *string `json:"displayName,omitempty"`
	Id          *string `json:"id,omitempty"`
	Status      *string `json:"status,omitempty"`
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Department
}

type ListByBillingAccountCompleteResult

type ListByBillingAccountCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Department
}

type ListByBillingAccountCustomPager added in v0.20240628.1153531

type ListByBillingAccountCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByBillingAccountCustomPager) NextPageLink() *odata.Link

type ListByBillingAccountOperationOptions

type ListByBillingAccountOperationOptions struct {
	Filter  *string
	OrderBy *string
	Search  *string
	Skip    *int64
	Top     *int64
}

func DefaultListByBillingAccountOperationOptions

func DefaultListByBillingAccountOperationOptions() ListByBillingAccountOperationOptions

func (ListByBillingAccountOperationOptions) ToHeaders

func (ListByBillingAccountOperationOptions) ToOData

func (ListByBillingAccountOperationOptions) ToQuery

type ListByBillingAccountOperationResponse

type ListByBillingAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Department
}

Jump to

Keyboard shortcuts

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