All URIs are relative to http://localhost/api/v2.0
Method | HTTP request | Description |
---|---|---|
CreateImmuRule | Post /projects/{project_name_or_id}/immutabletagrules | Add an immutable tag rule to current project |
DeleteImmuRule | Delete /projects/{project_name_or_id}/immutabletagrules/{immutable_rule_id} | Delete the immutable tag rule. |
ListImmuRules | Get /projects/{project_name_or_id}/immutabletagrules | List all immutable tag rules of current project |
UpdateImmuRule | Put /projects/{project_name_or_id}/immutabletagrules/{immutable_rule_id} | Update the immutable tag rule or enable or disable the rule |
CreateImmuRule(ctx, projectNameOrId, immutableRule, optional) Add an immutable tag rule to current project
This endpoint add an immutable tag rule to the project
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectNameOrId | string | The name or id of the project | |
immutableRule | ImmutableRule | ||
optional | *ImmutableApiCreateImmuRuleOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a ImmutableApiCreateImmuRuleOpts struct
Name | Type | Description | Notes |
---|
xRequestId | optional.String| An unique ID for the request | xIsResourceName | optional.Bool| The flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name. | [default to false]
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteImmuRule(ctx, projectNameOrId, immutableRuleId, optional) Delete the immutable tag rule.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectNameOrId | string | The name or id of the project | |
immutableRuleId | int64 | The ID of the immutable rule | |
optional | *ImmutableApiDeleteImmuRuleOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a ImmutableApiDeleteImmuRuleOpts struct
Name | Type | Description | Notes |
---|
xRequestId | optional.String| An unique ID for the request | xIsResourceName | optional.Bool| The flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name. | [default to false]
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ImmutableRule ListImmuRules(ctx, projectNameOrId, optional) List all immutable tag rules of current project
This endpoint returns the immutable tag rules of a project
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectNameOrId | string | The name or id of the project | |
optional | *ImmutableApiListImmuRulesOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a ImmutableApiListImmuRulesOpts struct
Name | Type | Description | Notes |
---|
xRequestId | optional.String| An unique ID for the request |
xIsResourceName | optional.Bool| The flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name. | [default to false]
page | optional.Int64| The page number | [default to 1]
pageSize | optional.Int64| The size of per page | [default to 10]
q | optional.String| Query string to query resources. Supported query patterns are "exact match(k=v)", "fuzzy match(k=v)", "range(k=[minmax])", "list with union releationship(k={v1 v2 v3})" and "list with intersetion relationship(k=(v1 v2 v3))". The value of range and list can be string(enclosed by " or '), integer or time(in format "2020-04-09 02:36:00"). All of these query patterns should be put in the query string "q=xxx" and splitted by ",". e.g. q=k1=v1,k2=v2,k3=[minmax] |
sort | optional.String| Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending orderr and field2 in descending order with "sort=field1,-field2" |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateImmuRule(ctx, projectNameOrId, immutableRuleId, immutableRule, optional) Update the immutable tag rule or enable or disable the rule
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectNameOrId | string | The name or id of the project | |
immutableRuleId | int64 | The ID of the immutable rule | |
immutableRule | ImmutableRule | ||
optional | *ImmutableApiUpdateImmuRuleOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a ImmutableApiUpdateImmuRuleOpts struct
Name | Type | Description | Notes |
---|
xRequestId | optional.String| An unique ID for the request | xIsResourceName | optional.Bool| The flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name. | [default to false]
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]