@@ -1912,6 +1912,83 @@ func (a *CloudCostManagementApi) ListCustomAllocationRules(ctx _context.Context)
19121912 return localVarReturnValue , localVarHTTPResponse , nil
19131913}
19141914
1915+ // ListCustomAllocationRulesStatus List custom allocation rule statuses.
1916+ // List the processing status of all custom allocation rules. Returns only the ID and processing status for each rule.
1917+ func (a * CloudCostManagementApi ) ListCustomAllocationRulesStatus (ctx _context.Context ) (ArbitraryRuleStatusResponseArray , * _nethttp.Response , error ) {
1918+ var (
1919+ localVarHTTPMethod = _nethttp .MethodGet
1920+ localVarPostBody interface {}
1921+ localVarReturnValue ArbitraryRuleStatusResponseArray
1922+ )
1923+
1924+ localBasePath , err := a .Client .Cfg .ServerURLWithContext (ctx , "v2.CloudCostManagementApi.ListCustomAllocationRulesStatus" )
1925+ if err != nil {
1926+ return localVarReturnValue , nil , datadog.GenericOpenAPIError {ErrorMessage : err .Error ()}
1927+ }
1928+
1929+ localVarPath := localBasePath + "/api/v2/cost/arbitrary_rule/status"
1930+
1931+ localVarHeaderParams := make (map [string ]string )
1932+ localVarQueryParams := _neturl.Values {}
1933+ localVarFormParams := _neturl.Values {}
1934+ localVarHeaderParams ["Accept" ] = "application/json"
1935+
1936+ if a .Client .Cfg .DelegatedTokenConfig != nil {
1937+ err = datadog .UseDelegatedTokenAuth (ctx , & localVarHeaderParams , a .Client .Cfg .DelegatedTokenConfig )
1938+ if err != nil {
1939+ return localVarReturnValue , nil , err
1940+ }
1941+ } else {
1942+ datadog .SetAuthKeys (
1943+ ctx ,
1944+ & localVarHeaderParams ,
1945+ [2 ]string {"apiKeyAuth" , "DD-API-KEY" },
1946+ [2 ]string {"appKeyAuth" , "DD-APPLICATION-KEY" },
1947+ )
1948+ }
1949+ req , err := a .Client .PrepareRequest (ctx , localVarPath , localVarHTTPMethod , localVarPostBody , localVarHeaderParams , localVarQueryParams , localVarFormParams , nil )
1950+ if err != nil {
1951+ return localVarReturnValue , nil , err
1952+ }
1953+
1954+ localVarHTTPResponse , err := a .Client .CallAPI (req )
1955+ if err != nil || localVarHTTPResponse == nil {
1956+ return localVarReturnValue , localVarHTTPResponse , err
1957+ }
1958+
1959+ localVarBody , err := datadog .ReadBody (localVarHTTPResponse )
1960+ if err != nil {
1961+ return localVarReturnValue , localVarHTTPResponse , err
1962+ }
1963+
1964+ if localVarHTTPResponse .StatusCode >= 300 {
1965+ newErr := datadog.GenericOpenAPIError {
1966+ ErrorBody : localVarBody ,
1967+ ErrorMessage : localVarHTTPResponse .Status ,
1968+ }
1969+ if localVarHTTPResponse .StatusCode == 429 {
1970+ var v APIErrorResponse
1971+ err = a .Client .Decode (& v , localVarBody , localVarHTTPResponse .Header .Get ("Content-Type" ))
1972+ if err != nil {
1973+ return localVarReturnValue , localVarHTTPResponse , newErr
1974+ }
1975+ newErr .ErrorModel = v
1976+ }
1977+ return localVarReturnValue , localVarHTTPResponse , newErr
1978+ }
1979+
1980+ err = a .Client .Decode (& localVarReturnValue , localVarBody , localVarHTTPResponse .Header .Get ("Content-Type" ))
1981+ if err != nil {
1982+ newErr := datadog.GenericOpenAPIError {
1983+ ErrorBody : localVarBody ,
1984+ ErrorMessage : err .Error (),
1985+ }
1986+ return localVarReturnValue , localVarHTTPResponse , newErr
1987+ }
1988+
1989+ return localVarReturnValue , localVarHTTPResponse , nil
1990+ }
1991+
19151992// ListCustomCostsFilesOptionalParameters holds optional parameters for ListCustomCostsFiles.
19161993type ListCustomCostsFilesOptionalParameters struct {
19171994 PageNumber * int64
@@ -2152,6 +2229,83 @@ func (a *CloudCostManagementApi) ListTagPipelinesRulesets(ctx _context.Context)
21522229 return localVarReturnValue , localVarHTTPResponse , nil
21532230}
21542231
2232+ // ListTagPipelinesRulesetsStatus List tag pipeline ruleset statuses.
2233+ // List the processing status of all tag pipeline rulesets. Returns only the ID and processing status for each ruleset.
2234+ func (a * CloudCostManagementApi ) ListTagPipelinesRulesetsStatus (ctx _context.Context ) (RulesetStatusRespArray , * _nethttp.Response , error ) {
2235+ var (
2236+ localVarHTTPMethod = _nethttp .MethodGet
2237+ localVarPostBody interface {}
2238+ localVarReturnValue RulesetStatusRespArray
2239+ )
2240+
2241+ localBasePath , err := a .Client .Cfg .ServerURLWithContext (ctx , "v2.CloudCostManagementApi.ListTagPipelinesRulesetsStatus" )
2242+ if err != nil {
2243+ return localVarReturnValue , nil , datadog.GenericOpenAPIError {ErrorMessage : err .Error ()}
2244+ }
2245+
2246+ localVarPath := localBasePath + "/api/v2/tags/enrichment/status"
2247+
2248+ localVarHeaderParams := make (map [string ]string )
2249+ localVarQueryParams := _neturl.Values {}
2250+ localVarFormParams := _neturl.Values {}
2251+ localVarHeaderParams ["Accept" ] = "application/json"
2252+
2253+ if a .Client .Cfg .DelegatedTokenConfig != nil {
2254+ err = datadog .UseDelegatedTokenAuth (ctx , & localVarHeaderParams , a .Client .Cfg .DelegatedTokenConfig )
2255+ if err != nil {
2256+ return localVarReturnValue , nil , err
2257+ }
2258+ } else {
2259+ datadog .SetAuthKeys (
2260+ ctx ,
2261+ & localVarHeaderParams ,
2262+ [2 ]string {"apiKeyAuth" , "DD-API-KEY" },
2263+ [2 ]string {"appKeyAuth" , "DD-APPLICATION-KEY" },
2264+ )
2265+ }
2266+ req , err := a .Client .PrepareRequest (ctx , localVarPath , localVarHTTPMethod , localVarPostBody , localVarHeaderParams , localVarQueryParams , localVarFormParams , nil )
2267+ if err != nil {
2268+ return localVarReturnValue , nil , err
2269+ }
2270+
2271+ localVarHTTPResponse , err := a .Client .CallAPI (req )
2272+ if err != nil || localVarHTTPResponse == nil {
2273+ return localVarReturnValue , localVarHTTPResponse , err
2274+ }
2275+
2276+ localVarBody , err := datadog .ReadBody (localVarHTTPResponse )
2277+ if err != nil {
2278+ return localVarReturnValue , localVarHTTPResponse , err
2279+ }
2280+
2281+ if localVarHTTPResponse .StatusCode >= 300 {
2282+ newErr := datadog.GenericOpenAPIError {
2283+ ErrorBody : localVarBody ,
2284+ ErrorMessage : localVarHTTPResponse .Status ,
2285+ }
2286+ if localVarHTTPResponse .StatusCode == 429 {
2287+ var v APIErrorResponse
2288+ err = a .Client .Decode (& v , localVarBody , localVarHTTPResponse .Header .Get ("Content-Type" ))
2289+ if err != nil {
2290+ return localVarReturnValue , localVarHTTPResponse , newErr
2291+ }
2292+ newErr .ErrorModel = v
2293+ }
2294+ return localVarReturnValue , localVarHTTPResponse , newErr
2295+ }
2296+
2297+ err = a .Client .Decode (& localVarReturnValue , localVarBody , localVarHTTPResponse .Header .Get ("Content-Type" ))
2298+ if err != nil {
2299+ newErr := datadog.GenericOpenAPIError {
2300+ ErrorBody : localVarBody ,
2301+ ErrorMessage : err .Error (),
2302+ }
2303+ return localVarReturnValue , localVarHTTPResponse , newErr
2304+ }
2305+
2306+ return localVarReturnValue , localVarHTTPResponse , nil
2307+ }
2308+
21552309// ReorderCustomAllocationRules Reorder custom allocation rules.
21562310// Reorder custom allocation rules - Change the execution order of custom allocation rules.
21572311//
0 commit comments