Skip to content

Latest commit

 

History

History
283 lines (203 loc) · 11.4 KB

File metadata and controls

283 lines (203 loc) · 11.4 KB

cloudflare_dart.api.DevicePostureRulesApi

Load the API package

import 'package:cloudflare_dart/api.dart';

All URIs are relative to https://api.cloudflare.com/client/v4

Method HTTP request Description
devicePostureRulesCreateDevicePostureRule POST /accounts/{account_id}/devices/posture Create a device posture rule
devicePostureRulesDeleteDevicePostureRule DELETE /accounts/{account_id}/devices/posture/{rule_id} Delete a device posture rule
devicePostureRulesDevicePostureRulesDetails GET /accounts/{account_id}/devices/posture/{rule_id} Get device posture rule details
devicePostureRulesListDevicePostureRules GET /accounts/{account_id}/devices/posture List device posture rules
devicePostureRulesUpdateDevicePostureRule PUT /accounts/{account_id}/devices/posture/{rule_id} Update a device posture rule

devicePostureRulesCreateDevicePostureRule

TeamsDevicesSingleResponse devicePostureRulesCreateDevicePostureRule(accountId, devicePostureRulesCreateDevicePostureRuleRequest)

Create a device posture rule

Creates a new device posture rule.

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getDevicePostureRulesApi();
final JsonObject accountId = ; // JsonObject | 
final DevicePostureRulesCreateDevicePostureRuleRequest devicePostureRulesCreateDevicePostureRuleRequest = ; // DevicePostureRulesCreateDevicePostureRuleRequest | 

try {
    final response = api.devicePostureRulesCreateDevicePostureRule(accountId, devicePostureRulesCreateDevicePostureRuleRequest);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DevicePostureRulesApi->devicePostureRulesCreateDevicePostureRule: $e\n');
}

Parameters

Name Type Description Notes
accountId JsonObject
devicePostureRulesCreateDevicePostureRuleRequest DevicePostureRulesCreateDevicePostureRuleRequest

Return type

TeamsDevicesSingleResponse

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

devicePostureRulesDeleteDevicePostureRule

TeamsDevicesIdResponse devicePostureRulesDeleteDevicePostureRule(ruleId, accountId)

Delete a device posture rule

Deletes a device posture rule.

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getDevicePostureRulesApi();
final String ruleId = ruleId_example; // String | 
final JsonObject accountId = ; // JsonObject | 

try {
    final response = api.devicePostureRulesDeleteDevicePostureRule(ruleId, accountId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DevicePostureRulesApi->devicePostureRulesDeleteDevicePostureRule: $e\n');
}

Parameters

Name Type Description Notes
ruleId String
accountId JsonObject

Return type

TeamsDevicesIdResponse

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

devicePostureRulesDevicePostureRulesDetails

TeamsDevicesSingleResponse devicePostureRulesDevicePostureRulesDetails(ruleId, accountId)

Get device posture rule details

Fetches a single device posture rule.

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getDevicePostureRulesApi();
final String ruleId = ruleId_example; // String | 
final JsonObject accountId = ; // JsonObject | 

try {
    final response = api.devicePostureRulesDevicePostureRulesDetails(ruleId, accountId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DevicePostureRulesApi->devicePostureRulesDevicePostureRulesDetails: $e\n');
}

Parameters

Name Type Description Notes
ruleId String
accountId JsonObject

Return type

TeamsDevicesSingleResponse

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

devicePostureRulesListDevicePostureRules

TeamsDevicesResponseCollection devicePostureRulesListDevicePostureRules(accountId)

List device posture rules

Fetches device posture rules for a Zero Trust account.

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getDevicePostureRulesApi();
final JsonObject accountId = ; // JsonObject | 

try {
    final response = api.devicePostureRulesListDevicePostureRules(accountId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DevicePostureRulesApi->devicePostureRulesListDevicePostureRules: $e\n');
}

Parameters

Name Type Description Notes
accountId JsonObject

Return type

TeamsDevicesResponseCollection

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

devicePostureRulesUpdateDevicePostureRule

TeamsDevicesSingleResponse devicePostureRulesUpdateDevicePostureRule(ruleId, accountId, devicePostureRulesCreateDevicePostureRuleRequest)

Update a device posture rule

Updates a device posture rule.

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getDevicePostureRulesApi();
final String ruleId = ruleId_example; // String | 
final JsonObject accountId = ; // JsonObject | 
final DevicePostureRulesCreateDevicePostureRuleRequest devicePostureRulesCreateDevicePostureRuleRequest = ; // DevicePostureRulesCreateDevicePostureRuleRequest | 

try {
    final response = api.devicePostureRulesUpdateDevicePostureRule(ruleId, accountId, devicePostureRulesCreateDevicePostureRuleRequest);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DevicePostureRulesApi->devicePostureRulesUpdateDevicePostureRule: $e\n');
}

Parameters

Name Type Description Notes
ruleId String
accountId JsonObject
devicePostureRulesCreateDevicePostureRuleRequest DevicePostureRulesCreateDevicePostureRuleRequest

Return type

TeamsDevicesSingleResponse

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]