Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
AddUserGroupMembers | POST /user-groups/{user_group_id}/members |
Add members to a user group |
AddUserGroupRoles | POST /user-groups/{user_group_id}/roles |
Add roles to a user group |
AddUserGroupServiceGroups | POST /user-groups/{user_group_id}/service-groups |
Add service groups to a user group |
CreateAUserGroup | POST /user-groups |
Create a user group |
DeleteAUserGroup | DELETE /user-groups/{user_group_id} |
Delete a user group |
GetAUserGroup | GET /user-groups/{user_group_id} |
Get a user group |
ListUserGroupMembers | GET /user-groups/{user_group_id}/members |
List members of a user group |
ListUserGroupRoles | GET /user-groups/{user_group_id}/roles |
List roles in a user group |
ListUserGroupServiceGroups | GET /user-groups/{user_group_id}/service-groups |
List service groups in a user group |
ListUserGroups | GET /user-groups |
List user groups |
RemoveUserGroupMembers | DELETE /user-groups/{user_group_id}/members |
Remove members of a user group |
RemoveUserGroupRoles | DELETE /user-groups/{user_group_id}/roles |
Remove roles from a user group |
RemoveUserGroupServiceGroups | DELETE /user-groups/{user_group_id}/service-groups |
Remove service groups from a user group |
UpdateAUserGroup | PATCH /user-groups/{user_group_id} |
Update a user group |
Add members to a user group
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
userGroupID := "userGroupId_example" // string | Alphanumeric string identifying the user group.
requestBody := map[string]map[string]any{"key": map[string]any(123)} // map[string]map[string]any | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.IamUserGroupsAPI.AddUserGroupMembers(ctx, userGroupID).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IamUserGroupsAPI.AddUserGroupMembers`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AddUserGroupMembers`: map[string]any
fmt.Fprintf(os.Stdout, "Response from `IamUserGroupsAPI.AddUserGroupMembers`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userGroupID | string | Alphanumeric string identifying the user group. |
Other parameters are passed through a pointer to a apiAddUserGroupMembersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
requestBody | map[string]map[string]any |
map[string]any
- Content-Type: application/json
- Accept: application/json
Back to top | Back to API list | Back to README
Add roles to a user group
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
userGroupID := "userGroupId_example" // string | Alphanumeric string identifying the user group.
requestBody := map[string]map[string]any{"key": map[string]any(123)} // map[string]map[string]any | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.IamUserGroupsAPI.AddUserGroupRoles(ctx, userGroupID).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IamUserGroupsAPI.AddUserGroupRoles`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AddUserGroupRoles`: map[string]any
fmt.Fprintf(os.Stdout, "Response from `IamUserGroupsAPI.AddUserGroupRoles`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userGroupID | string | Alphanumeric string identifying the user group. |
Other parameters are passed through a pointer to a apiAddUserGroupRolesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
requestBody | map[string]map[string]any |
map[string]any
- Content-Type: application/json
- Accept: application/json
Back to top | Back to API list | Back to README
Add service groups to a user group
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
userGroupID := "userGroupId_example" // string | Alphanumeric string identifying the user group.
requestBody := map[string]map[string]any{"key": map[string]any(123)} // map[string]map[string]any | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.IamUserGroupsAPI.AddUserGroupServiceGroups(ctx, userGroupID).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IamUserGroupsAPI.AddUserGroupServiceGroups`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AddUserGroupServiceGroups`: map[string]any
fmt.Fprintf(os.Stdout, "Response from `IamUserGroupsAPI.AddUserGroupServiceGroups`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userGroupID | string | Alphanumeric string identifying the user group. |
Other parameters are passed through a pointer to a apiAddUserGroupServiceGroupsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
requestBody | map[string]map[string]any |
map[string]any
- Content-Type: application/json
- Accept: application/json
Back to top | Back to API list | Back to README
Create a user group
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
requestBody := map[string]map[string]any{"key": map[string]any(123)} // map[string]map[string]any | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.IamUserGroupsAPI.CreateAUserGroup(ctx).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IamUserGroupsAPI.CreateAUserGroup`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateAUserGroup`: map[string]any
fmt.Fprintf(os.Stdout, "Response from `IamUserGroupsAPI.CreateAUserGroup`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateAUserGroupRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
requestBody | map[string]map[string]any |
map[string]any
- Content-Type: application/json
- Accept: application/json
Back to top | Back to API list | Back to README
Delete a user group
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
userGroupID := "userGroupId_example" // string | Alphanumeric string identifying the user group.
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.IamUserGroupsAPI.DeleteAUserGroup(ctx, userGroupID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IamUserGroupsAPI.DeleteAUserGroup`: %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. | |
userGroupID | string | Alphanumeric string identifying the user group. |
Other parameters are passed through a pointer to a apiDeleteAUserGroupRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
Back to top | Back to API list | Back to README
Get a user group
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
userGroupID := "userGroupId_example" // string | Alphanumeric string identifying the user group.
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.IamUserGroupsAPI.GetAUserGroup(ctx, userGroupID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IamUserGroupsAPI.GetAUserGroup`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAUserGroup`: map[string]any
fmt.Fprintf(os.Stdout, "Response from `IamUserGroupsAPI.GetAUserGroup`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userGroupID | string | Alphanumeric string identifying the user group. |
Other parameters are passed through a pointer to a apiGetAUserGroupRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
map[string]any
- Content-Type: Not defined
- Accept: application/json
Back to top | Back to API list | Back to README
List members of a user group
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
userGroupID := "userGroupId_example" // string | Alphanumeric string identifying the user group.
perPage := int32(20) // int32 | Number of records per page. (optional) (default to 20)
page := int32(1) // int32 | Current page. (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.IamUserGroupsAPI.ListUserGroupMembers(ctx, userGroupID).PerPage(perPage).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IamUserGroupsAPI.ListUserGroupMembers`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListUserGroupMembers`: map[string]any
fmt.Fprintf(os.Stdout, "Response from `IamUserGroupsAPI.ListUserGroupMembers`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userGroupID | string | Alphanumeric string identifying the user group. |
Other parameters are passed through a pointer to a apiListUserGroupMembersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
perPage | int32 | Number of records per page. | [default to 20] page |
map[string]any
- Content-Type: Not defined
- Accept: application/json
Back to top | Back to API list | Back to README
List roles in a user group
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
userGroupID := "userGroupId_example" // string | Alphanumeric string identifying the user group.
perPage := int32(20) // int32 | Number of records per page. (optional) (default to 20)
page := int32(1) // int32 | Current page. (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.IamUserGroupsAPI.ListUserGroupRoles(ctx, userGroupID).PerPage(perPage).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IamUserGroupsAPI.ListUserGroupRoles`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListUserGroupRoles`: map[string]any
fmt.Fprintf(os.Stdout, "Response from `IamUserGroupsAPI.ListUserGroupRoles`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userGroupID | string | Alphanumeric string identifying the user group. |
Other parameters are passed through a pointer to a apiListUserGroupRolesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
perPage | int32 | Number of records per page. | [default to 20] page |
map[string]any
- Content-Type: Not defined
- Accept: application/json
Back to top | Back to API list | Back to README
List service groups in a user group
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
userGroupID := "userGroupId_example" // string | Alphanumeric string identifying the user group.
perPage := int32(20) // int32 | Number of records per page. (optional) (default to 20)
page := int32(1) // int32 | Current page. (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.IamUserGroupsAPI.ListUserGroupServiceGroups(ctx, userGroupID).PerPage(perPage).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IamUserGroupsAPI.ListUserGroupServiceGroups`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListUserGroupServiceGroups`: map[string]any
fmt.Fprintf(os.Stdout, "Response from `IamUserGroupsAPI.ListUserGroupServiceGroups`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userGroupID | string | Alphanumeric string identifying the user group. |
Other parameters are passed through a pointer to a apiListUserGroupServiceGroupsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
perPage | int32 | Number of records per page. | [default to 20] page |
map[string]any
- Content-Type: Not defined
- Accept: application/json
Back to top | Back to API list | Back to README
List user groups
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
perPage := int32(20) // int32 | Number of records per page. (optional) (default to 20)
page := int32(1) // int32 | Current page. (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.IamUserGroupsAPI.ListUserGroups(ctx).PerPage(perPage).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IamUserGroupsAPI.ListUserGroups`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListUserGroups`: map[string]any
fmt.Fprintf(os.Stdout, "Response from `IamUserGroupsAPI.ListUserGroups`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListUserGroupsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
perPage | int32 | Number of records per page. | [default to 20] page |
map[string]any
- Content-Type: Not defined
- Accept: application/json
Back to top | Back to API list | Back to README
Remove members of a user group
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
userGroupID := "userGroupId_example" // string | Alphanumeric string identifying the user group.
requestBody := map[string]map[string]any{"key": map[string]any(123)} // map[string]map[string]any | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.IamUserGroupsAPI.RemoveUserGroupMembers(ctx, userGroupID).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IamUserGroupsAPI.RemoveUserGroupMembers`: %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. | |
userGroupID | string | Alphanumeric string identifying the user group. |
Other parameters are passed through a pointer to a apiRemoveUserGroupMembersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
requestBody | map[string]map[string]any |
(empty response body)
- Content-Type: application/json
- Accept: Not defined
Back to top | Back to API list | Back to README
Remove roles from a user group
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
userGroupID := "userGroupId_example" // string | Alphanumeric string identifying the user group.
requestBody := map[string]map[string]any{"key": map[string]any(123)} // map[string]map[string]any | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.IamUserGroupsAPI.RemoveUserGroupRoles(ctx, userGroupID).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IamUserGroupsAPI.RemoveUserGroupRoles`: %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. | |
userGroupID | string | Alphanumeric string identifying the user group. |
Other parameters are passed through a pointer to a apiRemoveUserGroupRolesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
requestBody | map[string]map[string]any |
(empty response body)
- Content-Type: application/json
- Accept: Not defined
Back to top | Back to API list | Back to README
Remove service groups from a user group
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
userGroupID := "userGroupId_example" // string | Alphanumeric string identifying the user group.
requestBody := map[string]map[string]any{"key": map[string]any(123)} // map[string]map[string]any | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.IamUserGroupsAPI.RemoveUserGroupServiceGroups(ctx, userGroupID).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IamUserGroupsAPI.RemoveUserGroupServiceGroups`: %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. | |
userGroupID | string | Alphanumeric string identifying the user group. |
Other parameters are passed through a pointer to a apiRemoveUserGroupServiceGroupsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
requestBody | map[string]map[string]any |
(empty response body)
- Content-Type: application/json
- Accept: Not defined
Back to top | Back to API list | Back to README
Update a user group
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
userGroupID := "userGroupId_example" // string | Alphanumeric string identifying the user group.
requestBody := map[string]map[string]any{"key": map[string]any(123)} // map[string]map[string]any | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.IamUserGroupsAPI.UpdateAUserGroup(ctx, userGroupID).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IamUserGroupsAPI.UpdateAUserGroup`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateAUserGroup`: map[string]any
fmt.Fprintf(os.Stdout, "Response from `IamUserGroupsAPI.UpdateAUserGroup`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userGroupID | string | Alphanumeric string identifying the user group. |
Other parameters are passed through a pointer to a apiUpdateAUserGroupRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
requestBody | map[string]map[string]any |
map[string]any
- Content-Type: application/json
- Accept: application/json