Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c005c1b

Browse files
committed
Update API EnrollAccount: add request parameters Tag.
1 parent 25fce0f commit c005c1b

File tree

104 files changed

+8497
-5417
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+8497
-5417
lines changed

‎governance-20210120/CMakeLists.txt‎

Lines changed: 73 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11

2-
cmake_minimum_required(VERSION 3.11 FATAL_ERROR)
2+
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
33

4-
project(alibabacloud_governance_20210120 VERSION "0.1.0")
4+
project(alibabacloud_governance20210120 VERSION "1.0.0")
55

66
# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< General set up >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #
77
set(CMAKE_CXX_STANDARD 11)
88
set(CMAKE_CXX_EXTENSIONS OFF)
99
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1010
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
11+
set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/${PROJECT_NAME}_build")
12+
SET(CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES}" "_d.dylib")
1113
message("C++ compiler flags: ${CMAKE_CXX_FLAGS}")
1214

1315
if (CMAKE_CXX_COMPILER_LOADED)
@@ -20,17 +22,18 @@ if (NOT CMAKE_BUILD_TYPE)
2022
endif ()
2123
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
2224

23-
# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Target set up >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #
24-
add_library(${PROJECT_NAME} SHARED "")
25-
set(headers
26-
include/alibabacloud/governance_20210120.hpp)
27-
target_sources(${PROJECT_NAME}
28-
PRIVATE
29-
src/governance_20210120.cpp
30-
${headers})
25+
# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Target set up >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #=
26+
include_directories(${CMAKE_SOURCE_DIR}/include)
27+
28+
set(SOURCE_FILES
29+
src/Client.cpp)
30+
31+
add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES})
32+
3133
target_include_directories(${PROJECT_NAME}
3234
PRIVATE
3335
${CMAKE_CURRENT_SOURCE_DIR}/include)
36+
3437
set_target_properties(${PROJECT_NAME}
3538
PROPERTIES
3639
POSITION_INDEPENDENT_CODE 1
@@ -43,9 +46,52 @@ set_target_properties(${PROJECT_NAME}
4346

4447
# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< External set up >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #
4548
add_subdirectory(external)
46-
find_package(Boost REQUIRED COMPONENTS random system thread filesystem chrono atomic date_time regex)
47-
find_library(CPPREST_LIB cpprest)
48-
target_link_libraries(${PROJECT_NAME} PRIVATE crypto darabonba_util alibabacloud_open_api alibabacloud_open_api_util alibabacloud_endpoint_util darabonba_core ${Boost_LIBRARIES} ${CPPREST_LIB})
49+
find_package(OpenSSL REQUIRED)
50+
find_library(CURL_LIB curl)
51+
if(CMAKE_HOST_WIN32)
52+
ExternalProject_Get_Property(curl INSTALL_DIR)
53+
set(curl_install_dir ${INSTALL_DIR})
54+
add_dependencies(${PROJECT_NAME}
55+
curl)
56+
target_include_directories(${PROJECT_NAME}
57+
PRIVATE ${curl_install_dir}/include)
58+
target_link_libraries(${PROJECT_NAME}
59+
OpenSSL::SSL OpenSSL::Crypto
60+
Crypt32
61+
Rpcrt4
62+
Ws2_32
63+
debug ${curl_install_dir}/lib/libcurl-d.lib
64+
optimized ${curl_install_dir}/lib/libcurl.lib
65+
darabonba_core
66+
alibabacloud_open_api_v2
67+
alibabacloud_credential
68+
69+
)
70+
target_compile_definitions(${PROJECT_NAME}
71+
PRIVATE CURL_STATICLIB
72+
_CRT_SECURE_NO_WARNINGS)
73+
elseif(APPLE)
74+
find_library(CFLIB CoreFoundation)
75+
find_library(UTIL_LIB alibabacloud_governance20210120 ${CMAKE_CURRENT_SOURCE_DIR}/deps/lib)
76+
target_link_libraries(${PROJECT_NAME}
77+
OpenSSL::SSL OpenSSL::Crypto
78+
${CFLIB}
79+
${CURL_LIB}
80+
darabonba_core
81+
alibabacloud_open_api_v2
82+
alibabacloud_credential
83+
)
84+
target_compile_definitions(${PROJECT_NAME} PRIVATE GUID_CFUUID)
85+
else()
86+
target_link_libraries(${PROJECT_NAME}
87+
OpenSSL::SSL OpenSSL::Crypto
88+
${CURL_LIB}
89+
darabonba_core
90+
alibabacloud_open_api_v2
91+
alibabacloud_credential
92+
)
93+
endif()
94+
4995

5096
# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Install set up >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #
5197
message(STATUS "${PROJECT_NAME} : Project will be installed to ${CMAKE_INSTALL_PREFIX}")
@@ -91,33 +137,33 @@ set_target_properties(${PROJECT_NAME}
91137

92138
install(
93139
TARGETS
94-
${PROJECT_NAME}
140+
${PROJECT_NAME}
95141
EXPORT
96-
alibabacloud_governance_20210120Targets
142+
alibabacloud_governance20210120Targets
97143
ARCHIVE
98-
DESTINATION ${INSTALL_LIBDIR}
99-
COMPONENT lib
144+
DESTINATION ${INSTALL_LIBDIR}
145+
COMPONENT lib
100146
RUNTIME
101-
DESTINATION ${INSTALL_BINDIR}
102-
COMPONENT bin
147+
DESTINATION ${INSTALL_BINDIR}
148+
COMPONENT bin
103149
LIBRARY
104-
DESTINATION ${INSTALL_LIBDIR}
105-
COMPONENT lib
150+
DESTINATION ${INSTALL_LIBDIR}
151+
COMPONENT lib
106152
PUBLIC_HEADER
107-
DESTINATION ${INSTALL_INCLUDEDIR}/alibabacloud
108-
COMPONENT dev
153+
DESTINATION ${INSTALL_INCLUDEDIR}/alibabacloud
154+
COMPONENT dev
109155
)
110156

111157
# Install cmake config
112158
install(
113159
EXPORT
114-
alibabacloud_governance_20210120Targets
160+
alibabacloud_governance20210120Targets
115161
NAMESPACE
116-
"alibabacloud_governance_20210120::"
162+
"alibabacloud_governance20210120::"
117163
DESTINATION
118-
${INSTALL_CMAKEDIR}
164+
${INSTALL_CMAKEDIR}
119165
COMPONENT
120-
dev
166+
dev
121167
)
122168
include(CMakePackageConfigHelpers)
123169

‎governance-20210120/ChangeLog.txt‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
2025年10月30日 Version: 0.0.9
2+
- Update API EnrollAccount: add request parameters Tag.
3+
- Update API GetEnrolledAccount: add response parameters Body.Inputs.Tag.
4+
- Update API ListEvaluationMetadata: add request parameters LensCode.
5+
- Update API ListEvaluationMetadata: add request parameters TopicCode.
6+
- Update API ListEvaluationMetadata: add response parameters Body.EvaluationMetadata.$.Metadata.$.TopicCode.
7+
- Update API ListEvaluationMetricDetails: add request parameters Scope.
8+
- Update API ListEvaluationMetricDetails: add request parameters SnapshotId.
9+
- Update API ListEvaluationMetricDetails: add response parameters Body.Resources.$.ComplianceType.
10+
- Update API ListEvaluationResults: add request parameters Filters.
11+
- Update API ListEvaluationResults: add request parameters LensCode.
12+
- Update API ListEvaluationResults: add request parameters Scope.
13+
- Update API ListEvaluationResults: add request parameters SnapshotId.
14+
- Update API ListEvaluationResults: add request parameters TopicCode.
15+
- Update API ListEvaluationResults: add response parameters Body.Results.MetricResults.$.AccountSummary.
16+
- Update API ListEvaluationResults: add response parameters Body.Results.MetricResults.$.PotentialScoreIncrease.
17+
- Update API ListEvaluationScoreHistory: add request parameters AccountId.
18+
- Update API RunEvaluation: add request parameters MetricIds.
19+
20+
121
2025年05月15日 Version: 0.0.9
222
- Update API EnrollAccount: add request parameters Tag.
323
- Update API GetEnrolledAccount: add response parameters Body.Inputs.Tag.
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
# Copyright (c) 2012 - 2015, Lars Bilke
2+
# All rights reserved.
3+
#
4+
# Redistribution and use in source and binary forms, with or without modification,
5+
# are permitted provided that the following conditions are met:
6+
#
7+
# 1. Redistributions of source code must retain the above copyright notice, this
8+
# list of conditions and the following disclaimer.
9+
#
10+
# 2. Redistributions in binary form must reproduce the above copyright notice,
11+
# this list of conditions and the following disclaimer in the documentation
12+
# and/or other materials provided with the distribution.
13+
#
14+
# 3. Neither the name of the copyright holder nor the names of its contributors
15+
# may be used to endorse or promote products derived from this software without
16+
# specific prior written permission.
17+
#
18+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
22+
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23+
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25+
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
#
29+
#
30+
#
31+
# 2012年01月31日, Lars Bilke
32+
# - Enable Code Coverage
33+
#
34+
# 2013年09月17日, Joakim Söderberg
35+
# - Added support for Clang.
36+
# - Some additional usage instructions.
37+
#
38+
# USAGE:
39+
40+
# 0. (Mac only) If you use Xcode 5.1 make sure to patch geninfo as described here:
41+
# http://stackoverflow.com/a/22404544/80480
42+
#
43+
# 1. Copy this file into your cmake modules path.
44+
#
45+
# 2. Add the following line to your CMakeLists.txt:
46+
# INCLUDE(CodeCoverage)
47+
#
48+
# 3. Set compiler flags to turn off optimization and enable coverage:
49+
# SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
50+
# SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
51+
#
52+
# 3. Use the function SETUP_TARGET_FOR_COVERAGE to create a custom make target
53+
# which runs your test executable and produces a lcov code coverage report:
54+
# Example:
55+
# SETUP_TARGET_FOR_COVERAGE(
56+
# my_coverage_target # Name for custom target.
57+
# test_driver # Name of the test driver executable that runs the tests.
58+
# # NOTE! This should always have a ZERO as exit code
59+
# # otherwise the coverage generation will not complete.
60+
# coverage # Name of output directory.
61+
# )
62+
#
63+
# 4. Build a Debug build:
64+
# cmake -DCMAKE_BUILD_TYPE=Debug ..
65+
# make
66+
# make my_coverage_target
67+
#
68+
#
69+
70+
# Check prereqs
71+
FIND_PROGRAM( GCOV_PATH gcov )
72+
FIND_PROGRAM( LCOV_PATH lcov )
73+
FIND_PROGRAM( GENHTML_PATH genhtml )
74+
FIND_PROGRAM( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/tests)
75+
76+
IF(NOT GCOV_PATH)
77+
MESSAGE(FATAL_ERROR "gcov not found! Aborting...")
78+
ENDIF() # NOT GCOV_PATH
79+
80+
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang")
81+
IF("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS 3)
82+
MESSAGE(FATAL_ERROR "Clang version must be 3.0.0 or greater! Aborting...")
83+
ENDIF()
84+
ELSEIF(NOT CMAKE_COMPILER_IS_GNUCXX)
85+
MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
86+
ENDIF() # CHECK VALID COMPILER
87+
88+
SET(CMAKE_CXX_FLAGS_COVERAGE
89+
"-g -O0 -fprofile-arcs -ftest-coverage"
90+
CACHE STRING "Flags used by the C++ compiler during coverage builds."
91+
FORCE )
92+
SET(CMAKE_C_FLAGS_COVERAGE
93+
"-g -O0 -fprofile-arcs -ftest-coverage"
94+
CACHE STRING "Flags used by the C compiler during coverage builds."
95+
FORCE )
96+
SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE
97+
""
98+
CACHE STRING "Flags used for linking binaries during coverage builds."
99+
FORCE )
100+
SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
101+
""
102+
CACHE STRING "Flags used by the shared libraries linker during coverage builds."
103+
FORCE )
104+
MARK_AS_ADVANCED(
105+
CMAKE_CXX_FLAGS_COVERAGE
106+
CMAKE_C_FLAGS_COVERAGE
107+
CMAKE_EXE_LINKER_FLAGS_COVERAGE
108+
CMAKE_SHARED_LINKER_FLAGS_COVERAGE )
109+
110+
IF ( NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "Coverage"))
111+
MESSAGE( WARNING "Code coverage results with an optimized (non-Debug) build may be misleading" )
112+
ENDIF() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
113+
114+
115+
# Param _targetname The name of new the custom make target
116+
# Param _testrunner The name of the target which runs the tests.
117+
# MUST return ZERO always, even on errors.
118+
# If not, no coverage report will be created!
119+
# Param _outputname lcov output is generated as _outputname.info
120+
# HTML report is generated in _outputname/index.html
121+
# Optional fourth parameter is passed as arguments to _testrunner
122+
# Pass them in list form, e.g.: "-j;2" for -j 2
123+
FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
124+
125+
IF(NOT LCOV_PATH)
126+
MESSAGE(FATAL_ERROR "lcov not found! Aborting...")
127+
ENDIF() # NOT LCOV_PATH
128+
129+
IF(NOT GENHTML_PATH)
130+
MESSAGE(FATAL_ERROR "genhtml not found! Aborting...")
131+
ENDIF() # NOT GENHTML_PATH
132+
133+
SET(coverage_info "${CMAKE_BINARY_DIR}/${_outputname}.info")
134+
SET(coverage_cleaned "${coverage_info}.cleaned")
135+
136+
SEPARATE_ARGUMENTS(test_command UNIX_COMMAND "${_testrunner}")
137+
138+
# Setup target
139+
ADD_CUSTOM_TARGET(${_targetname}
140+
141+
# Cleanup lcov
142+
${LCOV_PATH} --directory . --zerocounters
143+
144+
# Run tests
145+
COMMAND ${test_command} ${ARGV3}
146+
147+
# Capturing lcov counters and generating report
148+
COMMAND ${LCOV_PATH} --directory . --capture --output-file ${coverage_info}
149+
COMMAND ${LCOV_PATH} --remove ${coverage_info} 'tests/*' '/usr/*' --output-file ${coverage_cleaned}
150+
COMMAND ${GENHTML_PATH} -o ${_outputname} ${coverage_cleaned}
151+
COMMAND ${CMAKE_COMMAND} -E remove ${coverage_info} ${coverage_cleaned}
152+
153+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
154+
COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
155+
)
156+
157+
# Show info where to find the report
158+
ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
159+
COMMAND ;
160+
COMMENT "Open ./${_outputname}/index.html in your browser to view the coverage report."
161+
)
162+
163+
ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE
164+
165+
# Param _targetname The name of new the custom make target
166+
# Param _testrunner The name of the target which runs the tests
167+
# Param _outputname cobertura output is generated as _outputname.xml
168+
# Optional fourth parameter is passed as arguments to _testrunner
169+
# Pass them in list form, e.g.: "-j;2" for -j 2
170+
FUNCTION(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname)
171+
172+
IF(NOT PYTHON_EXECUTABLE)
173+
MESSAGE(FATAL_ERROR "Python not found! Aborting...")
174+
ENDIF() # NOT PYTHON_EXECUTABLE
175+
176+
IF(NOT GCOVR_PATH)
177+
MESSAGE(FATAL_ERROR "gcovr not found! Aborting...")
178+
ENDIF() # NOT GCOVR_PATH
179+
180+
ADD_CUSTOM_TARGET(${_targetname}
181+
182+
# Run tests
183+
${_testrunner} ${ARGV3}
184+
185+
# Running gcovr
186+
COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR} -e '${CMAKE_SOURCE_DIR}/tests/' -o ${_outputname}.xml
187+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
188+
COMMENT "Running gcovr to produce Cobertura code coverage report."
189+
)
190+
191+
# Show info where to find the report
192+
ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
193+
COMMAND ;
194+
COMMENT "Cobertura code coverage report saved in ${_outputname}.xml."
195+
)
196+
197+
ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE_COBERTURA
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@PACKAGE_INIT@
2+
3+
include("${CMAKE_CURRENT_LIST_DIR}/alibabacloud_governance20210120Targets.cmake")
4+
check_required_components("alibabacloud_governance20210120")

‎governance-20210120/cmake/alibabacloud_governance_20210120Config.cmake.in‎

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
message(STATUS "Install libraries")
2-
add_subdirectory(darabonba_util)
3-
add_subdirectory(alibabacloud_open_api)
4-
add_subdirectory(alibabacloud_open_api_util)
5-
add_subdirectory(alibabacloud_endpoint_util)
2+
add_subdirectory(alibabacloud_open_api_v2)
3+
add_subdirectory(alibabacloud_credential)
64
add_subdirectory(darabonba_core)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /