Interface ISmTargetGroups
- Namespace
- Meraki.Api.Interfaces.Products.Sm
- Assembly
- Meraki.Api.dll
Represents a collection of functions to interact with the API endpoints
public interface ISmTargetGroups
Methods
CreateNetworkSmTargetGroupAsync(string, SmTargetGroupCreateUpdateRequest, CancellationToken)
Add a target group
[Post("/networks/{networkId}/sm/targetGroups")]
Task<SmTargetGroup> CreateNetworkSmTargetGroupAsync(string networkId, SmTargetGroupCreateUpdateRequest createNetworkSmTargetGroup, CancellationToken cancellationToken = default)
Parameters
networkId
stringThe network id
createNetworkSmTargetGroup
SmTargetGroupCreateUpdateRequestBody for adding target group
cancellationToken
CancellationToken
Returns
Exceptions
- ApiException
Thrown when fails to make API call
DeleteNetworkSmTargetGroupAsync(string, string, CancellationToken)
Delete a target group from a network
[Delete("/networks/{networkId}/sm/targetGroups/{targetGroupId}")]
Task DeleteNetworkSmTargetGroupAsync(string networkId, string targetGroupId, CancellationToken cancellationToken = default)
Parameters
networkId
stringThe network id
targetGroupId
stringThe target group id
cancellationToken
CancellationToken
Returns
Exceptions
- ApiException
Thrown when fails to make API call
GetNetworkSmTargetGroupAsync(string, string, bool?, CancellationToken)
Return a target group
[Get("/networks/{networkId}/sm/targetGroups/{targetGroupId}")]
Task<SmTargetGroup> GetNetworkSmTargetGroupAsync(string networkId, string targetGroupId, bool? withDetails = null, CancellationToken cancellationToken = default)
Parameters
networkId
stringThe network id
targetGroupId
stringThe target group id
withDetails
bool?Boolean indicating if the ids of the devices or users scoped by the target group should be included in the response (optional)
cancellationToken
CancellationToken
Returns
Exceptions
- ApiException
Thrown when fails to make API call
GetNetworkSmTargetGroupsAsync(string, bool?, CancellationToken)
List the target groups in this network
[Get("/networks/{networkId}/sm/targetGroups")]
Task<List<SmTargetGroup>> GetNetworkSmTargetGroupsAsync(string networkId, bool? withDetails = null, CancellationToken cancellationToken = default)
Parameters
networkId
stringThe network id
withDetails
bool?Boolean indicating if the ids of the devices or users scoped by the target group should be included in the response (optional)
cancellationToken
CancellationToken
Returns
Exceptions
- ApiException
Thrown when fails to make API call
UpdateNetworkSmTargetGroupAsync(string, string, SmTargetGroupCreateUpdateRequest, CancellationToken)
Update a target group
[Put("/networks/{networkId}/sm/targetGroups/{targetGroupId}")]
Task<SmTargetGroup> UpdateNetworkSmTargetGroupAsync(string networkId, string targetGroupId, SmTargetGroupCreateUpdateRequest updateNetworkSmTargetGroup, CancellationToken cancellationToken = default)
Parameters
networkId
stringThe network id
targetGroupId
stringThe target group id
updateNetworkSmTargetGroup
SmTargetGroupCreateUpdateRequestBody for updating a target group
cancellationToken
CancellationToken
Returns
Exceptions
- ApiException
Thrown when fails to make API call