Documentation
¶
Index ¶
- type CostQuote
- type CostQuoteUpdate
- type CostQuoteUpdateAfter
- type CostQuoteUpdateAfterUsageDimension
- type CostQuoteUpdateBefore
- type CostQuoteUpdateBeforeUsageDimension
- type CostQuoteUpdateDiff
- type CostQuoteUpdateDiffUsageDimension
- type CostQuoteUpdateDiffUsageDimensionAfter
- type CostQuoteUpdateDiffUsageDimensionBefore
- type CostQuoteUsageDimension
- type Pagination
- type RegionName
- type ResourceStatus
- type SourceIPRuleParam
- type SourceIPRuleResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CostQuote ¶ added in v1.88.6
type CostQuote struct {
// Currency the quote is denominated in. Always "USD" in v1.
Currency string `json:"currency" api:"required"`
// Arbitrary-precision decimal serialized as a string (e.g. "58.40").
MonthlyTotal string `json:"monthly_total" api:"required" format:"decimal"`
// Timestamp the quote was priced at.
PricedAt time.Time `json:"priced_at" api:"required" format:"date-time"`
// Priced rows, one per usage dimension emitted by the resource.
UsageDimensions []CostQuoteUsageDimension `json:"usage_dimensions" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Currency respjson.Field
MonthlyTotal respjson.Field
PricedAt respjson.Field
UsageDimensions respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Cost quote returned by POST /cost.
func (*CostQuote) UnmarshalJSON ¶ added in v1.88.6
type CostQuoteUpdate ¶ added in v1.88.6
type CostQuoteUpdate struct {
// Quote for the proposed (post-update) resource state.
After CostQuoteUpdateAfter `json:"after" api:"required"`
// Quote for the proposed (post-update) resource state.
Before CostQuoteUpdateBefore `json:"before" api:"required"`
// Currency the quote is denominated in. Always "USD" in v1.
Currency string `json:"currency" api:"required"`
// Per-dimension and total deltas: after minus before.
Diff CostQuoteUpdateDiff `json:"diff" api:"required"`
// Timestamp the quote was priced at.
PricedAt time.Time `json:"priced_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
After respjson.Field
Before respjson.Field
Currency respjson.Field
Diff respjson.Field
PricedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Cost quote returned by PATCH /:id/cost: the current-state quote, the post-update quote, and the signed diff.
func (CostQuoteUpdate) RawJSON ¶ added in v1.88.6
func (r CostQuoteUpdate) RawJSON() string
Returns the unmodified JSON received from the API
func (*CostQuoteUpdate) UnmarshalJSON ¶ added in v1.88.6
func (r *CostQuoteUpdate) UnmarshalJSON(data []byte) error
type CostQuoteUpdateAfter ¶ added in v1.88.6
type CostQuoteUpdateAfter struct {
// Arbitrary-precision decimal serialized as a string (e.g. "58.40").
MonthlyTotal string `json:"monthly_total" api:"required" format:"decimal"`
// Priced rows, one per usage dimension emitted by the resource.
UsageDimensions []CostQuoteUpdateAfterUsageDimension `json:"usage_dimensions" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MonthlyTotal respjson.Field
UsageDimensions respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Quote for the proposed (post-update) resource state.
func (CostQuoteUpdateAfter) RawJSON ¶ added in v1.88.6
func (r CostQuoteUpdateAfter) RawJSON() string
Returns the unmodified JSON received from the API
func (*CostQuoteUpdateAfter) UnmarshalJSON ¶ added in v1.88.6
func (r *CostQuoteUpdateAfter) UnmarshalJSON(data []byte) error
type CostQuoteUpdateAfterUsageDimension ¶ added in v1.88.6
type CostQuoteUpdateAfterUsageDimension struct {
// Usage dimension being priced (e.g. compute_vcpu, storage_abs_gb).
Dimension string `json:"dimension" api:"required"`
// User-facing label for the dimension (e.g. "vCPU (hours)").
DimensionDisplayName string `json:"dimension_display_name" api:"required"`
// Arbitrary-precision decimal serialized as a string (e.g. "58.40").
MonthlyAmount string `json:"monthly_amount" api:"required" format:"decimal"`
// Quantity of the dimension being priced.
Quantity int64 `json:"quantity" api:"required"`
// Arbitrary-precision decimal serialized as a string (e.g. "58.40").
UnitPrice string `json:"unit_price" api:"required" format:"decimal"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Dimension respjson.Field
DimensionDisplayName respjson.Field
MonthlyAmount respjson.Field
Quantity respjson.Field
UnitPrice respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Priced row for a single usage dimension emitted by a resource.
func (CostQuoteUpdateAfterUsageDimension) RawJSON ¶ added in v1.88.6
func (r CostQuoteUpdateAfterUsageDimension) RawJSON() string
Returns the unmodified JSON received from the API
func (*CostQuoteUpdateAfterUsageDimension) UnmarshalJSON ¶ added in v1.88.6
func (r *CostQuoteUpdateAfterUsageDimension) UnmarshalJSON(data []byte) error
type CostQuoteUpdateBefore ¶ added in v1.88.6
type CostQuoteUpdateBefore struct {
// Arbitrary-precision decimal serialized as a string (e.g. "58.40").
MonthlyTotal string `json:"monthly_total" api:"required" format:"decimal"`
// Priced rows, one per usage dimension emitted by the resource.
UsageDimensions []CostQuoteUpdateBeforeUsageDimension `json:"usage_dimensions" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MonthlyTotal respjson.Field
UsageDimensions respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Quote for the proposed (post-update) resource state.
func (CostQuoteUpdateBefore) RawJSON ¶ added in v1.88.6
func (r CostQuoteUpdateBefore) RawJSON() string
Returns the unmodified JSON received from the API
func (*CostQuoteUpdateBefore) UnmarshalJSON ¶ added in v1.88.6
func (r *CostQuoteUpdateBefore) UnmarshalJSON(data []byte) error
type CostQuoteUpdateBeforeUsageDimension ¶ added in v1.88.6
type CostQuoteUpdateBeforeUsageDimension struct {
// Usage dimension being priced (e.g. compute_vcpu, storage_abs_gb).
Dimension string `json:"dimension" api:"required"`
// User-facing label for the dimension (e.g. "vCPU (hours)").
DimensionDisplayName string `json:"dimension_display_name" api:"required"`
// Arbitrary-precision decimal serialized as a string (e.g. "58.40").
MonthlyAmount string `json:"monthly_amount" api:"required" format:"decimal"`
// Quantity of the dimension being priced.
Quantity int64 `json:"quantity" api:"required"`
// Arbitrary-precision decimal serialized as a string (e.g. "58.40").
UnitPrice string `json:"unit_price" api:"required" format:"decimal"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Dimension respjson.Field
DimensionDisplayName respjson.Field
MonthlyAmount respjson.Field
Quantity respjson.Field
UnitPrice respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Priced row for a single usage dimension emitted by a resource.
func (CostQuoteUpdateBeforeUsageDimension) RawJSON ¶ added in v1.88.6
func (r CostQuoteUpdateBeforeUsageDimension) RawJSON() string
Returns the unmodified JSON received from the API
func (*CostQuoteUpdateBeforeUsageDimension) UnmarshalJSON ¶ added in v1.88.6
func (r *CostQuoteUpdateBeforeUsageDimension) UnmarshalJSON(data []byte) error
type CostQuoteUpdateDiff ¶ added in v1.88.6
type CostQuoteUpdateDiff struct {
// Arbitrary-precision decimal serialized as a string (e.g. "58.40").
MonthlyTotalDelta string `json:"monthly_total_delta" api:"required" format:"decimal"`
// Per-dimension diff entries. Includes every dimension touched by the update.
UsageDimensions []CostQuoteUpdateDiffUsageDimension `json:"usage_dimensions" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MonthlyTotalDelta respjson.Field
UsageDimensions respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Per-dimension and total deltas: after minus before.
func (CostQuoteUpdateDiff) RawJSON ¶ added in v1.88.6
func (r CostQuoteUpdateDiff) RawJSON() string
Returns the unmodified JSON received from the API
func (*CostQuoteUpdateDiff) UnmarshalJSON ¶ added in v1.88.6
func (r *CostQuoteUpdateDiff) UnmarshalJSON(data []byte) error
type CostQuoteUpdateDiffUsageDimension ¶ added in v1.88.6
type CostQuoteUpdateDiffUsageDimension struct {
// Priced row after the update. Always present.
After CostQuoteUpdateDiffUsageDimensionAfter `json:"after" api:"required"`
// Priced row after the update. Always present.
Before CostQuoteUpdateDiffUsageDimensionBefore `json:"before" api:"required"`
// Usage dimension being priced (e.g. compute_vcpu, storage_abs_gb).
Dimension string `json:"dimension" api:"required"`
// User-facing label for the dimension (e.g. "vCPU (hours)").
DimensionDisplayName string `json:"dimension_display_name" api:"required"`
// Arbitrary-precision decimal serialized as a string (e.g. "58.40").
MonthlyAmountDelta string `json:"monthly_amount_delta" api:"required" format:"decimal"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
After respjson.Field
Before respjson.Field
Dimension respjson.Field
DimensionDisplayName respjson.Field
MonthlyAmountDelta respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Per-dimension diff entry. Both before and after are always present.
func (CostQuoteUpdateDiffUsageDimension) RawJSON ¶ added in v1.88.6
func (r CostQuoteUpdateDiffUsageDimension) RawJSON() string
Returns the unmodified JSON received from the API
func (*CostQuoteUpdateDiffUsageDimension) UnmarshalJSON ¶ added in v1.88.6
func (r *CostQuoteUpdateDiffUsageDimension) UnmarshalJSON(data []byte) error
type CostQuoteUpdateDiffUsageDimensionAfter ¶ added in v1.88.6
type CostQuoteUpdateDiffUsageDimensionAfter struct {
// Arbitrary-precision decimal serialized as a string (e.g. "58.40").
MonthlyAmount string `json:"monthly_amount" api:"required" format:"decimal"`
Quantity int64 `json:"quantity" api:"required"`
// Arbitrary-precision decimal serialized as a string (e.g. "58.40").
UnitPrice string `json:"unit_price" api:"required" format:"decimal"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MonthlyAmount respjson.Field
Quantity respjson.Field
UnitPrice respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Priced row after the update. Always present.
func (CostQuoteUpdateDiffUsageDimensionAfter) RawJSON ¶ added in v1.88.6
func (r CostQuoteUpdateDiffUsageDimensionAfter) RawJSON() string
Returns the unmodified JSON received from the API
func (*CostQuoteUpdateDiffUsageDimensionAfter) UnmarshalJSON ¶ added in v1.88.6
func (r *CostQuoteUpdateDiffUsageDimensionAfter) UnmarshalJSON(data []byte) error
type CostQuoteUpdateDiffUsageDimensionBefore ¶ added in v1.88.6
type CostQuoteUpdateDiffUsageDimensionBefore struct {
// Arbitrary-precision decimal serialized as a string (e.g. "58.40").
MonthlyAmount string `json:"monthly_amount" api:"required" format:"decimal"`
Quantity int64 `json:"quantity" api:"required"`
// Arbitrary-precision decimal serialized as a string (e.g. "58.40").
UnitPrice string `json:"unit_price" api:"required" format:"decimal"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MonthlyAmount respjson.Field
Quantity respjson.Field
UnitPrice respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Priced row after the update. Always present.
func (CostQuoteUpdateDiffUsageDimensionBefore) RawJSON ¶ added in v1.88.6
func (r CostQuoteUpdateDiffUsageDimensionBefore) RawJSON() string
Returns the unmodified JSON received from the API
func (*CostQuoteUpdateDiffUsageDimensionBefore) UnmarshalJSON ¶ added in v1.88.6
func (r *CostQuoteUpdateDiffUsageDimensionBefore) UnmarshalJSON(data []byte) error
type CostQuoteUsageDimension ¶ added in v1.88.6
type CostQuoteUsageDimension struct {
// Usage dimension being priced (e.g. compute_vcpu, storage_abs_gb).
Dimension string `json:"dimension" api:"required"`
// User-facing label for the dimension (e.g. "vCPU (hours)").
DimensionDisplayName string `json:"dimension_display_name" api:"required"`
// Arbitrary-precision decimal serialized as a string (e.g. "58.40").
MonthlyAmount string `json:"monthly_amount" api:"required" format:"decimal"`
// Quantity of the dimension being priced.
Quantity int64 `json:"quantity" api:"required"`
// Arbitrary-precision decimal serialized as a string (e.g. "58.40").
UnitPrice string `json:"unit_price" api:"required" format:"decimal"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Dimension respjson.Field
DimensionDisplayName respjson.Field
MonthlyAmount respjson.Field
Quantity respjson.Field
UnitPrice respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Priced row for a single usage dimension emitted by a resource.
func (CostQuoteUsageDimension) RawJSON ¶ added in v1.88.6
func (r CostQuoteUsageDimension) RawJSON() string
Returns the unmodified JSON received from the API
func (*CostQuoteUsageDimension) UnmarshalJSON ¶ added in v1.88.6
func (r *CostQuoteUsageDimension) UnmarshalJSON(data []byte) error
type Pagination ¶ added in v1.21.0
type Pagination struct {
NextCursor string `json:"next_cursor" api:"required"`
PreviousCursor string `json:"previous_cursor" api:"required"`
TotalCount int64 `json:"total_count" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
NextCursor respjson.Field
PreviousCursor respjson.Field
TotalCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Pagination response details.
func (Pagination) RawJSON ¶ added in v1.21.0
func (r Pagination) RawJSON() string
Returns the unmodified JSON received from the API
func (*Pagination) UnmarshalJSON ¶ added in v1.21.0
func (r *Pagination) UnmarshalJSON(data []byte) error
type RegionName ¶
type RegionName string
Region the resource is in.
const (
RegionNameUsSva2 RegionName = "us-sva-2"
)
type ResourceStatus ¶
type ResourceStatus string
Status of the resource.
const ( ResourceStatusPending ResourceStatus = "pending" ResourceStatusCreating ResourceStatus = "creating" ResourceStatusUpdating ResourceStatus = "updating" ResourceStatusReady ResourceStatus = "ready" ResourceStatusDeleting ResourceStatus = "deleting" ResourceStatusDeleted ResourceStatus = "deleted" ResourceStatusError ResourceStatus = "error" )
type SourceIPRuleParam ¶ added in v1.35.0
type SourceIPRuleParam struct {
// List of IPv4 CIDR addresses to allow.
Allowed []string `json:"allowed,omitzero"`
// List of IPv4 CIDR addresses to deny.
Blocked []string `json:"blocked,omitzero"`
// contains filtered or unexported fields
}
IP filter rules.
func (SourceIPRuleParam) MarshalJSON ¶ added in v1.35.0
func (r SourceIPRuleParam) MarshalJSON() (data []byte, err error)
func (*SourceIPRuleParam) UnmarshalJSON ¶ added in v1.35.0
func (r *SourceIPRuleParam) UnmarshalJSON(data []byte) error
type SourceIPRuleResponse ¶ added in v1.54.0
type SourceIPRuleResponse struct {
// List of IPv4 CIDR addresses to allow.
Allowed []string `json:"allowed" api:"required"`
// List of IPv4 CIDR addresses to deny.
Blocked []string `json:"blocked" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Allowed respjson.Field
Blocked respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
IP filter rules.
func (SourceIPRuleResponse) RawJSON ¶ added in v1.54.0
func (r SourceIPRuleResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SourceIPRuleResponse) UnmarshalJSON ¶ added in v1.54.0
func (r *SourceIPRuleResponse) UnmarshalJSON(data []byte) error