For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/ja/api/latest/action-connection/update-an-existing-action-connection.md. A documentation index is available at /llms.txt.
Language
Datadog site

既存の Action コネクションの更新

PATCHhttps://api.datadoghq.com/api/v2/actions/connections/{connection_id}https://api.us3.datadoghq.com/api/v2/actions/connections/{connection_id}https://api.us5.datadoghq.com/api/v2/actions/connections/{connection_id}https://api.datadoghq.eu/api/v2/actions/connections/{connection_id}https://api.ap1.datadoghq.com/api/v2/actions/connections/{connection_id}https://api.ap2.datadoghq.com/api/v2/actions/connections/{connection_id}https://api.uk1.datadoghq.com/api/v2/actions/connections/{connection_id}https://api.ddog-gov.com/api/v2/actions/connections/{connection_id}https://api.us2.ddog-gov.com/api/v2/actions/connections/{connection_id}

概要

既存の Action コネクションを更新します。この API には、登録済みアプリケーションキー が必要です。

引数

パスパラメーター

名前
タイプ
説明
connection_id [required]
string

The ID of the action connection

リクエスト

Body Data (required)

既存の Action コネクションのリクエスト本文

フィールド
タイプ
説明
data [required]
object

Action コネクションを更新するために使用されるリクエスト。

応答

Successfully updated Action Connection

The response for an updated connection.

フィールド
タイプ
説明
data
object

Data related to the connection.

コード例

Update a GCP Action Connection with a versioned AWS Secrets Manager reference
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "external_secrets_manager": {
        "type": "aws_secrets_manager",
        "connection_id": "b0511f47-29f5-55de-bdcb-c209b05eadc3",
        "region": "us-east-1"
      },
      "integration": {
        "type": "GCP",
        "credentials": {
          "type": "GCPServiceAccount",
          "private_key": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "private_key",
            "version_stage": "AWSCURRENT"
          },
          "service_account_email": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "client_email"
          }
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "external_secrets_manager": {
        "type": "aws_secrets_manager",
        "connection_id": "b0511f47-29f5-55de-bdcb-c209b05eadc3",
        "region": "us-east-1"
      },
      "integration": {
        "type": "GCP",
        "credentials": {
          "type": "GCPServiceAccount",
          "private_key": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "private_key",
            "version_stage": "AWSCURRENT"
          },
          "service_account_email": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "client_email"
          }
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "external_secrets_manager": {
        "type": "aws_secrets_manager",
        "connection_id": "b0511f47-29f5-55de-bdcb-c209b05eadc3",
        "region": "us-east-1"
      },
      "integration": {
        "type": "GCP",
        "credentials": {
          "type": "GCPServiceAccount",
          "private_key": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "private_key",
            "version_stage": "AWSCURRENT"
          },
          "service_account_email": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "client_email"
          }
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "external_secrets_manager": {
        "type": "aws_secrets_manager",
        "connection_id": "b0511f47-29f5-55de-bdcb-c209b05eadc3",
        "region": "us-east-1"
      },
      "integration": {
        "type": "GCP",
        "credentials": {
          "type": "GCPServiceAccount",
          "private_key": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "private_key",
            "version_stage": "AWSCURRENT"
          },
          "service_account_email": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "client_email"
          }
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "external_secrets_manager": {
        "type": "aws_secrets_manager",
        "connection_id": "b0511f47-29f5-55de-bdcb-c209b05eadc3",
        "region": "us-east-1"
      },
      "integration": {
        "type": "GCP",
        "credentials": {
          "type": "GCPServiceAccount",
          "private_key": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "private_key",
            "version_stage": "AWSCURRENT"
          },
          "service_account_email": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "client_email"
          }
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "external_secrets_manager": {
        "type": "aws_secrets_manager",
        "connection_id": "b0511f47-29f5-55de-bdcb-c209b05eadc3",
        "region": "us-east-1"
      },
      "integration": {
        "type": "GCP",
        "credentials": {
          "type": "GCPServiceAccount",
          "private_key": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "private_key",
            "version_stage": "AWSCURRENT"
          },
          "service_account_email": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "client_email"
          }
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "external_secrets_manager": {
        "type": "aws_secrets_manager",
        "connection_id": "b0511f47-29f5-55de-bdcb-c209b05eadc3",
        "region": "us-east-1"
      },
      "integration": {
        "type": "GCP",
        "credentials": {
          "type": "GCPServiceAccount",
          "private_key": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "private_key",
            "version_stage": "AWSCURRENT"
          },
          "service_account_email": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "client_email"
          }
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "external_secrets_manager": {
        "type": "aws_secrets_manager",
        "connection_id": "b0511f47-29f5-55de-bdcb-c209b05eadc3",
        "region": "us-east-1"
      },
      "integration": {
        "type": "GCP",
        "credentials": {
          "type": "GCPServiceAccount",
          "private_key": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "private_key",
            "version_stage": "AWSCURRENT"
          },
          "service_account_email": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "client_email"
          }
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "external_secrets_manager": {
        "type": "aws_secrets_manager",
        "connection_id": "b0511f47-29f5-55de-bdcb-c209b05eadc3",
        "region": "us-east-1"
      },
      "integration": {
        "type": "GCP",
        "credentials": {
          "type": "GCPServiceAccount",
          "private_key": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "private_key",
            "version_stage": "AWSCURRENT"
          },
          "service_account_email": {
            "type": "aws_secrets_manager",
            "secret_id": "example/gcp/service-account",
            "key": "client_email"
          }
        }
      }
    }
  }
}
EOF
Update a GitHub App Action Connection without replacing its secret
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub App Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubApp",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub App Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubApp",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub App Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubApp",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub App Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubApp",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub App Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubApp",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub App Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubApp",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub App Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubApp",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub App Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubApp",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub App Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubApp",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF
Update a GitHub personal access token Action Connection without replacing its secret
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub personal access token Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubPersonalAccessToken",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub personal access token Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubPersonalAccessToken",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub personal access token Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubPersonalAccessToken",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub personal access token Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubPersonalAccessToken",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub personal access token Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubPersonalAccessToken",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub personal access token Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubPersonalAccessToken",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub personal access token Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubPersonalAccessToken",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub personal access token Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubPersonalAccessToken",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF
# Path parameters
export connection_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/actions/connections/${connection_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "GitHub personal access token Updated exampleactionconnection",
      "integration": {
        "type": "Github",
        "credentials": {
          "type": "GithubPersonalAccessToken",
          "hostname": "github.updated.example.com"
        }
      }
    }
  }
}
EOF