Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
503 changes: 503 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions examples/v2/organizations/GetSAMLConfiguration.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get a SAML configuration returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::OrganizationsAPI.new
p api_instance.get_saml_configuration("3653d3c6-0c75-11ea-ad28-fb5701eabc7d")
5 changes: 5 additions & 0 deletions examples/v2/organizations/ListSAMLConfigurations.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# List SAML configurations returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::OrganizationsAPI.new
p api_instance.list_saml_configurations()
23 changes: 23 additions & 0 deletions examples/v2/organizations/UpdateOrgSamlConfigurations.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Update organization SAML preferences returns "No Content" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.update_org_saml_configurations".to_sym] = true
end
api_instance = DatadogAPIClient::V2::OrganizationsAPI.new

body = DatadogAPIClient::V2::OrgSAMLPreferencesUpdateRequest.new({
data: DatadogAPIClient::V2::OrgSAMLPreferencesData.new({
attributes: DatadogAPIClient::V2::OrgSAMLPreferencesAttributes.new({
default_role_uuids: [
"8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d",
],
jit_domains: [
"example.com",
],
}),
id: "00000000-0000-0000-0000-000000000000",
type: DatadogAPIClient::V2::OrgSAMLPreferencesType::SAML_PREFERENCES,
}),
})
api_instance.update_org_saml_configurations(body)
28 changes: 28 additions & 0 deletions examples/v2/organizations/UpdateSAMLConfiguration.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Update a SAML configuration returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::OrganizationsAPI.new

