Documentation ¶
Index ¶
- Constants
- Variables
- func GET(client IAMClient, url string, expectedResponseCode int, forceNewBearer bool, ...) error
- type AccountPolicyServiceClient
- func (me *AccountPolicyServiceClient) CREATE(policy *Policy) (string, error)
- func (me *AccountPolicyServiceClient) DELETE(level PolicyLevel, levelID string, uuid string) error
- func (me *AccountPolicyServiceClient) GET(levelID string, uuid string) (*Policy, error)
- func (me *AccountPolicyServiceClient) LIST(level PolicyLevel, levelID string) ([]string, error)
- func (me *AccountPolicyServiceClient) List() ([]PolicyStub, error)
- func (me *AccountPolicyServiceClient) UPDATE(policy *Policy, uuid string) error
- type Authenticator
- type BasePolicyServiceClient
- func (me *BasePolicyServiceClient) AccountID() string
- func (me *BasePolicyServiceClient) CREATE(level PolicyLevel, levelID string, policy *Policy) (string, error)
- func (me *BasePolicyServiceClient) ClientID() string
- func (me *BasePolicyServiceClient) ClientSecret() string
- func (me *BasePolicyServiceClient) DELETE(level PolicyLevel, levelID string, uuid string) error
- func (me *BasePolicyServiceClient) GET(level PolicyLevel, levelID string, uuid string) (*Policy, error)
- func (me *BasePolicyServiceClient) LIST(level PolicyLevel, levelID string) ([]string, error)
- func (me *BasePolicyServiceClient) List(level PolicyLevel, levelID string) ([]PolicyStub, error)
- func (me *BasePolicyServiceClient) UPDATE(level PolicyLevel, levelID string, policy *Policy, uuid string) error
- type EnvironmentPolicyServiceClient
- func (me *EnvironmentPolicyServiceClient) CREATE(policy *Policy) (string, error)
- func (me *EnvironmentPolicyServiceClient) DELETE(level PolicyLevel, levelID string, uuid string) error
- func (me *EnvironmentPolicyServiceClient) GET(levelID string, uuid string) (*Policy, error)
- func (me *EnvironmentPolicyServiceClient) LIST(level PolicyLevel, levelID string) ([]string, error)
- func (me *EnvironmentPolicyServiceClient) List() ([]PolicyStub, error)
- func (me *EnvironmentPolicyServiceClient) UPDATE(policy *Policy, uuid string) error
- type GlobalPolicyServiceClient
- func (me *GlobalPolicyServiceClient) DELETE(level PolicyLevel, levelID string, uuid string) error
- func (me *GlobalPolicyServiceClient) GET(levelID string, uuid string) (*Policy, error)
- func (me *GlobalPolicyServiceClient) LIST(level PolicyLevel, levelID string) ([]string, error)
- func (me *GlobalPolicyServiceClient) List() ([]PolicyStub, error)
- type IAMClient
- type IAMError
- type ListPoliciesResponse
- type Policy
- type PolicyLevel
- type PolicyStub
- type RateLimiter
Constants ¶
View Source
const DEFAULT_RATE_LIMITER_RATE = int64(1000)
View Source
const MAX_RATE_LIMITER_RATE = int64(5000)
Variables ¶
View Source
var DISABLE_RATE_LIMITER = (os.Getenv("DYNATRACE_DISABLE_IAM_RATE_LIMITER") == "true")
View Source
var PolicyLevels = struct { Global PolicyLevel Account PolicyLevel Environment PolicyLevel }{ PolicyLevel("global"), PolicyLevel("account"), PolicyLevel("environment"), }
Functions ¶
Types ¶
type AccountPolicyServiceClient ¶
type AccountPolicyServiceClient struct {
PolicyClient *BasePolicyServiceClient
}
func NewAccountPolicyService ¶
func NewAccountPolicyService(clientID string, accountID string, clientSecret string) *AccountPolicyServiceClient
func (*AccountPolicyServiceClient) CREATE ¶
func (me *AccountPolicyServiceClient) CREATE(policy *Policy) (string, error)
func (*AccountPolicyServiceClient) DELETE ¶
func (me *AccountPolicyServiceClient) DELETE(level PolicyLevel, levelID string, uuid string) error
func (*AccountPolicyServiceClient) GET ¶
func (me *AccountPolicyServiceClient) GET(levelID string, uuid string) (*Policy, error)
func (*AccountPolicyServiceClient) LIST ¶
func (me *AccountPolicyServiceClient) LIST(level PolicyLevel, levelID string) ([]string, error)
func (*AccountPolicyServiceClient) List ¶
func (me *AccountPolicyServiceClient) List() ([]PolicyStub, error)
type Authenticator ¶
type BasePolicyServiceClient ¶
type BasePolicyServiceClient struct {
// contains filtered or unexported fields
}
func NewBasePolicyService ¶
func NewBasePolicyService(clientID string, accountID string, clientSecret string) *BasePolicyServiceClient
func (*BasePolicyServiceClient) AccountID ¶
func (me *BasePolicyServiceClient) AccountID() string
func (*BasePolicyServiceClient) CREATE ¶
func (me *BasePolicyServiceClient) CREATE(level PolicyLevel, levelID string, policy *Policy) (string, error)
func (*BasePolicyServiceClient) ClientID ¶
func (me *BasePolicyServiceClient) ClientID() string
func (*BasePolicyServiceClient) ClientSecret ¶
func (me *BasePolicyServiceClient) ClientSecret() string
func (*BasePolicyServiceClient) DELETE ¶
func (me *BasePolicyServiceClient) DELETE(level PolicyLevel, levelID string, uuid string) error
func (*BasePolicyServiceClient) GET ¶
func (me *BasePolicyServiceClient) GET(level PolicyLevel, levelID string, uuid string) (*Policy, error)
func (*BasePolicyServiceClient) LIST ¶
func (me *BasePolicyServiceClient) LIST(level PolicyLevel, levelID string) ([]string, error)
func (*BasePolicyServiceClient) List ¶
func (me *BasePolicyServiceClient) List(level PolicyLevel, levelID string) ([]PolicyStub, error)
func (*BasePolicyServiceClient) UPDATE ¶
func (me *BasePolicyServiceClient) UPDATE(level PolicyLevel, levelID string, policy *Policy, uuid string) error
type EnvironmentPolicyServiceClient ¶
type EnvironmentPolicyServiceClient struct {
PolicyClient *BasePolicyServiceClient
}
func NewEnvironmentPolicyService ¶
func NewEnvironmentPolicyService(clientID string, accountID string, clientSecret string) *EnvironmentPolicyServiceClient
func (*EnvironmentPolicyServiceClient) CREATE ¶
func (me *EnvironmentPolicyServiceClient) CREATE(policy *Policy) (string, error)
func (*EnvironmentPolicyServiceClient) DELETE ¶
func (me *EnvironmentPolicyServiceClient) DELETE(level PolicyLevel, levelID string, uuid string) error
func (*EnvironmentPolicyServiceClient) GET ¶
func (me *EnvironmentPolicyServiceClient) GET(levelID string, uuid string) (*Policy, error)
func (*EnvironmentPolicyServiceClient) LIST ¶
func (me *EnvironmentPolicyServiceClient) LIST(level PolicyLevel, levelID string) ([]string, error)
func (*EnvironmentPolicyServiceClient) List ¶
func (me *EnvironmentPolicyServiceClient) List() ([]PolicyStub, error)
type GlobalPolicyServiceClient ¶
type GlobalPolicyServiceClient struct {
PolicyClient *BasePolicyServiceClient
}
func NewGlobalPolicyService ¶
func NewGlobalPolicyService(clientID string, accountID string, clientSecret string) *GlobalPolicyServiceClient
func (*GlobalPolicyServiceClient) DELETE ¶
func (me *GlobalPolicyServiceClient) DELETE(level PolicyLevel, levelID string, uuid string) error
func (*GlobalPolicyServiceClient) GET ¶
func (me *GlobalPolicyServiceClient) GET(levelID string, uuid string) (*Policy, error)
func (*GlobalPolicyServiceClient) LIST ¶
func (me *GlobalPolicyServiceClient) LIST(level PolicyLevel, levelID string) ([]string, error)
func (*GlobalPolicyServiceClient) List ¶
func (me *GlobalPolicyServiceClient) List() ([]PolicyStub, error)
type IAMClient ¶
type IAMClient interface { POST(url string, payload any, expectedResponseCode int, forceNewBearer bool) ([]byte, error) PUT(url string, payload any, expectedResponseCode int, forceNewBearer bool) ([]byte, error) GET(url string, expectedResponseCode int, forceNewBearer bool) ([]byte, error) DELETE(url string, expectedResponseCode int, forceNewBearer bool) ([]byte, error) DELETE_MULTI_RESPONSE(url string, expectedResponseCodes []int, forceNewBearer bool) ([]byte, error) }
func NewIAMClient ¶
func NewIAMClient(auth Authenticator) IAMClient
type IAMError ¶
type ListPoliciesResponse ¶
type ListPoliciesResponse struct {
Items []PolicyStub `json:"policies"`
}
type Policy ¶
type Policy struct { // UUID string `json:"uuid,omitempty"` Name string `json:"name"` Tags []string `json:"tags,omitempty"` Description string `json:"description,omitempty"` StatementQuery string `json:"statementQuery"` }
func (*Policy) MarshalHCL ¶
func (me *Policy) MarshalHCL(properties hcl.Properties) error
type PolicyLevel ¶
type PolicyLevel string
type PolicyStub ¶
type RateLimiter ¶ added in v1.57.0
type RateLimiter struct {
// contains filtered or unexported fields
}
func NewRateLimiter ¶ added in v1.57.0
func NewRateLimiter() *RateLimiter
func (*RateLimiter) CanCall ¶ added in v1.57.0
func (rl *RateLimiter) CanCall() bool
Source Files ¶
Click to show internal directories.
Click to hide internal directories.