Expand description
Native async Strata Cloud Manager SDK.
The application owns the Tokio runtime, credential persistence and enforcement policy. SDK formatting contains metadata; API data remains available through explicit access.
§Explicit credentials
//! Raw-client example. Product-specific interfaces follow in later phases.
//! Supply credentials explicitly; this example performs no network requests.
use scm_sdk::{Client, Endpoint, Secret, auth::AuthContext};
fn main() -> scm_sdk::Result<()> {
let issuer = Endpoint::parse("https://auth.apps.paloaltonetworks.com/oauth2/access_token")?;
let identity = AuthContext::new(issuer, "example-client", 1, "1234567890")?;
let client = Client::builder(Endpoint::parse(
"https://api.sase.paloaltonetworks.com/aisec",
)?)
.oauth_credentials(identity, Secret::new("synthetic-example-secret")?, false)
.build()?;
assert!(!client.session().is_cancelled());
Ok(())
}
Re-exports§
pub use config::Endpoint;pub use config::Limits;pub use config::OriginPolicy;pub use config::RequestOptions;pub use config::Session;pub use error::Error;pub use error::ErrorKind;pub use error::ErrorMetadata;pub use error::ErrorType;pub use error::FailureKind;pub use error::ProblemDetails;pub use error::ProblemFieldError;pub use error::RemoteOutcome;pub use error::Result;pub use secret::Secret;
Modules§
- airs
- Prisma AIRS product namespaces. Client availability is tracked independently
from the shared typed contracts available through the
modelsfeature. - auth
- Explicit authentication and isolated, caller-driven OAuth refresh.
- config
- Validated destinations, budgets and caller-owned cancellation.
- configuration
- Isolated scan initialization. Existing clients never consult mutable configuration state.
- constants
- Typed constants from the frozen TypeScript baseline. Regenerate with tools/generate_constants.py.
- data
- Explicit wire presence and finite JSON numbers with safe ordinary formatting.
- dlp
- Canonical DLP resources, authenticated with an explicit SCM OAuth client.
- environment
- Explicit, bounded environment snapshots. Constructors never read process variables implicitly.
- error
- Structured errors with safe ordinary formatting.
- helpers
- Generic, bounded native equivalents of the public SDK helpers.
- pagination
- Caller-driven, bounded page and item walks.
- secret
- Explicit access to credential values with redacted formatting.
- shared
- Reusable SCM contracts shared by product families.
- streaming
- Bounded, caller-driven response bodies. Dropping a response releases its socket and concurrency permit; no reader or background task outlives the caller.
- transport
- A narrow caller-owned HTTP transport seam, shared by APIs and OAuth exchange.
- validation
- Bounded native validation of the pinned schema graph.
Structs§
- Client
- Shared configuration for product clients. Clones share the pool, session and limiter.
- Client
Builder - RawRequest
- An explicitly raw request for advanced integrations. Product clients validate their typed contracts before reaching this seam. Raw callers own service-specific validation.