body = DatadogAPIClient::V2::SAMLConfigurationUpdateRequest.new({
data: DatadogAPIClient::V2::SAMLConfigurationUpdateData.new({
attributes: DatadogAPIClient::V2::SAMLConfigurationUpdateAttributes.new({
idp_initiated: true,
jit_domains: [
"example.com",
],
}),
id: "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
relationships: DatadogAPIClient::V2::SAMLConfigurationRelationships.new({
default_roles: DatadogAPIClient::V2::RelationshipToRoles.new({
data: [
DatadogAPIClient::V2::RelationshipToRoleData.new({
id: "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
type: DatadogAPIClient::V2::RolesType::ROLES,
}),
],
}),
}),
type: DatadogAPIClient::V2::SAMLConfigurationsType::SAML_CONFIGURATIONS,
}),
})
p api_instance.update_saml_configuration("3653d3c6-0c75-11ea-ad28-fb5701eabc7d", body)
10 changes: 10 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4167,6 +4167,9 @@
"v2.ListOrgs" => {
"filter_name" => "String",
},
"v2.UpdateOrgSamlConfigurations" => {
"body" => "OrgSAMLPreferencesUpdateRequest",
},
"v2.GetOrgConfig" => {
"org_config_name" => "String",
},
Expand All @@ -4177,6 +4180,13 @@
"v2.UploadIdPMetadata" => {
"idp_file" => "File",
},
"v2.GetSAMLConfiguration" => {
"saml_config_uuid" => "String",
},
"v2.UpdateSAMLConfiguration" => {
"saml_config_uuid" => "String",
"body" => "SAMLConfigurationUpdateRequest",
},
"v2.DisableCustomerOrg" => {
"body" => "CustomerOrgDisableRequest",
},
Expand Down
76 changes: 76 additions & 0 deletions features/v2/organizations.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ Feature: Organizations
And a valid "appKeyAuth" key in the system
And an instance of "Organizations" API

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Get a SAML configuration returns "Not Found" response
Given new "GetSAMLConfiguration" request
And request contains "saml_config_uuid" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Get a SAML configuration returns "OK" response
Given new "GetSAMLConfiguration" request
And request contains "saml_config_uuid" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/org-management
Scenario: Get a specific Org Config value returns "Bad Request" response
Given new "GetOrgConfig" request
Expand Down Expand Up @@ -41,12 +55,50 @@ Feature: Organizations
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/delegated-auth-login
Scenario: List SAML configurations returns "OK" response
Given new "ListSAMLConfigurations" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/org-management
Scenario: List your managed organizations returns "OK" response
Given new "ListOrgs" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Update a SAML configuration returns "Bad Request" response
Given new "UpdateSAMLConfiguration" request
And request contains "saml_config_uuid" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"idp_initiated": true, "jit_domains": ["example.com"]}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"default_roles": {"data": [{"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}]}}, "type": "saml_configurations"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Update a SAML configuration returns "Not Found" response
Given new "UpdateSAMLConfiguration" request
And request contains "saml_config_uuid" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"idp_initiated": true, "jit_domains": ["example.com"]}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"default_roles": {"data": [{"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}]}}, "type": "saml_configurations"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Update a SAML configuration returns "OK" response
Given new "UpdateSAMLConfiguration" request
And request contains "saml_config_uuid" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"idp_initiated": true, "jit_domains": ["example.com"]}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"default_roles": {"data": [{"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}]}}, "type": "saml_configurations"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Update a SAML configuration returns "Unprocessable Entity" response
Given new "UpdateSAMLConfiguration" request
And request contains "saml_config_uuid" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"idp_initiated": true, "jit_domains": ["example.com"]}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"default_roles": {"data": [{"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}]}}, "type": "saml_configurations"}}
When the request is sent
Then the response status is 422 Unprocessable Entity

@team:DataDog/org-management
Scenario: Update a specific Org Config returns "Bad Request" response
Given new "UpdateOrgConfig" request
Expand All @@ -71,6 +123,30 @@ Feature: Organizations
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Update organization SAML preferences returns "Bad Request" response
Given operation "UpdateOrgSamlConfigurations" enabled
And new "UpdateOrgSamlConfigurations" request
And body with value {"data": {"attributes": {"default_role_uuids": ["8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d"], "jit_domains": ["example.com"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "saml_preferences"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Update organization SAML preferences returns "No Content" response
Given operation "UpdateOrgSamlConfigurations" enabled
And new "UpdateOrgSamlConfigurations" request
And body with value {"data": {"attributes": {"default_role_uuids": ["8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d"], "jit_domains": ["example.com"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "saml_preferences"}}
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Update organization SAML preferences returns "Not Found" response
Given operation "UpdateOrgSamlConfigurations" enabled
And new "UpdateOrgSamlConfigurations" request
And body with value {"data": {"attributes": {"default_role_uuids": ["8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d"], "jit_domains": ["example.com"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "saml_preferences"}}
When the request is sent
Then the response status is 404 Not Found

@skip-go @skip-java @skip-python @skip-ruby @skip-rust @skip-terraform-config @skip-typescript @skip-validation @team:DataDog/delegated-auth-login
Scenario: Upload IdP metadata returns "Bad Request - caused by either malformed XML or invalid SAML IdP metadata" response
Given new "UploadIdPMetadata" request
Expand Down
24 changes: 24 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5208,6 +5208,12 @@
"type": "unsafe"
}
},
"UpdateOrgSamlConfigurations": {
"tag": "Organizations",
"undo": {
"type": "idempotent"
}
},
"ListOrgConfigs": {
"tag": "Organizations",
"undo": {
Expand Down Expand Up @@ -6304,12 +6310,30 @@
"type": "safe"
}
},
"ListSAMLConfigurations": {
"tag": "Organizations",
"undo": {
"type": "safe"
}
},
"UploadIdPMetadata": {
"tag": "Organizations",
"undo": {
"type": "idempotent"
}
},
"GetSAMLConfiguration": {
"tag": "Organizations",
"undo": {
"type": "safe"
}
},
"UpdateSAMLConfiguration": {
"tag": "Organizations",
"undo": {
"type": "idempotent"
}
},
"ListScorecardCampaigns": {
"tag": "Scorecards",
"undo": {
Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ def initialize
"v2.get_scopes_restriction": false,
"v2.register_o_auth_client": false,
"v2.upsert_scopes_restriction": false,
"v2.update_org_saml_configurations": false,
"v2.disable_customer_org": false,
"v2.bulk_update_org_group_memberships": false,
"v2.create_org_group": false,
Expand Down
13 changes: 13 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5114,6 +5114,10 @@ def overrides
"v2.org_group_update_request" => "OrgGroupUpdateRequest",
"v2.org_relationship_data" => "OrgRelationshipData",
"v2.org_resource_type" => "OrgResourceType",
"v2.org_saml_preferences_attributes" => "OrgSAMLPreferencesAttributes",
"v2.org_saml_preferences_data" => "OrgSAMLPreferencesData",
"v2.org_saml_preferences_type" => "OrgSAMLPreferencesType",
"v2.org_saml_preferences_update_request" => "OrgSAMLPreferencesUpdateRequest",
"v2.outbound_edge" => "OutboundEdge",
"v2.outcomes_batch_attributes" => "OutcomesBatchAttributes",
"v2.outcomes_batch_request" => "OutcomesBatchRequest",
Expand Down Expand Up @@ -5727,6 +5731,15 @@ def overrides
"v2.saml_assertion_attribute" => "SAMLAssertionAttribute",
"v2.saml_assertion_attribute_attributes" => "SAMLAssertionAttributeAttributes",
"v2.saml_assertion_attributes_type" => "SAMLAssertionAttributesType",
"v2.saml_configuration" => "SAMLConfiguration",
"v2.saml_configuration_attributes" => "SAMLConfigurationAttributes",
"v2.saml_configuration_relationships" => "SAMLConfigurationRelationships",
"v2.saml_configuration_response" => "SAMLConfigurationResponse",
"v2.saml_configurations_response" => "SAMLConfigurationsResponse",
"v2.saml_configurations_type" => "SAMLConfigurationsType",
"v2.saml_configuration_update_attributes" => "SAMLConfigurationUpdateAttributes",
"v2.saml_configuration_update_data" => "SAMLConfigurationUpdateData",
"v2.saml_configuration_update_request" => "SAMLConfigurationUpdateRequest",
"v2.sample_log_generation_bulk_subscription_attributes" => "SampleLogGenerationBulkSubscriptionAttributes",
"v2.sample_log_generation_bulk_subscription_data" => "SampleLogGenerationBulkSubscriptionData",
"v2.sample_log_generation_bulk_subscription_item_meta" => "SampleLogGenerationBulkSubscriptionItemMeta",
Expand Down
Loading
Loading