OpsGenie REST API v0.1.0 OpsGenieRESTAPI.Api.Policy
API calls for all endpoints tagged Policy
.
Link to this section Summary
Functions
Change Policy Order Change execution order of the policy with given id
Create Policy Creates a new policy
Delete Policy Delete policy with given id
Disable Policy Disable the policy with given id
Enable Policy Enable the policy with given id
Get Policy Used to get details of a single policy with id
List Alert Policies Returns the list of alert policies
List Notification Policies Returns the list of notification policies
Update Policy Update alert policy with given id
Link to this section Functions
change_policy_order( Tesla.Env.client(), String.t(), OpsGenieRESTAPI.Model.ChangePolicyOrderPayload.t(), keyword() ) :: {:ok, OpsGenieRESTAPI.Model.SuccessResponse.t()} | {:error, Tesla.Env.t()}
Change Policy Order Change execution order of the policy with given id
Parameters
- connection (OpsGenieRESTAPI.Connection): Connection to server
- policy_id (String.t): Id of the requested policy
- body (ChangePolicyOrderPayload): Change order payload
opts (KeywordList): [optional] Optional parameters
- :team_id (String.t): TeamId of policy created if it belongs to a team
Returns
{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure
create_policy(Tesla.Env.client(), OpsGenieRESTAPI.Model.Policy.t(), keyword()) :: {:ok, OpsGenieRESTAPI.Model.CreatePolicyResponse.t()} | {:error, Tesla.Env.t()}
Create Policy Creates a new policy
Parameters
- connection (OpsGenieRESTAPI.Connection): Connection to server
- body (Policy): Payload of created policy
opts (KeywordList): [optional] Optional parameters
- :team_id (ErrorUnknown): TeamId of policy created if it belongs to a team
Returns
{:ok, %OpsGenieRESTAPI.Model.CreatePolicyResponse{}} on success {:error, info} on failure
delete_policy(Tesla.Env.client(), String.t(), keyword()) :: {:ok, OpsGenieRESTAPI.Model.SuccessResponse.t()} | {:error, Tesla.Env.t()}
Delete Policy Delete policy with given id
Parameters
- connection (OpsGenieRESTAPI.Connection): Connection to server
- policy_id (String.t): Id of the requested policy
opts (KeywordList): [optional] Optional parameters
- :team_id (ErrorUnknown): TeamId of policy created if it belongs to a team
Returns
{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure
disable_policy(Tesla.Env.client(), String.t(), keyword()) :: {:ok, OpsGenieRESTAPI.Model.SuccessResponse.t()} | {:error, Tesla.Env.t()}
Disable Policy Disable the policy with given id
Parameters
- connection (OpsGenieRESTAPI.Connection): Connection to server
- policy_id (String.t): Id of the requested policy
opts (KeywordList): [optional] Optional parameters
- :team_id (ErrorUnknown): TeamId of policy created if it belongs to a team
Returns
{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure
enable_policy(Tesla.Env.client(), String.t(), keyword()) :: {:ok, OpsGenieRESTAPI.Model.SuccessResponse.t()} | {:error, Tesla.Env.t()}
Enable Policy Enable the policy with given id
Parameters
- connection (OpsGenieRESTAPI.Connection): Connection to server
- policy_id (String.t): Id of the requested policy
opts (KeywordList): [optional] Optional parameters
- :team_id (ErrorUnknown): TeamId of policy created if it belongs to a team
Returns
{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure
get_policy(Tesla.Env.client(), String.t(), keyword()) :: {:ok, OpsGenieRESTAPI.Model.GetPolicyResponse.t()} | {:error, Tesla.Env.t()}
Get Policy Used to get details of a single policy with id
Parameters
- connection (OpsGenieRESTAPI.Connection): Connection to server
- policy_id (String.t): Id of the requested policy
opts (KeywordList): [optional] Optional parameters
- :team_id (ErrorUnknown): TeamId of policy created if it belongs to a team
Returns
{:ok, %OpsGenieRESTAPI.Model.GetPolicyResponse{}} on success {:error, info} on failure
list_alert_policies(Tesla.Env.client(), keyword()) :: {:ok, OpsGenieRESTAPI.Model.ListPoliciesResponse.t()} | {:error, Tesla.Env.t()}
List Alert Policies Returns the list of alert policies
Parameters
- connection (OpsGenieRESTAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :team_id (ErrorUnknown): TeamId of policy created if it belongs to a team
Returns
{:ok, %OpsGenieRESTAPI.Model.ListPoliciesResponse{}} on success {:error, info} on failure
list_notification_policies(Tesla.Env.client(), keyword()) :: {:ok, OpsGenieRESTAPI.Model.ListPoliciesResponse.t()} | {:error, Tesla.Env.t()}
List Notification Policies Returns the list of notification policies
Parameters
- connection (OpsGenieRESTAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :team_id (ErrorUnknown): TeamId of policy created if it belongs to a team
Returns
{:ok, %OpsGenieRESTAPI.Model.ListPoliciesResponse{}} on success {:error, info} on failure
update_policy( Tesla.Env.client(), String.t(), OpsGenieRESTAPI.Model.Policy.t(), keyword() ) :: {:ok, OpsGenieRESTAPI.Model.SuccessResponse.t()} | {:error, Tesla.Env.t()}
Update Policy Update alert policy with given id
Parameters
- connection (OpsGenieRESTAPI.Connection): Connection to server
- policy_id (String.t): Id of the requested policy
- body (Policy): Payload of updated policy
opts (KeywordList): [optional] Optional parameters
- :team_id (String.t): TeamId of policy created if it belongs to a team
Returns
{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure