All URIs are relative to https://gateway.stackpath.com
Method | HTTP request | Description |
---|---|---|
DeleteIAMPolicy | Delete /stack/v1/stacks/{stack_id}/iam/policy | Delete a stack's IAM policy |
GetIAMPolicy | Get /stack/v1/stacks/{stack_id}/iam/policy | Get a stack's IAM policy |
SetIAMPolicy | Put /stack/v1/stacks/{stack_id}/iam/policy | Set a stack's IAM policy |
TestIAMPermissions | Post /stack/v1/stacks/{stack_id}/iam/test | Test stack policies |
DeleteIAMPolicy(ctx, stackId).Execute()
Delete a stack's IAM policy
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
stackId := "stackId_example" // string | A stack ID or slug
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.StackPoliciesApi.DeleteIAMPolicy(context.Background(), stackId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StackPoliciesApi.DeleteIAMPolicy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
stackId | string | A stack ID or slug |
Other parameters are passed through a pointer to a apiDeleteIAMPolicyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StackGetIAMPolicyResponse GetIAMPolicy(ctx, stackId).Execute()
Get a stack's IAM policy
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
stackId := "stackId_example" // string | A stack ID or slug
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.StackPoliciesApi.GetIAMPolicy(context.Background(), stackId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StackPoliciesApi.GetIAMPolicy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetIAMPolicy`: StackGetIAMPolicyResponse
fmt.Fprintf(os.Stdout, "Response from `StackPoliciesApi.GetIAMPolicy`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
stackId | string | A stack ID or slug |
Other parameters are passed through a pointer to a apiGetIAMPolicyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StackSetIAMPolicyResponse SetIAMPolicy(ctx, stackId).StackSetIAMPolicyRequest(stackSetIAMPolicyRequest).Execute()
Set a stack's IAM policy
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
stackId := "stackId_example" // string | A stack ID or slug
stackSetIAMPolicyRequest := openapiclient.stackSetIAMPolicyRequest{Policy: openapiclient.iamPolicy{Bindings: []PolicyBinding{openapiclient.PolicyBinding{Role: "Role_example", Members: []string{"Members_example")}), Version: int64(123), CreatedAt: "TODO", UpdatedAt: "TODO"}} // StackSetIAMPolicyRequest |
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.StackPoliciesApi.SetIAMPolicy(context.Background(), stackId, stackSetIAMPolicyRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StackPoliciesApi.SetIAMPolicy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SetIAMPolicy`: StackSetIAMPolicyResponse
fmt.Fprintf(os.Stdout, "Response from `StackPoliciesApi.SetIAMPolicy`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
stackId | string | A stack ID or slug |
Other parameters are passed through a pointer to a apiSetIAMPolicyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
stackSetIAMPolicyRequest | StackSetIAMPolicyRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StackTestIAMPermissionsResponse TestIAMPermissions(ctx, stackId).StackTestIAMPermissionsRequest(stackTestIAMPermissionsRequest).Execute()
Test stack policies
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
stackId := "stackId_example" // string | A stack ID or slug
stackTestIAMPermissionsRequest := openapiclient.stackTestIAMPermissionsRequest{Permissions: []string{"Permissions_example")} // StackTestIAMPermissionsRequest |
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.StackPoliciesApi.TestIAMPermissions(context.Background(), stackId, stackTestIAMPermissionsRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StackPoliciesApi.TestIAMPermissions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TestIAMPermissions`: StackTestIAMPermissionsResponse
fmt.Fprintf(os.Stdout, "Response from `StackPoliciesApi.TestIAMPermissions`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
stackId | string | A stack ID or slug |
Other parameters are passed through a pointer to a apiTestIAMPermissionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
stackTestIAMPermissionsRequest | StackTestIAMPermissionsRequest | |
StackTestIAMPermissionsResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]