Crates.io | oci_cfg |
lib.rs | oci_cfg |
version | 0.2.0 |
source | src |
created_at | 2024-02-13 13:30:44.981339 |
updated_at | 2024-02-13 13:30:44.981339 |
description | A small library for parsing and writing OCI configuration files |
homepage | |
repository | |
max_upload_size | |
id | 1138489 |
size | 30,487 |
This small library enables engineers to create an Oracle Cloud Infrastructure (OCI) config file in Rust. It checks, whether a file already exists, before it writes the config into the sub-directory within the user's home. It checks the permissions before adding content. To instantiate the library it should be addressed as oci_cfg
, this name is used within the modules. Documentation created using the make doc
command.
More information about the config file itself can be found in the official documentation under: https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm
use oci_cfg::{profile, credentials, report};
fn main() {
profile(
"ocid1.user.oc1..aaaaaaaaxxxxxx",
"ocid1.fingerprint.oc1..aaaaaaaaxxxxxx",
"path/to/private/key",
"ocid1.tenancy.oc1..aaaaaaaaxxxxxx",
"IAD"
);
credentials(
"ocid1.user.oc1..aaaaaaaaxxxxxx",
"ocid1.fingerprint.oc1..aaaaaaaaxxxxxx",
"path/to/private/key",
"passphrase"
);
content();
}