create_trigger
async
¶
create_trigger(
agent_space_id: AgentSpaceIdentifier,
type: TriggerType,
condition: TriggerCondition,
action: TriggerAction,
*,
config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
status: Optional[TriggerStatus] = None,
client_token: Optional[str] = None,
) -> CreateTriggerResponse
Creates a new Trigger in the specified agent space
Parameters:
-
agent_space_id(AgentSpaceIdentifier) –The unique identifier for the agent space where the Trigger will be created
-
type(TriggerType) –How the new Trigger fires
-
condition(TriggerCondition) –The condition that fires the new Trigger
-
action(TriggerAction) –The action the new Trigger performs when it fires
-
status(Optional[TriggerStatus], default:None) –The initial status of the Trigger
-
client_token(Optional[str], default:None) –A unique, case-sensitive identifier used for idempotent Trigger creation
Raises:
-
AccessDeniedException–Access to the requested resource is denied due to insufficient permissions.
-
ConflictException–The request conflicts with the current state of the resource.
-
ContentSizeExceededException–This exception is thrown when the content size exceeds the allowed limit.
-
InternalServerException–This exception is thrown when an unexpected error occurs in the processing of a request.
-
InvalidParameterException–One or more parameters provided in the request are invalid.
-
ResourceNotFoundException–The requested resource could not be found.
-
ServiceQuotaExceededException–The request would exceed the service quota limit.
-
ThrottlingException–The request was throttled due to too many requests. Please slow down and try again.
-
ValidationException–The input fails to satisfy the constraints specified by the service.
-
UnknownServiceError–The service returned an error code this client does not model.