use WebService::Fastly::Object::UserApi;
Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
create_user | POST /user | Create a user |
delete_user | DELETE /user/{user_id} | Delete a user |
get_current_user | GET /current_user | Get the current user |
get_user | GET /user/{user_id} | Get a user |
request_password_reset | POST /user/{user_login}/password/request_reset | Request a password reset |
update_user | PUT /user/{user_id} | Update a user |
update_user_password | POST /current_user/password | Update the user's password |
UserResponse create_user(login => $login, name => $name, limit_services => $limit_services, locked => $locked, require_new_password => $require_new_password, role => $role, two_factor_auth_enabled => $two_factor_auth_enabled, two_factor_setup_required => $two_factor_setup_required)
Create a user
Create a user.
use Data::Dumper;
use WebService::Fastly::UserApi;
my $api_instance = WebService::Fastly::UserApi->new(
# Configure API key authorization: token
api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'Fastly-Key' => 'Bearer'},
);
my $login = "login_example"; # string |
my $name = "name_example"; # string | The real life name of the user.
my $limit_services = null; # boolean | Indicates that the user has limited access to the customer's services.
my $locked = null; # boolean | Indicates whether the is account is locked for editing or not.
my $require_new_password = null; # boolean | Indicates if a new password is required at next login.
my $role = new WebService::Fastly.RoleUser(); # RoleUser |
my $two_factor_auth_enabled = null; # boolean | Indicates if 2FA is enabled on the user.
my $two_factor_setup_required = null; # boolean | Indicates if 2FA is required by the user's customer account.
eval {
my $result = $api_instance->create_user(login => $login, name => $name, limit_services => $limit_services, locked => $locked, require_new_password => $require_new_password, role => $role, two_factor_auth_enabled => $two_factor_auth_enabled, two_factor_setup_required => $two_factor_setup_required);
print Dumper($result);
};
if ($@) {
warn "Exception when calling UserApi->create_user: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
login | string | [optional] | |
name | string | The real life name of the user. | [optional] |
limit_services | boolean | Indicates that the user has limited access to the customer's services. | [optional] |
locked | boolean | Indicates whether the is account is locked for editing or not. | [optional] |
require_new_password | boolean | Indicates if a new password is required at next login. | [optional] |
role | RoleUser | [optional] | |
two_factor_auth_enabled | boolean | Indicates if 2FA is enabled on the user. | [optional] |
two_factor_setup_required | boolean | Indicates if 2FA is required by the user's customer account. | [optional] |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse200 delete_user(user_id => $user_id)
Delete a user
Delete a user.
use Data::Dumper;
use WebService::Fastly::UserApi;
my $api_instance = WebService::Fastly::UserApi->new(
# Configure API key authorization: token
api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'Fastly-Key' => 'Bearer'},
);
my $user_id = "user_id_example"; # string | Alphanumeric string identifying the user.
eval {
my $result = $api_instance->delete_user(user_id => $user_id);
print Dumper($result);
};
if ($@) {
warn "Exception when calling UserApi->delete_user: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
user_id | string | Alphanumeric string identifying the user. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserResponse get_current_user()
Get the current user
Get the logged in user.
use Data::Dumper;
use WebService::Fastly::UserApi;
my $api_instance = WebService::Fastly::UserApi->new(
# Configure API key authorization: token
api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'Fastly-Key' => 'Bearer'},
);
eval {
my $result = $api_instance->get_current_user();
print Dumper($result);
};
if ($@) {
warn "Exception when calling UserApi->get_current_user: $@\n";
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserResponse get_user(user_id => $user_id)
Get a user
Get a specific user.
use Data::Dumper;
use WebService::Fastly::UserApi;
my $api_instance = WebService::Fastly::UserApi->new(
# Configure API key authorization: token
api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'Fastly-Key' => 'Bearer'},
);
my $user_id = "user_id_example"; # string | Alphanumeric string identifying the user.
eval {
my $result = $api_instance->get_user(user_id => $user_id);
print Dumper($result);
};
if ($@) {
warn "Exception when calling UserApi->get_user: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
user_id | string | Alphanumeric string identifying the user. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse200 request_password_reset(user_login => $user_login)
Request a password reset
Requests a password reset for the specified user.
use Data::Dumper;
use WebService::Fastly::UserApi;
my $api_instance = WebService::Fastly::UserApi->new(
# Configure API key authorization: token
api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'Fastly-Key' => 'Bearer'},
);
my $user_login = "user_login_example"; # string | The login associated with the user (typically, an email address).
eval {
my $result = $api_instance->request_password_reset(user_login => $user_login);
print Dumper($result);
};
if ($@) {
warn "Exception when calling UserApi->request_password_reset: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
user_login | string | The login associated with the user (typically, an email address). |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserResponse update_user(user_id => $user_id, login => $login, name => $name, limit_services => $limit_services, locked => $locked, require_new_password => $require_new_password, role => $role, two_factor_auth_enabled => $two_factor_auth_enabled, two_factor_setup_required => $two_factor_setup_required)
Update a user
Update a user. Only users with the role of superuser
can make changes to other users on the account. Non-superusers may use this endpoint to make changes to their own account. Two-factor attributes are not editable via this endpoint.
use Data::Dumper;
use WebService::Fastly::UserApi;
my $api_instance = WebService::Fastly::UserApi->new(
# Configure API key authorization: token
api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'Fastly-Key' => 'Bearer'},
);
my $user_id = "user_id_example"; # string | Alphanumeric string identifying the user.
my $login = "login_example"; # string |
my $name = "name_example"; # string | The real life name of the user.
my $limit_services = null; # boolean | Indicates that the user has limited access to the customer's services.
my $locked = null; # boolean | Indicates whether the is account is locked for editing or not.
my $require_new_password = null; # boolean | Indicates if a new password is required at next login.
my $role = new WebService::Fastly.RoleUser(); # RoleUser |
my $two_factor_auth_enabled = null; # boolean | Indicates if 2FA is enabled on the user.
my $two_factor_setup_required = null; # boolean | Indicates if 2FA is required by the user's customer account.
eval {
my $result = $api_instance->update_user(user_id => $user_id, login => $login, name => $name, limit_services => $limit_services, locked => $locked, require_new_password => $require_new_password, role => $role, two_factor_auth_enabled => $two_factor_auth_enabled, two_factor_setup_required => $two_factor_setup_required);
print Dumper($result);
};
if ($@) {
warn "Exception when calling UserApi->update_user: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
user_id | string | Alphanumeric string identifying the user. | |
login | string | [optional] | |
name | string | The real life name of the user. | [optional] |
limit_services | boolean | Indicates that the user has limited access to the customer's services. | [optional] |
locked | boolean | Indicates whether the is account is locked for editing or not. | [optional] |
require_new_password | boolean | Indicates if a new password is required at next login. | [optional] |
role | RoleUser | [optional] | |
two_factor_auth_enabled | boolean | Indicates if 2FA is enabled on the user. | [optional] |
two_factor_setup_required | boolean | Indicates if 2FA is required by the user's customer account. | [optional] |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserResponse update_user_password(old_password => $old_password, new_password => $new_password)
Update the user's password
Update the user's password to a new one.
use Data::Dumper;
use WebService::Fastly::UserApi;
my $api_instance = WebService::Fastly::UserApi->new(
# Configure HTTP basic authorization: session_password_change
username => 'YOUR_USERNAME',
password => 'YOUR_PASSWORD',
);
my $old_password = "old_password_example"; # string | The user's current password.
my $new_password = "new_password_example"; # string | The user's new password.
eval {
my $result = $api_instance->update_user_password(old_password => $old_password, new_password => $new_password);
print Dumper($result);
};
if ($@) {
warn "Exception when calling UserApi->update_user_password: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
old_password | string | The user's current password. | [optional] |
new_password | string | The user's new password. | [optional] |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]