Documentation
¶
Index ¶
- type ClientConfig
- type Provider
- func (p *Provider) BucketACL(ctx context.Context, action, container, level string) (schema.BucketACLResult, error)
- func (p *Provider) CredentialKey(opts map[string]string) string
- func (p *Provider) DBManagement(ctx context.Context, action, instanceID string) (schema.DatabaseActionResult, error)
- func (p *Provider) EventDump(ctx context.Context, action, args string) (schema.EventActionResult, error)
- func (p *Provider) ExecuteCloudVMCommand(ctx context.Context, instanceID, cmd string) (schema.CommandResult, error)
- func (p *Provider) IAMCredential(ctx context.Context, action, principal, credentialID string) (schema.IAMCredentialResult, error)
- func (p *Provider) Name() string
- func (p *Provider) Resources(ctx context.Context) (schema.Resources, error)
- func (p *Provider) RoleBinding(ctx context.Context, action, principal, role, scope string) (schema.RoleBindingResult, error)
- func (p *Provider) UserManagement(action, username, password string) (schema.IAMResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶ added in v0.3.1
ClientConfig allows callers (e.g. demo replay) to inject a custom HTTP client used by both the OAuth2 token source and the ARM API client, and skip credential cache writes for ephemeral credentials.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is a data provider for Azure ARM APIs.
func NewWithConfig ¶ added in v0.3.1
func NewWithConfig(options schema.Options, cfg ClientConfig) (*Provider, error)
NewWithConfig creates a new provider client for Azure API with an injected HTTP transport. Real callers use New; replay/test callers feed in a mock HTTP client through cfg.HTTPClient.
func (*Provider) BucketACL ¶ added in v0.3.1
func (p *Provider) BucketACL(ctx context.Context, action, container, level string) (schema.BucketACLResult, error)
BucketACL implements schema.BucketACLManager.
func (*Provider) CredentialKey ¶ added in v0.2.7
func (*Provider) DBManagement ¶ added in v0.1.1
func (p *Provider) DBManagement(ctx context.Context, action, instanceID string) (schema.DatabaseActionResult, error)
DBManagement implements schema.DBManager for Azure SQL by rotating the server administratorLoginPassword. Azure SQL has no native "user" API at ARM (T-SQL is required); rotating the admin password is the closest CSPM-detectable management-plane signal. instanceID is parsed as `<resourceGroup>/<serverName>`.
func (*Provider) EventDump ¶ added in v0.0.9
func (p *Provider) EventDump(ctx context.Context, action, args string) (schema.EventActionResult, error)
EventDump implements schema.EventReader for Azure Activity Log. The `dump` action lists recent management-plane events; `whitelist` is unsupported because Activity Log is read-only.
func (*Provider) ExecuteCloudVMCommand ¶ added in v0.1.1
func (p *Provider) ExecuteCloudVMCommand(ctx context.Context, instanceID, cmd string) (schema.CommandResult, error)
ExecuteCloudVMCommand routes through Microsoft.Compute virtualMachines/runCommand. instanceID may be a full ARM VM ID, `<subscription>/<resourceGroup>/<vmName>`, or the legacy `<resourceGroup>/<vmName>` shorthand. Headless `shell -t/-l` paths pre-encode the script; the bare `cmd` (base64) path arrives via the REPL shell loop.
func (*Provider) IAMCredential ¶ added in v0.3.1
func (p *Provider) IAMCredential(ctx context.Context, action, principal, credentialID string) (schema.IAMCredentialResult, error)
IAMCredential implements schema.IAMCredentialManager for Azure. The capability maps to Microsoft Graph application password credential lifecycle: list / addPassword / removePassword. `principal` is the Azure AD application ID (objectId or appId); `credentialID` is the password keyId for delete.
func (*Provider) RoleBinding ¶ added in v0.3.1
func (p *Provider) RoleBinding(ctx context.Context, action, principal, role, scope string) (schema.RoleBindingResult, error)
RoleBinding implements schema.RoleBindingManager. It dispatches list / add / del actions to the rbac driver. An empty scope falls back to the first configured subscription.
func (*Provider) UserManagement ¶ added in v0.0.4
UserManagement implements schema.IAMManager for Azure via Microsoft Graph `users` POST/DELETE. Action `add` provisions an Azure AD user with the supplied initial password; `del` revokes it.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package billing wraps Azure Cost Management for the cloudlist `balance` asset.
|
Package billing wraps Azure Cost Management for the cloudlist `balance` asset. |
|
Package graph implements the Microsoft Graph slice that Azure's account inventory, iam-user, and iam-credential validation flows need.
|
Package graph implements the Microsoft Graph slice that Azure's account inventory, iam-user, and iam-credential validation flows need. |
|
Package sqldb wraps the Azure SQL master password rotation.
|
Package sqldb wraps the Azure SQL master password rotation. |